Open grapereader opened 9 years ago
Oh look, they already have work on it.
https://github.com/pixijs/pixi-lights
No commits since 20 days ago though. :/
Found some normal mapping software; it's supposed to be an open source alternative to CrazyBump I guess... https://github.com/kmkolasinski/AwesomeBump
Didn't use pixi-lights. We get our own in-house lighting solution huzzah.
Only thing left is the walls. Which will be a little tricky since they technically aren't lit under the current system. They might need their own shaders...
Walls are now lit and lighting should be pretty much done.
Only thing left to do is optimize the shit out of it. The getIntersections method for creating the shadow polygon is very slow, taking upwards of 20ms every frame. Also, the lighting limit right now would be around 4-5 lights, which is abysmal, since a bunch of uniforms are used to send the polygon to the GPU.
I'll probably have to write a deferred lighting system so that we can have more lights. Those are pretty complicated and I have no idea how to interface it with Pixi.
It looks like Pixi should be on the verge of introducing a lighting system soon, so I might not have to write one after all.
https://github.com/GoodBoyDigital/pixi.js/issues/1809
I'll play it by ear I guess. Depends on how long they take.
Making this issue so I can track both my progress and theirs.