Sign in to follow this  

D3DDECLUSAGE

This topic is 2079 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

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
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
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

This topic is 2079 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.

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