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.
This commit is contained in:
Zack Middleton 2014-08-29 02:39:37 -05:00
parent de3062623a
commit c621589157
1 changed files with 1 additions and 1 deletions

View File

@ -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);