mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Merge branch 'fix_sun' into 'master'
Fix sunglare with msaa enabled See merge request OpenMW/openmw!1986
This commit is contained in:
commit
598312e391
1 changed files with 2 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue