mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 15:51:45 +00:00
Cap dynamic light intensity / brightness to 3.
Without capping the brightness entity models may fade into pure white which looks ugly. This can be seen when several flyer fire blaster bolds onto the player or when multiple barrels are exploding. This change was suggest by @DanielGibson, I'm just the messenger.
This commit is contained in:
parent
b124d0cada
commit
0314eafdaa
1 changed files with 1 additions and 3 deletions
|
@ -617,9 +617,7 @@ static const char* fragmentSrcAlias = MULTILINE_STRING(
|
|||
// apply gamma correction and intensity
|
||||
texel.rgb *= intensity;
|
||||
texel.a *= alpha; // is alpha even used here?
|
||||
|
||||
// TODO: is this really equivalent to GL_MODULATE's behavior of texture vs glColor()?
|
||||
texel *= passColor;
|
||||
texel *= min(vec4(3.0), passColor);
|
||||
|
||||
outColor.rgb = pow(texel.rgb, vec3(gamma));
|
||||
outColor.a = texel.a; // I think alpha shouldn't be modified by gamma and intensity
|
||||
|
|
Loading…
Reference in a new issue