The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

GLSL uniform array names?

My understanding of GLSL uniform arrays is that they should be identifiable by both the name along, and the name along with the array index in brackets. For example, if I had this uniform array in my shader:

Code :

uniform float lightrange[4];

Then according to the spec, my program should be able to set the array, or parts of the array, with any of the following uniform names:

Code :

lightrange
lightrange[0]
lightrange[1]
lightrange[2]
lightrange[3]

I ask because it appears iOS would only recognize "lighttange[0]" while Samsung's stuff only recognizes "lightrange".

My understanding of GLSL uniform arrays is that they should be identifiable by both the name along, and the name along with the array index in brackets. For example, if I had this uniform array in my shader:

Code :

uniform float lightrange[4];

Then according to the spec, my program should be able to set the array, or parts of the array, with any of the following uniform names:

Code :

lightrange
lightrange[0]
lightrange[1]
lightrange[2]
lightrange[3]

I ask because it appears iOS would only recognize "lighttange[0]" while Samsung's stuff only recognizes "lightrange".