I managed to apply blur shader on my CCRenderTexture. But it only works for single-pass shader (in my case only for 1 direction).
/* … after initializing CCGLProgram … **/
In this case my program will draw the horizontally blurred image, the image itself is a composite made from the parallax node.
However if I were to apply vertical blur shader on the same CCRenderTexture object again, it will ignore the previous applied shader, thus my image would end up with only vertical blurring.
Retrieving the CCTexture from the renderTexture right after the begin~~ end block, e.g:
CCTexture2D * texture = renderTexture~~>getSprite->getTexture;
CCSprite** sprite = CCSprite::createWithTexture( texture );
shows that the sprite is still the image before the shader applied on it.
So, how does one approach this ? When and how can I retrieve the texture that already has shader applied on it from the CCRenderTexture ?
Can anyone help me with this ?