libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
256 stars 81 forks source link

Ability to specify custom shaders #51

Closed piotr-j closed 9 years ago

piotr-j commented 9 years ago

Currently, all shaders are hardcoded in the library. There is no way of altering them without running from the source. I propose adding a map with shader type and ShaderProgram to the RayHandler and setters so they can be changed during runtime. This is easy enough to implement. The main problem would be support for extra uniforms, as it would complicate the code a bit. Ill submit pull request with implementation sometime soonish.

My end goal is to update shaders to support some sort of normal maps. What do you think?