Hi everyone,
I want to do skinning for animations on the gpu in a shader. To draw, I am
using an indexed vertex list (through batch.add_indexed) and then draw the
batch. If I understand correctly I can attach some generic data to my
vertices (in addition to vertex data, normals etc.), so what I did is the
following:
self.vertex_list = batch.add_indexed(
length, self.mode, group,
indices, *[('v3f/dynamic', self.verts),
('n3f/dynamic', self.norms),
('c4f/static', self.color * length),
('4g4f/static', weights), ('5g1i/static', w_lens),
('6g4i/static', w_bone_ids)])
Only now I'm stuck when it comes to accessing this data in the shader
program. I tried
layout(location = 4) in vec4 weights;
layout(location = 5) in int count;
layout(location = 6) in ivec4 bone_ids;
but this doesn't seem to work.
What's the correct way to do this?
Best
Tobias
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.