Fix different color with/without mlaa.

This commit is contained in:
vlj 2014-06-08 02:50:02 +02:00
parent f4ca8f1f39
commit 877bf938bd
2 changed files with 7 additions and 17 deletions

View File

@ -859,16 +859,17 @@ FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode)
PROFILER_POP_CPU_MARKER();
}
if (UserConfigParams::m_mlaa) // MLAA. Must be the last pp filter.
{
PROFILER_PUSH_CPU_MARKER("- MLAA", 0xFF, 0x00, 0x00);
ScopedGPUTimer Timer(irr_driver->getGPUTimer(Q_MLAA));
glEnable(GL_FRAMEBUFFER_SRGB);
irr_driver->getFBO(FBO_MLAA_COLORS).Bind();
renderPassThrough(in_fbo->getRTT()[0]);
glDisable(GL_FRAMEBUFFER_SRGB);
applyMLAA();
out_fbo = &irr_driver->getFBO(FBO_MLAA_COLORS);
if (UserConfigParams::m_mlaa) // MLAA. Must be the last pp filter.
{
PROFILER_PUSH_CPU_MARKER("- MLAA", 0xFF, 0x00, 0x00);
ScopedGPUTimer Timer(irr_driver->getGPUTimer(Q_MLAA));
applyMLAA();
PROFILER_POP_CPU_MARKER();
}

View File

@ -198,18 +198,7 @@ void IrrDriver::renderGLSL(float dt)
m_post_processing->renderPassThrough(m_rtts->getRSM().getRTT()[0]);
}
else
{
if (UserConfigParams::m_mlaa) // MLAA_COLORS already in srgb space
fbo->BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
else
{
glEnable(GL_FRAMEBUFFER_SRGB);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
m_post_processing->renderPassThrough(fbo->getRTT()[0]);
glDisable(GL_FRAMEBUFFER_SRGB);
}
}
}
else
glDisable(GL_FRAMEBUFFER_SRGB);