I'm playing with custom fragment shaders for a CCSprite (see http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0).
But I can't figure out why I get a white color whith the following line:
gl_FragColor = vec4(1.0,1.0,1.0,0.0);
Whereas I have a transparent color with this:
gl_FragColor = vec4(0.0,0.0,0.0,0.0);
Shouln't I have a transparent sprite in both cases ? (alpha channel is null, right ?)