diff --git a/wadsrc/static/shaders/scene/frag_main.glsl b/wadsrc/static/shaders/scene/frag_main.glsl index 71f714438..6fe89fe10 100644 --- a/wadsrc/static/shaders/scene/frag_main.glsl +++ b/wadsrc/static/shaders/scene/frag_main.glsl @@ -28,7 +28,7 @@ void main() #endif #ifdef USE_DEPTHFADEFALLOFF - float behindFragmentDepth = texelFetch(LinearDepth, ivec2(gl_FragCoord.xy), 0); + float behindFragmentDepth = texelFetch(LinearDepth, ivec2(gl_FragCoord.xy), 0).r; material.Base.a *= clamp((behindFragmentDepth - pixelpos.w) / uDepthFadeFalloff, 0.0, 1.0); #endif