From 0461acfc8ba5a9aca1d8b0f4c5fc1460641c1803 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 21 Sep 2020 21:17:23 +0200 Subject: [PATCH] - removed the brightness fudging in the palette emulation shader and always return an alpha of 1. The fudging was only needed because fog was still applied on top of the palette emulation so after completely disabling the true color distance attenuation in palette mode it made the image too bright. The alpha needs to be 1 because this is only the texel, not the combined color. --- wadsrc/static/shaders/glsl/func_paletted.fp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/glsl/func_paletted.fp b/wadsrc/static/shaders/glsl/func_paletted.fp index b47dacb7c..1be496917 100644 --- a/wadsrc/static/shaders/glsl/func_paletted.fp +++ b/wadsrc/static/shaders/glsl/func_paletted.fp @@ -60,5 +60,5 @@ vec4 ProcessTexel() color.rgb = uFogColor.rgb * (1.0-fogfactor) + color.rgb * fogfactor;// mix(vec3(0.6), color.rgb, fogfactor); } if (color.a < uAlphaThreshold) discard; // it's only here that we have the alpha value available to be able to perform the alpha test. - return vec4(color.rgb / 0.85, vColor.a); + return vec4(color.rgb, 1.0); }