Cocos2d v3.1 Lighting and Blur Shader Example
Objective-C C M C++ Mercury
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
SRLightTest.xcodeproj
SRLightTest
README.md
iTunesArtwork
iTunesArtwork@2x

README.md

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)