rickytan / ShaderTestV31

Cocos2d v3.1 Lighting and Blur Shader Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShaderTestV31

Cocos2d v3.1 Lighting and Blur Shader Example

The source is heavily documented on how to create a shader and apply it to a set of sprites. Cocos2d v3.1 changes both the batch node process (deprecated CCSpriteBatchNode in favor of CCNode) and the shader process (new format with new/different default uniforms/attributes). I have not tested this at all for performance and may (most likely) perform horribly on the forsaken first generation Retina iPad (e.g. iPad3,3).

Also, please see the following write-ups which future explain the Blur and Lighting Shader code for cocos2d v3.1+.

http://smashriot.com/dynamic-lighting-shader-with-cocos2d-v2-0/

http://smashriot.com/cocos2d-v2-0-and-shaders/

Jesse from SmashRiot (Twitter: @SmashRiot)

About

Cocos2d v3.1 Lighting and Blur Shader Example


Languages

Language:Objective-C 71.1%Language:C 14.6%Language:M 10.7%Language:C++ 3.6%