1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 00:39:58 +00:00

Merge branch 'distorion_alpha_diffuse' into 'master'

Do not replace alpha in distortion shaders

See merge request OpenMW/openmw!4259
This commit is contained in:
Alexei Kotov 2024-07-20 22:21:25 +00:00
commit f65f9c15f9
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