diff --git a/src/Renderer/Shader/Chunk/fog_fragment.glsl b/src/Renderer/Shader/Chunk/fog_fragment.glsl index 35ce4a8def..2bf82b2d8c 100644 --- a/src/Renderer/Shader/Chunk/fog_fragment.glsl +++ b/src/Renderer/Shader/Chunk/fog_fragment.glsl @@ -1,4 +1,4 @@ #if defined(USE_FOG) - float fogFactor = 1. - min( exp(-fogDepth / fogDistance), 1.); + float fogFactor = 1. - min( exp(-vFogDepth / fogDistance), 1.); gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor); #endif diff --git a/src/Renderer/Shader/Chunk/fog_pars_fragment.glsl b/src/Renderer/Shader/Chunk/fog_pars_fragment.glsl index b2b8f1e485..84f70743b6 100644 --- a/src/Renderer/Shader/Chunk/fog_pars_fragment.glsl +++ b/src/Renderer/Shader/Chunk/fog_pars_fragment.glsl @@ -1,5 +1,5 @@ #if defined(USE_FOG) uniform vec3 fogColor; uniform float fogDistance; -varying float fogDepth; +varying float vFogDepth; #endif