From 21377ee4f3953e81e13cf345b0149d0b8f7d665b Mon Sep 17 00:00:00 2001 From: Cody Glassman Date: Fri, 19 Jul 2024 15:58:49 -0700 Subject: [PATCH] shaders - multiply instead of replace alpha in distortion --- files/shaders/compatibility/bs/default.frag | 2 +- files/shaders/compatibility/objects.frag | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/shaders/compatibility/bs/default.frag b/files/shaders/compatibility/bs/default.frag index 3c665752d1..5068c01d80 100644 --- a/files/shaders/compatibility/bs/default.frag +++ b/files/shaders/compatibility/bs/default.frag @@ -58,7 +58,7 @@ void main() #if defined(DISTORTION) && DISTORTION vec2 screenCoords = gl_FragCoord.xy / (screenRes * @distorionRTRatio); - gl_FragData[0].a = getDiffuseColor().a; + gl_FragData[0].a *= getDiffuseColor().a; gl_FragData[0] = applyDistortion(gl_FragData[0], distortionStrength, gl_FragCoord.z, texture2D(opaqueDepthTex, screenCoords).x); return; diff --git a/files/shaders/compatibility/objects.frag b/files/shaders/compatibility/objects.frag index 7f163580cc..8bd9664b41 100644 --- a/files/shaders/compatibility/objects.frag +++ b/files/shaders/compatibility/objects.frag @@ -142,7 +142,7 @@ vec2 screenCoords = gl_FragCoord.xy / screenRes; gl_FragData[0] = texture2D(diffuseMap, diffuseMapUV + offset); #if defined(DISTORTION) && DISTORTION - gl_FragData[0].a = getDiffuseColor().a; + gl_FragData[0].a *= getDiffuseColor().a; gl_FragData[0] = applyDistortion(gl_FragData[0], distortionStrength, gl_FragCoord.z, texture2D(opaqueDepthTex, screenCoords / @distorionRTRatio).x); return; #endif