I'm writing a Phong shader with multiple lights. I send a uniform array to both vertex and fragment shaders. Let's say one of the arrays is
uniform vec3 lights;
then I loop over it in the program, for example:
and it doesn't work properly.
I've noticed that even
int j=0; vec3 v=lighs[j];
doesn't work ok, while:
What should I do?
*It's a runtime error- The results are not correct
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)