Jump to content
  • Advertisement
Sign in to follow this  
Anddos

D3DDECLUSAGE

This topic is 2438 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!