mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-06 10:11:32 +00:00
Do all alpha testing early and only once
This commit is contained in:
parent
5e004356a2
commit
54d465e3dc
1 changed files with 4 additions and 5 deletions
|
@ -109,11 +109,14 @@ void main()
|
||||||
|
|
||||||
#if @diffuseMap
|
#if @diffuseMap
|
||||||
gl_FragData[0] = texture2D(diffuseMap, adjustedDiffuseUV);
|
gl_FragData[0] = texture2D(diffuseMap, adjustedDiffuseUV);
|
||||||
alphaTest();
|
|
||||||
#else
|
#else
|
||||||
gl_FragData[0] = vec4(1.0);
|
gl_FragData[0] = vec4(1.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
vec4 diffuseColor = getDiffuseColor();
|
||||||
|
gl_FragData[0].a *= diffuseColor.a;
|
||||||
|
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
|
||||||
|
@ -152,10 +155,6 @@ void main()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec4 diffuseColor = getDiffuseColor();
|
|
||||||
gl_FragData[0].a *= diffuseColor.a;
|
|
||||||
alphaTest();
|
|
||||||
|
|
||||||
float shadowing = unshadowedLightRatio(linearDepth);
|
float shadowing = unshadowedLightRatio(linearDepth);
|
||||||
vec3 lighting;
|
vec3 lighting;
|
||||||
#if !PER_PIXEL_LIGHTING
|
#if !PER_PIXEL_LIGHTING
|
||||||
|
|
Loading…
Reference in a new issue