mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 11:39:44 +00:00
Address shader issues pointed out by AnyOldName3
This commit is contained in:
parent
11694ba87f
commit
9834fd51af
1 changed files with 6 additions and 4 deletions
|
@ -127,16 +127,18 @@ void main()
|
||||||
|
|
||||||
vec4 diffuseColor = getDiffuseColor();
|
vec4 diffuseColor = getDiffuseColor();
|
||||||
gl_FragData[0].a *= diffuseColor.a;
|
gl_FragData[0].a *= diffuseColor.a;
|
||||||
|
|
||||||
|
#if @darkMap
|
||||||
|
gl_FragData[0] *= texture2D(darkMap, darkMapUV);
|
||||||
|
gl_FragData[0].a *= coveragePreservingAlphaScale(darkMap, darkMapUV);
|
||||||
|
#endif
|
||||||
|
|
||||||
alphaTest();
|
alphaTest();
|
||||||
|
|
||||||
#if @detailMap
|
#if @detailMap
|
||||||
gl_FragData[0].xyz *= texture2D(detailMap, detailMapUV).xyz * 2.0;
|
gl_FragData[0].xyz *= texture2D(detailMap, detailMapUV).xyz * 2.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if @darkMap
|
|
||||||
gl_FragData[0] *= texture2D(darkMap, darkMapUV);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if @decalMap
|
#if @decalMap
|
||||||
vec4 decalTex = texture2D(decalMap, decalMapUV);
|
vec4 decalTex = texture2D(decalMap, decalMapUV);
|
||||||
gl_FragData[0].xyz = mix(gl_FragData[0].xyz, decalTex.xyz, decalTex.a);
|
gl_FragData[0].xyz = mix(gl_FragData[0].xyz, decalTex.xyz, decalTex.a);
|
||||||
|
|
Loading…
Reference in a new issue