Jump to content
  • Advertisement
Sign in to follow this  
AstAnDK

Direct3D 9 Tangent Data

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

Hi I bet I am not the first one who asks the question but I could not find the information I needed, although I searched for hours. How do I have to modify my FVF to store tangent and binormal data and how do I bind this data to the semantics TANGENT and BINORMAL? This is my current vertex format:
D3DFVF_XYZW|D3DFVF_NORMAL|D3DFVF_TEX1
Now this is my attempt to add the data:
D3DFVF_XYZW|D3DFVF_NORMAL|D3DFVF_TEX3|D3DFVF_TEXCOORDSIZE2(0)|D3DFVF_TEXCOORDSIZE3(1)|D3DFVF_TEXCOORDSIZE3(2)
Well, it's not working. I also don't know how to bind the data: e.g. TEXCOORD1 -> BINORMAL, TEXCOORD2 -> TANGENT Thanks for reading Daniel

Share this post


Link to post
Share on other sites
Advertisement
You're going to want to switch from using FVFs (which are converted to a VertexDeclaration on the IDirect3D9Device::SetFVF call anyway) to using Vertex Declarations, which allow you to specify vertex data in a format that cannot be represented by a FVF.

Share this post


Link to post
Share on other sites
What mhamlin said is correct - you need to be using vertex declarations with the programmable pipeline. FVF's are more a legacy/fixed-function thing.

hth
Jack

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!