GLSL compile error when accessing an array with compile-time constant index
- by Benlitz
I have this shader that works well on my computer (using an ATI HD 5700). I have a loop iterating between two constant values, which is, afaik, acceptable in a glsl shader. I write stuff in two arrays in this loop.
#define NB_POINT_LIGHT 2
...
varying vec3 vVertToLight[NB_POINT_LIGHT];
varying vec3 vVertToLightWS[NB_POINT_LIGHT];
...
void…