marmots

06-14-2011, 09:01 AM

Is the following a valid conversion(?):

uniform float aNiceFloat[9];

void main()

{

vec3 vA=vec3(aNiceFloat[0]);

vec3 vB=vec3(aNiceFloat[3]);

vec3 vC=vec3(aNiceFloat[6]);

// Do some relevant operations stuff

}

I have not tried using this yet, but I was afraid it might work, but is not allowed somewhere in the spec. I tried searching for an example that shows that this is valid but I did not come across one.

uniform float aNiceFloat[9];

void main()

{

vec3 vA=vec3(aNiceFloat[0]);

vec3 vB=vec3(aNiceFloat[3]);

vec3 vC=vec3(aNiceFloat[6]);

// Do some relevant operations stuff

}

I have not tried using this yet, but I was afraid it might work, but is not allowed somewhere in the spec. I tried searching for an example that shows that this is valid but I did not come across one.