cocos2d-x-dynamic-lighting-example
cocos2d-x-dynamic-lighting-example copied to clipboard
Multiple light sources?
It looks like this only supports one light source out of the box.
Not sure here but if LightEffect::prepareForRender() was rewritten to somehow work with several light positions instead of just one, that could work? Any other pitfalls? Does the shader itself need to be updated?
did u get Multiple lights work if yes can u share the code .
No I didn't really try anything more, yet. I think the shader needs to change for that.
2016/04/18 6:09$B!"(BKotaiba Jabkji [email protected] $B$N%a%C%;!<%8(B:
did u get Multiple lights work if yes can u share the code .
$B!=(B You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub
It's just because the configuration limit. Check these lines in CCConfiguration.cpp
58. , _maxDirLightInShader(1)
59. , _maxPointLightInShader(1)
60. , _maxSpotLightInShader(1)
Is this fixed? How can I display multiple lights?