Sign in to follow this  
Anddos

D3DDECLUSAGE

Recommended Posts

Anddos    588
are these 2 usages for animated meshs?, i am trying to find some source code using these with vertex shader but i am not having much look at all :/ ,all the d3dsdk samples use HLSL .fx files

D3DDECLUSAGE_BLENDWEIGHT, // 1
D3DDECLUSAGE_BLENDINDICES, // 2

Share this post


Link to post
Share on other sites
MJP    19753
Yes, those are typically used for GPU skinning. Blend indices are usually 4 8-bit unsigned integers indicating which bones should be used to transform the vertex, while the blend weights are 4 8-bit integers (reinterpreted as [0, 1] floating point values) that tell you how much each bone affects the vertex. You can look at the SkinnedMesh sample in the SDK for an example.

Share this post


Link to post
Share on other sites
Nik02    4348
Compile the vertex shader using fxc to get corresponding asm listing.

Also, the sample source directory has four assembly versions (for 1 to 4 bones) of the shader with comments.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this