cervus icon indicating copy to clipboard operation
cervus copied to clipboard

MAX_LIGHTS should be dynamic, and equal to number of lights

Open michalbe opened this issue 7 years ago • 0 comments

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).

michalbe avatar Oct 02 '17 20:10 michalbe