I have a set of lights for each camera mode my application is in. I want to turn off all lights and turn on only the lights I need when the user is using a particular camera.
I am using setEnabled on lights to accomplish this. It seems to work visually but I get an error in the console when I do this:
[.WebGL-000001972D5B7B90] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small.
Reproduced here:
Click on blue and then on green and check console.
Yes totally, it is a conflict in the shader switching from one light to the next. Not on your side at all, I have to fix it but the impact is low, so I have a bit more time (simply emitting the warning) I will try to have it for the week end.