diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index 67ba2d368..b577ca8ab 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -502,6 +502,7 @@ void displayrooms(int snum, double smoothratio) if (sect < 0 || sect >= MAXSECTORS) return; GLInterface.SetMapFog(fogactive != 0); + if (fogactive) hw_int_useindexedcolortextures = false; dointerpolations(smoothratio); setgamepalette(BASEPAL); @@ -672,6 +673,7 @@ void displayrooms(int snum, double smoothratio) } else p->visibility = ud.const_visibility; } + if (fogactive) hw_int_useindexedcolortextures = hw_useindexedcolortextures; } bool GameInterface::GenerateSavePic() diff --git a/wadsrc/static/shaders/glsl/func_paletted.fp b/wadsrc/static/shaders/glsl/func_paletted.fp index a9a4cca86..0b37ece06 100644 --- a/wadsrc/static/shaders/glsl/func_paletted.fp +++ b/wadsrc/static/shaders/glsl/func_paletted.fp @@ -54,11 +54,6 @@ vec4 ProcessTexel() palettedColor.a = color.r == 0.0? 0.0 : 1.0;// 1.0-floor(color.r); color = palettedColor; - if (uFogDensity != 0.0) // fog hack for RRRA E2L1. Needs to be done better, this is gross, but still preferable to the broken original implementation. - { - float fogfactor = 0.55 + 0.3 * exp2 (uFogDensity * abs(z) / 1024.0); - 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, 1.0); }