Skip to content

Commit a33f8d2

Browse files
author
Thayer J Andrews
committed
CCEffectLighting - Disable lighting if the primary color or the normal map are transparent
1 parent 8d03f01 commit a33f8d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/CCEffectLighting.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ +(NSMutableArray *)buildFragmentFunctionsWithLights:(NSArray*)lights andSpecular
106106
vec4 normalMap = texture2D(cc_NormalMapTexture, cc_FragTexCoord2);
107107
vec3 tangentSpaceNormal = normalize(normalMap.xyz * 2.0 - 1.0);
108108

109-
if (normalMap.a == 0.0)
109+
if ((inputValue.a * normalMap.a) == 0.0)
110110
{
111111
return vec4(0,0,0,0);
112112
}

0 commit comments

Comments
 (0)