1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 18:40:16 +00:00

Address shader issues pointed out by AnyOldName3

This commit is contained in:
Alexei Dobrohotov 2021-07-29 22:28:05 +03:00
parent 11694ba87f
commit 9834fd51af

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