mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 22:09:42 +00:00
shaders - multiply instead of replace alpha in distortion
This commit is contained in:
parent
a9281b5246
commit
21377ee4f3
2 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ void main()
|
||||||
|
|
||||||
#if defined(DISTORTION) && DISTORTION
|
#if defined(DISTORTION) && DISTORTION
|
||||||
vec2 screenCoords = gl_FragCoord.xy / (screenRes * @distorionRTRatio);
|
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);
|
gl_FragData[0] = applyDistortion(gl_FragData[0], distortionStrength, gl_FragCoord.z, texture2D(opaqueDepthTex, screenCoords).x);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -142,7 +142,7 @@ vec2 screenCoords = gl_FragCoord.xy / screenRes;
|
||||||
gl_FragData[0] = texture2D(diffuseMap, diffuseMapUV + offset);
|
gl_FragData[0] = texture2D(diffuseMap, diffuseMapUV + offset);
|
||||||
|
|
||||||
#if defined(DISTORTION) && DISTORTION
|
#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);
|
gl_FragData[0] = applyDistortion(gl_FragData[0], distortionStrength, gl_FragCoord.z, texture2D(opaqueDepthTex, screenCoords / @distorionRTRatio).x);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue