1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-15 22:21:00 +00:00

Merge branch 'hellodarkmapsmyoldfriend' into 'master'

Address shader issues pointed out by AnyOldName3

See merge request OpenMW/openmw!1069
This commit is contained in:
psi29a 2021-07-30 09:23:21 +00:00
commit c150724f31

View File

@ -127,16 +127,18 @@ void main()
vec4 diffuseColor = getDiffuseColor();
gl_FragData[0].a *= diffuseColor.a;
#if @darkMap
gl_FragData[0] *= texture2D(darkMap, darkMapUV);
gl_FragData[0].a *= coveragePreservingAlphaScale(darkMap, darkMapUV);
#endif
alphaTest();
#if @detailMap
gl_FragData[0].xyz *= texture2D(detailMap, detailMapUV).xyz * 2.0;
#endif
#if @darkMap
gl_FragData[0] *= texture2D(darkMap, darkMapUV);
#endif
#if @decalMap
vec4 decalTex = texture2D(decalMap, decalMapUV);
gl_FragData[0].xyz = mix(gl_FragData[0].xyz, decalTex.xyz, decalTex.a);