cervus
cervus copied to clipboard
MAX_LIGHTS should be dynamic, and equal to number of lights
RIght now, in the fragment ubershader we're setting max number of lights to 100
. And because there is a maximum number of uniforms limited by the GPU, this should be dynamic. There are probably two simple ways of solving this:
- user specified max number of lights, passed for instance to the
Game
constructor - counting number of lights and recompiling shader each time the number changed (since this should happen for all the material instances, I would vote the first one).