From 8d3d271484b42d40a9116993ac88d9ce84e130f6 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 21 Jul 2017 18:45:08 -0400 Subject: [PATCH] - tweaked the banded software lightmode shader a bit more, looks a little closer (but still not quite...) to real ZDoom in paletted mode --- wadsrc/static/shaders/glsl/main.fp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index d3fd31882..2fb762bad 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -122,7 +122,7 @@ float R_DoomLightingEquation(float light) float shade = 2.0 - (L + 12.0) / 128.0; float lightscale; if ((uPalLightLevels & 0xff) != 0) - lightscale = float(-int(-(shade - vis) * 32.0)) / 32.0; + lightscale = float(-floor(-(shade - vis) * 31.0) - 0.5) / 31.0; else lightscale = shade - vis;