From f67547574ba6f11f8e52ceba614992ca953aae4a Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 29 Aug 2014 02:39:37 -0500 Subject: Fix 6155: OpenGL2: some shader stages remains visible through fog volumes Fix CalcFog in generic_vp.glsl to fog fogged surfaces. Now it's the same as CalcFog in fogpass_vp.glsl. Fixes shaders that use adjustColorsForFog. Impact wallmarks, blood sprites, flame textures and so on. --- src/renderergl2/glsl/generic_vp.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/renderergl2') diff --git a/src/renderergl2/glsl/generic_vp.glsl b/src/renderergl2/glsl/generic_vp.glsl index 0e5b38b4..8543ffd7 100644 --- a/src/renderergl2/glsl/generic_vp.glsl +++ b/src/renderergl2/glsl/generic_vp.glsl @@ -193,7 +193,7 @@ float CalcFog(vec3 position) float t = dot(vec4(position, 1.0), u_FogDepth); float eyeOutside = float(u_FogEyeT < 0.0); - float fogged = float(t < eyeOutside); + float fogged = float(t >= eyeOutside); t += 1e-6; t *= fogged / (t - u_FogEyeT * eyeOutside); -- cgit