I was playing around with shaders a little bit and decided to write a shader that can take a completely arbitrary amount of light sources. GLSL doesn't support arbitrarily large arrays, so I made a simple lua script that rewrites the shader whenever it needs to, doubling the amount of light sources it can take. I have always had sort of a fetish for code that writes other pieces of code at runtime
![Neko :neko:](./images/smilies/ms-neko.png)
And it works pretty well! Feel free to try it out!
Controls:
Left click to add a new light source (it appears below the screen and walks upwards, be patient!)
Right click to restart