mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-12 16:43:06 +00:00
postprocessing - set mipmaps levels for rendertargets when requested
This commit is contained in:
parent
a6503233a6
commit
390589795c
1 changed files with 8 additions and 0 deletions
|
|
@ -655,6 +655,14 @@ namespace MWRender
|
|||
const auto [w, h] = renderTarget.mSize.get(renderWidth(), renderHeight());
|
||||
subPass.mStateSet->setAttributeAndModes(new osg::Viewport(0, 0, w, h));
|
||||
|
||||
if (subPass.mMipMap)
|
||||
{
|
||||
subPass.mRenderTexture->setNumMipmapLevels(osg::Image::computeNumberOfMipmapLevels(w, h));
|
||||
}
|
||||
else
|
||||
{
|
||||
subPass.mRenderTexture->setNumMipmapLevels(0);
|
||||
}
|
||||
subPass.mRenderTexture->setTextureSize(w, h);
|
||||
subPass.mRenderTexture->dirtyTextureObject();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue