From this page: http://digitallybold.com/314/cocos2d-additive-sprite-color-tinting
http://i.imgur.com/9EGfQ.png(from 0 - 255)
I would use the blog post I linked, but it’s written for cocos2d-iphone, and it uses OpenGL ES 1.0, not 2.0.
Is there any way to do this?
Haven’t checked the blog but by just looking at the picture I think you could achieve the same effect by overlaying the image with a completely solid color sprite and adjust its alpha value.
Well, yeah, but I’m wondering if there was a way to do it with shaders or something, or would that just not be worth it. (It’s also easier to just tint the sprite, rather than making one for each sprite).
Can CCTintTo meet your requirement? If not, shaders can do it
I don’t think CCTintTo can, as it just does subtractive blending (as far as I know).
How would I use a shader to make this effect?
Hi Sam!,Currently, I’m trying to do the same, did you implement this?Thank you.
This is a good tutorial about a Color Shader : http://www.lighthouse3d.com/tutorials/glsl-tutorial/color-shader/Generally the whole tutorial section about shaders is quite good and thouroughly explained. Unfortunatelly it is aimed at the PC version of OpenGL and I don’t know how well it will transalte into OpenGL ES.