Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Lupin

Binormal and tangent w/ D3D8

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

I''m wondering how I could set up my vertex format to have binormal and tangent vector in it because in D3D8 there''s no option for these. I noticed that there''s an D3DVSDE_POSITION2 and D3DVSDE_NORMAL2 constant and I thought I could use it for my binormal and tangent vector, but it doesn''t work probably... perhaps it''s because of the order of my vertex elements? What order do I have to use (I just want Position, normal, position2, normal2, texture - I tried it in this order but it didn''t work)

Share this post


Link to post
Share on other sites
Advertisement
this is what i did:
DWORD myFVF=D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1|D3DFVF_TEXCOORDSIZE3(2);
ma[j]->Init(eng->g_pd3dDevice,D3DPT_TRIANGLELIST,myFVF,sizeof(float)*(3+3+2+3),nVert,nInd*3,0);
ma[j]->SetValues(0,vertex);
ma[j]->SetValues(sizeof(float)*3,normal);
ma[j]->SetValues(sizeof(float)*(3+3),texture);
ma[j]->SetValues(sizeof(float)*(3+3+2),T);
calculate S from T & normal on the fly

Share this post


Link to post
Share on other sites

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