mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Quick fix: prevents negative values being passed to pow.
This commit is contained in:
parent
72491049e0
commit
2339b18b01
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ vec4 ApplyGamma(vec4 c)
|
|||
{
|
||||
vec3 val = c.rgb * Contrast - (Contrast - 1.0) * 0.5;
|
||||
val += Brightness * 0.5;
|
||||
val = pow(val, vec3(InvGamma));
|
||||
val = pow(max(val, vec3(0.0)), vec3(InvGamma));
|
||||
return vec4(val, c.a);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue