Hi everyone, iam newbie at cocos2d-x and shader and i have some quesiton. :;qst
*How can i apply more two shader at one CCSprite in cocos2d-x. Example : i want to extract bright, blur the bright parts, and recombine the blurred image with the original image to make bloom effect
*How can i improve my writting shader skill, now, i can only write easy shaders, i can’t do things i want , can you share my your experience
Thanks for reading, sr if my writting english skill so bad
You can’t do that in one pass you need to extract the highlights and render it to a texture. Then render that with a blur (which usually takes an additional two passes).
You can’t do that in one pass you need to extract the highlights and render it to a texture. Then render that with a blur (which usually takes an additional two passes).
Yes, i know this but i don’t know how to apply 2 shader into 1 ccsprite, can you help me?
You can’t do that, but you could create a texture (CCRenderTexture), extracts the bright part then render to that texture, then you can combine those 2 textures
You can’t do that, but you could create a texture (CCRenderTexture), extracts the bright part then render to that texture, then you can combine those 2 textures
Thanks you so much, it worked , one more question, in cocos2d-x,i only can pass float,int and matrix values to shader, how i can pass more two texture into shader to do something like uniform sampler2D diffuseMap; uniform sampler2D lightingMap;