Fix different color with/without mlaa.
This commit is contained in:
parent
f4ca8f1f39
commit
877bf938bd
@ -859,16 +859,17 @@ FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode)
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
}
|
||||
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
irr_driver->getFBO(FBO_MLAA_COLORS).Bind();
|
||||
renderPassThrough(in_fbo->getRTT()[0]);
|
||||
glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
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));
|
||||
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);
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
fbo->BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
|
||||
}
|
||||
else
|
||||
glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
|
Loading…
Reference in New Issue
Block a user