Trying to manage a set of lights per camera view (getting WebGL error : GL_INVALID_OPERATION)

Hi Everyone,

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.

Adding @sebavan to see if he has a few cycles

Yup the issue is linked to parallel shader compilation so no worries it won t impact but I ll try to fix it ASAP.

Alright thanks, so what Iā€™m doing is legal?

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.


PR is up fix will be in the next nightly