mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-11 20:40:47 +00:00
Prevent gl_FrontColor overflow in model lighting shader manually
Some drivers don't clamp it for some reason. Fixes overbright model lighting and broken colors when combined with palette rendering on affected drivers.
This commit is contained in:
parent
386c4a95f3
commit
89af6b10ad
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@
|
|||
"{\n" \
|
||||
"#ifdef SRB2_MODEL_LIGHTING\n" \
|
||||
"float nDotVP = dot(gl_Normal, vec3(0, 1, 0));\n" \
|
||||
"float light = 0.75 + max(nDotVP, 0.0);\n" \
|
||||
"float light = min(0.75 + max(nDotVP, 0.0), 1.0);\n" \
|
||||
"gl_FrontColor = vec4(light, light, light, 1.0);\n" \
|
||||
"#else\n" \
|
||||
"gl_FrontColor = gl_Color;\n" \
|
||||
|
|
Loading…
Reference in a new issue