@@ -41,7 +41,7 @@ -(void)setupGlassEffectTest
4141
4242
4343 CCSpriteFrame *normalMap = [CCSpriteFrame frameWithImageNamed: @" Images/ShinyBallNormals.png" ];
44- CCEffectGlass *glass = [[CCEffectGlass alloc ] initWithRefraction: 1 .0f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment normalMap: nil ];
44+ CCEffectGlass *glass = [[CCEffectGlass alloc ] initWithRefraction: 1 .0f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment];
4545 glass.fresnelBias = 0 .1f ;
4646 glass.fresnelPower = 2 .0f ;
4747 glass.refraction = 0 .75f ;
@@ -81,7 +81,7 @@ -(void)setupReflectEffectTest
8181 [self .contentNode addChild: environment];
8282
8383 CCSpriteFrame *normalMap = [CCSpriteFrame frameWithImageNamed: @" Images/ShinyBallNormals.png" ];
84- CCEffectReflection *reflection = [[CCEffectReflection alloc ] initWithEnvironment: environment normalMap: nil ];
84+ CCEffectReflection *reflection = [[CCEffectReflection alloc ] initWithEnvironment: environment];
8585 reflection.fresnelBias = 0 .0f ;
8686 reflection.fresnelPower = 0 .0f ;
8787
@@ -148,7 +148,7 @@ -(void)setupRefractionEffectTest
148148 NSString *sphereTextureFile = @" Images/ShinyBallColor.png" ;
149149 CCTexture *sphereTexture = [CCTexture textureWithFile: sphereTextureFile];
150150 CCSpriteFrame *sphereNormalMap = [CCSpriteFrame frameWithImageNamed: @" Images/ShinyBallNormals.png" ];
151- CCEffectRefraction *sphereRefraction = [[CCEffectRefraction alloc ] initWithRefraction: 0 .1f environment: renderTexture.sprite normalMap: nil ];
151+ CCEffectRefraction *sphereRefraction = [[CCEffectRefraction alloc ] initWithRefraction: 0 .1f environment: renderTexture.sprite];
152152 sphereRefraction.refraction = 0 .75f ;
153153
154154 p1 = CGPointMake (0 .1f , 0 .8f );
@@ -515,9 +515,9 @@ -(void)setupStackTest
515515 [CCEffectPixellate effectWithBlockSize: 8 .0f ],
516516 [CCEffectSaturation effectWithSaturation: -1 .0f ],
517517 [CCEffectHue effectWithHue: 90 .0f ],
518- [CCEffectGlass effectWithRefraction: 0 .5f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment normalMap: nil ],
519- [CCEffectRefraction effectWithRefraction: 0 .5f environment: refractEnvironment normalMap: nil ],
520- [CCEffectReflection effectWithFresnelBias: 0 .2f fresnelPower: 2 .0f environment: reflectEnvironment normalMap: nil ],
518+ [CCEffectGlass effectWithRefraction: 0 .5f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment],
519+ [CCEffectRefraction effectWithRefraction: 0 .5f environment: refractEnvironment],
520+ [CCEffectReflection effectWithFresnelBias: 0 .2f fresnelPower: 2 .0f environment: reflectEnvironment],
521521 ];
522522
523523
@@ -563,9 +563,9 @@ -(void)setupPerformanceTest
563563 [CCEffectPixellate effectWithBlockSize: 4 .0f ],
564564 [CCEffectSaturation effectWithSaturation: -1 .0f ],
565565 [CCEffectHue effectWithHue: 90 .0f ],
566- [CCEffectGlass effectWithRefraction: 0 .5f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment normalMap: nil ],
567- [CCEffectRefraction effectWithRefraction: 0 .5f environment: refractEnvironment normalMap: nil ],
568- [CCEffectReflection effectWithFresnelBias: 0 .1f fresnelPower: 4 .0f environment: reflectEnvironment normalMap: nil ],
566+ [CCEffectGlass effectWithRefraction: 0 .5f refractionEnvironment: refractEnvironment reflectionEnvironment: reflectEnvironment],
567+ [CCEffectRefraction effectWithRefraction: 0 .5f environment: refractEnvironment],
568+ [CCEffectReflection effectWithFresnelBias: 0 .1f fresnelPower: 4 .0f environment: reflectEnvironment],
569569 ];
570570 CCEffect *selectedEffect = allEffects[8 ];
571571
0 commit comments