File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ -(void)buildFragmentFunctions
76
76
{
77
77
self.fragmentFunctions = [[NSMutableArray alloc ] init ];
78
78
79
- CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
79
+ CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" cc_FragColor * texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
80
80
81
81
NSString * effectBody = CC_GLSL (
82
82
// Index the normal map and expand the color value from [0..1] to [-1..1]
@@ -128,7 +128,7 @@ -(void)buildFragmentFunctions
128
128
129
129
130
130
// Compute the combination of the sprite's color and texture.
131
- vec4 primaryColor = cc_FragColor * texture2D (cc_MainTexture, cc_FragTexCoord1) ;
131
+ vec4 primaryColor = inputValue ;
132
132
133
133
// If the refracted texture coordinates are within the bounds of the environment map
134
134
// blend the primary color with the refracted environment. Multiplying by the normal
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ -(void)buildFragmentFunctions
64
64
{
65
65
self.fragmentFunctions = [[NSMutableArray alloc ] init ];
66
66
67
- CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
67
+ CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" cc_FragColor * texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
68
68
69
69
NSString * effectBody = CC_GLSL (
70
70
// Compute environment space texture coordinates from the screen space
@@ -92,7 +92,7 @@ -(void)buildFragmentFunctions
92
92
reflectTexCoords.y = (1.0 - cos (reflectTexCoords.y * M_PI)) * 0.5 ;
93
93
94
94
// Compute the combination of the sprite's color and texture.
95
- vec4 primaryColor = cc_FragColor * texture2D (cc_MainTexture, cc_FragTexCoord1) ;
95
+ vec4 primaryColor = inputValue ;
96
96
97
97
float fresnel = max (u_fresnelBias + (1.0 - u_fresnelBias) * pow ((1.0 - nDotV), u_fresnelPower), 0.0 );;
98
98
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ -(void)buildFragmentFunctions
63
63
{
64
64
self.fragmentFunctions = [[NSMutableArray alloc ] init ];
65
65
66
- CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
66
+ CCEffectFunctionInput *input = [[CCEffectFunctionInput alloc ] initWithType: @" vec4" name: @" inputValue" snippet: @" cc_FragColor * texture2D(cc_PreviousPassTexture, cc_FragTexCoord1)" ];
67
67
68
68
NSString * effectBody = CC_GLSL (
69
69
// Compute environment space texture coordinates from the screen space
@@ -89,7 +89,7 @@ -(void)buildFragmentFunctions
89
89
float inBounds = step (0.0 , min (compare.x , compare.y ));
90
90
91
91
// Compute the combination of the sprite's color and texture.
92
- vec4 primaryColor = cc_FragColor * texture2D (cc_MainTexture, cc_FragTexCoord1) ;
92
+ vec4 primaryColor = inputValue ;
93
93
94
94
// If the refracted texture coordinates are within the bounds of the environment map
95
95
// blend the primary color with the refracted environment. Multiplying by the normal
You can’t perform that action at this time.
0 commit comments