Fix deferred renderer when bloom is not used
This commit is contained in:
parent
cfc8cf4577
commit
bcb04d5286
1 changed files with 9 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue