# skinning indexing

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

## Recommended Posts

Well, I've got static models in my engine now and i fully intend to add skeletal animation as well as skinning. I'm away from a compiler atm but i'm still hacking away since I can compile and debug once i get home. But i was curious, iirc integer indices are new to GLSL. Like, as a vertex attribute, having the "bone index" attribute be an integer could be slower (because it could fall back to sofware possibly) is this true? or am i just crazy? Should i use a floating point index instead? thanks -Dan

cheers
-Dan

##### Share on other sites
So, at the moment, you've got something like this:
class Vertex{       // vertex stuff - pos, normal, etc       int boneIndex;};

Where the boneIndex specifies which bone the vertex needs to be transformed by?

The bone should have a list of vertices instead of vice-versa, and you can't have a float as an index.

So, a vertex can only be transformed by bone 0, or bone 1, or bone 2. It can't be transformed by bone 2.345. So, even if you'll be restricting the float to whole numbers (eg. 2.000), why bother?

##### Share on other sites
Yes, that's essentially what I have. However, it was my understanding that using floats as an index was common, or at least i had run across it a couple of times, and i thought i remembered hearing that integer support in shaders was weak (at some point) so i thought that the floating point indices might have been a reflection of that.

thanks
-Dan

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
16
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002294
×