Jump to content
  • Advertisement
Sign in to follow this  
barfy

What's up with D3DXComputeTangent()?

This topic is 4800 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 not sure why D3DXComputeTangent gives downright strange results when calculating the tangent and binormal (aka bitangent) basis vectors for each vertex. With a standard bump-mapped mesh with diffuse and specular lighting, and 1 point light source in the direction of the camera, this is what I got with my own ComputeTangent fn: And this is what happens when I use D3DXComputeTangent: Note the incorrect shadowing and specular highlights on the circular bumps with D3D's fn. I was wondering whether anyone else has run into this same problem with D3DXComputeTangent?

Share this post


Link to post
Share on other sites
Advertisement
This is kind of a wild guess, but it looks like the bumps in the second shot are inverted to being dips.

-Mezz

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
D3DXComputeTangent calls D3DXComputeTangentFrameEx with arguments that will never fail.

Try D3DXComputeTangentFrameEx() to get better results.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Also the WRAP_U, WRAP_V, WRAP_UV flags are VERY misleading....try it again without those flags.

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!