开发者

Achieving night effect for 2d game using cocos2d

开发者 https://www.devze.com 2023-03-24 05:03 出处:网络
i would like to know if you have any idea how to achieve a night effect without reworking all my images.

i would like to know if you have any idea how to achieve a night effect without reworking all my images. Something exactly like in Tiny Wings for iPhone. Tinting the image in coc开发者_运维百科os2d doesn't do the trick. I guess there might be some combination with opengl blending that might do it, but i haven't had success.

Any ideas?

Thanks!


I ended up placing a blue layer on top and using a multiply effect on it. the blend func is: {GL_DST_COLOR, GL_SRC_COLOR} Here is a blog entry I wrote explaining the process: PlaySnack Blog - Achieving a night effect in Cocos2d.

0

精彩评论

暂无评论...
验证码 换一张
取 消