- prevent excessively bright pixels as this is actually visible on a HDR monitor

This commit is contained in:
Magnus Norddahl 2019-04-11 03:34:34 +02:00 committed by drfrag
parent 011176668a
commit 11faa63009

View file

@ -13,6 +13,8 @@ uniform float ColorScale;
vec4 ApplyGamma(vec4 c)
{
c.rgb = min(c.rgb, vec3(2.0)); // for HDR mode - prevents stacked translucent sprites (such as plasma) producing way too bright light
vec3 valgray;
if (GrayFormula == 0)
valgray = vec3(c.r + c.g + c.b) * (1 - Saturation) / 3 + c.rgb * Saturation;