1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 17:39:42 +00:00

shaders - multiply instead of replace alpha in distortion

This commit is contained in:
Cody Glassman 2024-07-19 15:58:49 -07:00
parent a9281b5246
commit 21377ee4f3
2 changed files with 2 additions and 2 deletions

View file

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

View file

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