What does the [] operator do when accessing the vec4 attribute?
attribute vec4 a_MatrixWeights;
...
foo(float weight);
...
void main()
{
foo(a_MatrixWeights[0]);
foo(a_MatrixWeights[1]);
foo(a_MatrixWeights[2]);
foo(a_MatrixWeights[3]);
}
Is this accessing the individual vec4 fields (.x, .y, .z, .w) or is it somehow handling vec4 and the vec4 array and doing something else?
source
share