1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'fix_sun' into 'master'

Fix sunglare with msaa enabled

See merge request OpenMW/openmw!1986
This commit is contained in:
Alexei Kotov 2022-06-07 05:38:12 +00:00
commit 598312e391

View File

@ -63,10 +63,7 @@ namespace MWRender
ext->glBlitFramebuffer(0, 0, tex->getTextureWidth(), tex->getTextureHeight(), 0, 0, tex->getTextureWidth(), tex->getTextureHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
if (msaaFbo)
msaaFbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER);
else
fbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER);
msaaFbo ? msaaFbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER) : fbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER);
// draws scene into primary attachments
bin->drawImplementation(renderInfo, previous);
@ -82,8 +79,7 @@ namespace MWRender
bin->drawImplementation(renderInfo, previous);
bin->setStateSet(restore);
if (!msaaFbo)
fbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER);
msaaFbo ? msaaFbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER) : fbo->apply(state, osg::FrameBufferObject::DRAW_FRAMEBUFFER);
}
}