• Advertisement
Sign in to follow this  

GLSL array of arrays attribute

This topic is 2651 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is possible to declare an attribute of arrays in vertex shaider?
Like this:

attribute vec4 weights[12];

void main( void )
{
vec4 w = weights[2] + weights[6];
....
}

I have not found anything to tell me ...

Share this post


Link to post
Share on other sites
Advertisement
IIRC I don't believe its possible to have an array of attributes. Arrays of uniforms yes, but not for attribs.

Also just a semantic note, you don't really have 'arrays of arrays', but rather an 'array of vec4'. A vec4 is not an array, but a primitive datatype in glsl.

Share this post


Link to post
Share on other sites
Quote:
Original post by karwosts
IIRC I don't believe its possible to have an array of attributes. Arrays of uniforms yes, but not for attribs.

Also just a semantic note, you don't really have 'arrays of arrays', but rather an 'array of vec4'. A vec4 is not an array, but a primitive datatype in glsl.


Ok, thanks for the clarification.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement