From defffd7a600a61a59d71922643b59ba121a77e4d Mon Sep 17 00:00:00 2001 From: Emile Belanger Date: Sun, 16 May 2021 15:15:01 +0100 Subject: [PATCH] Remove brackets from shader to fix Snapdragon 835 --- wadsrc/static/shaders_gles/glsl/main.fp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/wadsrc/static/shaders_gles/glsl/main.fp b/wadsrc/static/shaders_gles/glsl/main.fp index 7e6b7ac07..92e77eefe 100644 --- a/wadsrc/static/shaders_gles/glsl/main.fp +++ b/wadsrc/static/shaders_gles/glsl/main.fp @@ -285,14 +285,12 @@ float R_DoomLightingEquation(float light) #endif #if (DEF_BUILD_LIGHTING == 1) // gl_lightmode 5: Build software lighting emulation. - { - // This is a lot more primitive than Doom's lighting... - float numShades = float(uPalLightLevels); - float curshade = (1.0 - light) * (numShades - 1.0); - float visibility = max(uGlobVis * uLightFactor * abs(z), 0.0); - float shade = clamp((curshade + visibility), 0.0, numShades - 1.0); - return clamp(shade * uLightDist, 0.0, 1.0); - } + // This is a lot more primitive than Doom's lighting... + float numShades = float(uPalLightLevels); + float curshade = (1.0 - light) * (numShades - 1.0); + float visibility = max(uGlobVis * uLightFactor * abs(z), 0.0); + float shade = clamp((curshade + visibility), 0.0, numShades - 1.0); + return clamp(shade * uLightDist, 0.0, 1.0); #endif float colormap = R_ZDoomColormap(light, z); // ONLY Software mode, vanilla not yet working