Imagination PowerVR SDK Blog

GLSL array of structures


#1

I was trying to pass my light params as an array of uniform structures. This it seems is supported by shader compiler/linker as I wasn’t getting any errors when trying to retrieve the uniform locations, but it was causing all kinds of undefined behavior. Breaking up the array of structures into separate arrays for each member has solved all of the instability problems. Is this a known issue? I remember I had a similar problem with GLSL years ago that eventually lead me to use Cg.   


#2

It should be supported. On which platform/hardware were you trying to run this?



#3

iPad 4.2.