skinning indexing
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
So, at the moment, you've got something like this:
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?
Was this what you were talking about?
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?
Was this what you were talking about?
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
thanks
-Dan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement