mirror of
https://github.com/minetest/minetest.git
synced 2024-11-29 19:13:44 +01:00
Clamp pre-bloom color to valid range (#15453)
That avoids flashing artifacts when combining MSAA and bloom.
This commit is contained in:
parent
b77ad82fb9
commit
8c56434bd3
@ -23,7 +23,7 @@ void main(void)
|
|||||||
vec2 uv = varTexCoord.st;
|
vec2 uv = varTexCoord.st;
|
||||||
vec3 color = texture2D(rendered, uv).rgb;
|
vec3 color = texture2D(rendered, uv).rgb;
|
||||||
// translate to linear colorspace (approximate)
|
// translate to linear colorspace (approximate)
|
||||||
color = pow(color, vec3(2.2));
|
color = pow(clamp(color, 0.0, 1.0), vec3(2.2));
|
||||||
|
|
||||||
color *= exposureParams.compensationFactor * bloomStrength;
|
color *= exposureParams.compensationFactor * bloomStrength;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user