Jump to content
  • Advertisement
Sign in to follow this  
Pertur

GLSL array of arrays attribute

This topic is 2833 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!