1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-01 04:20:20 +00:00

bind framebuffer when msaa enabled in transparent postpass

This commit is contained in:
glassmancody.info 2022-06-06 20:52:40 -07:00
parent e6fcb8bd2d
commit f6943f9f66

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);
}
}