mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +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
|
||||
gl_FragData[0] = texture2D(diffuseMap, adjustedDiffuseUV);
|
||||
alphaTest();
|
||||
#else
|
||||
gl_FragData[0] = vec4(1.0);
|
||||
#endif
|
||||
|
||||
vec4 diffuseColor = getDiffuseColor();
|
||||
gl_FragData[0].a *= diffuseColor.a;
|
||||
alphaTest();
|
||||
|
||||
#if @detailMap
|
||||
gl_FragData[0].xyz *= texture2D(detailMap, detailMapUV).xyz * 2.0;
|
||||
#endif
|
||||
|
@ -152,10 +155,6 @@ void main()
|
|||
|
||||
#endif
|
||||
|
||||
vec4 diffuseColor = getDiffuseColor();
|
||||
gl_FragData[0].a *= diffuseColor.a;
|
||||
alphaTest();
|
||||
|
||||
float shadowing = unshadowedLightRatio(linearDepth);
|
||||
vec3 lighting;
|
||||
#if !PER_PIXEL_LIGHTING
|
||||
|
|
Loading…
Reference in a new issue