diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index faa2ff0e3..b10c99a17 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -141,8 +141,8 @@ float R_DoomLightingEquation(float light) /* The zdoom light equation */ float vis = globVis / z; - float shade = 64.0 - (L + 12) * 32.0/128.0; - float lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31/32.0); + float shade = 64.0 - (L + 12.0) * 32.0/128.0; + float lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); // Result is the normalized colormap index (0 bright .. 1 dark) return lightscale;