From 314f8fee49df3b4c11f7fa9a2cdc89b135a30c4d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 Feb 2020 18:10:38 +0100 Subject: [PATCH] - clamp added brightness by brightmaps to a light level of 1.0. --- wadsrc/static/engine/shaders/glsl/polymost.fp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/engine/shaders/glsl/polymost.fp b/wadsrc/static/engine/shaders/glsl/polymost.fp index eacde0db7..562ffc80c 100644 --- a/wadsrc/static/engine/shaders/glsl/polymost.fp +++ b/wadsrc/static/engine/shaders/glsl/polymost.fp @@ -214,7 +214,7 @@ void main() if ((u_flags & RF_Brightmapping) != 0) { - lightcolor += texture(s_brightmap, v_texCoord.xy).rgb; + lightcolor = clamp(lightcolor + texture(s_brightmap, v_texCoord.xy).rgb, 0.0, 1.0); } color.rgb *= lightcolor; color.rgb += u_fogColor.rgb * shade;