diff --git a/src/gl/scene/gl_decal.cpp b/src/gl/scene/gl_decal.cpp index 651cb7aa9d..7fb680f8e0 100644 --- a/src/gl/scene/gl_decal.cpp +++ b/src/gl/scene/gl_decal.cpp @@ -316,6 +316,8 @@ void GLWall::DrawDecal(DBaseDecal *decal) gl_RenderState.SetFog(0,-1); } + gl_RenderState.SetNormal(glseg.Normal()); + FQuadDrawer qd; for (i = 0; i < 4; i++) { diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index e26b2fd4a3..5ab9f11188 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -287,7 +287,7 @@ vec3 AmbientOcclusionColor() } else { - fogdist = max(16.0, length(pixelpos.xyz)); + fogdist = max(16.0, distance(pixelpos.xyz, uCameraPos.xyz)); } fogfactor = exp2 (uFogDensity * fogdist);