Fix deferred renderer when bloom is not used

This commit is contained in:
Nikita Lisitsa 2020-12-10 18:33:08 +03:00
parent cfc8cf4577
commit bcb04d5286

View file

@ -1249,10 +1249,11 @@ void main()
}
}
gl::DepthMask(gl::TRUE);
gl::Disable(gl::BLEND);
}
gl::Disable(gl::BLEND);
gl::DepthMask(gl::TRUE);
// Apply horizontal blur to bloom
if (opts.bloom)
@ -1686,10 +1687,12 @@ void main()
// Overlay bloom
gl::Enable(gl::BLEND);
gl::BlendFunc(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA);
impl().bloom_overlay.invoke(impl().bloom_texture[2], target);
if (opts.bloom)
{
gl::Enable(gl::BLEND);
gl::BlendFunc(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA);
impl().bloom_overlay.invoke(impl().bloom_texture[2], target);
}
check_error();
}