pixijs / lights

Adds dynamic lighting via deferred shading to PixiJS
https://pixijs.io/lights/docs/index.html
MIT License
203 stars 29 forks source link

does this work with pixi-spine? #1

Closed mreinstein closed 9 years ago

mreinstein commented 9 years ago

I'm really interested in using this for lighting my character animations produced via spine. Is this currently possible?

englercj commented 9 years ago

Nope, as you can see the way this works right now is patching the render method to support drawing the normal textures in the draw pass:

https://github.com/pixijs/pixi-lights/blob/master/src/lightSpriteMixin.js

Literally only sprites are supported.

mreinstein commented 9 years ago

ah, thanks! I started working on this, referenced it here too https://github.com/pixijs/pixi-spine/issues/47

Any thoughts on how to allow multiple light source contributions? I was thinking about hardcoding 4 uniforms which would allow up to 4 lights I suppose. The other question is how to add the contributions of all lights to the light equation.

englercj commented 9 years ago

I'm not sure I follow, that isn't how deferred lighting works..

mreinstein commented 9 years ago

Yeah I guess just based on the name of this repo, I wasn't aware of the lighting strategy at play. I'll close this issue.