Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

HLSL and Tangnet/Bitangent

This topic is 4837 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 have the "Shaders for Game Programmers" Book and am looking at some of the examples using render monkey. I am trying to figure out where the bitangent and tangent vectors are coming from? They aren't calculated in the VS... So does DX automatically calculate them when you add them to the stream mapping box?

Share this post


Link to post
Share on other sites
Advertisement
there are functions in the D3DX library to calculate the Tangent and the rest of that stuff: D3DXComputeTangent is one of them.

so you might find these functions somewhere in the code.

hope that helps.

Share this post


Link to post
Share on other sites
Ok, thats fine, but I am still not following how or where in a HL shader function you get the TANGENT or BINORMAL parameters from Rendermonkey... The streaming map editor allows you to add these variables but how is HLSL getting them from render monkey? I have looked for documentation on this but can't find anything.

Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by MARS_999
Ok, thats fine, but I am still not following how or where in a HL shader function you get the TANGENT or BINORMAL parameters from Rendermonkey... The streaming map editor allows you to add these variables but how is HLSL getting them from render monkey? I have looked for documentation on this but can't find anything.

RenderMonkey generates them, just like you would with D3DXComputeTangent(). Nvidia's FXComposer has similar functionality, as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by circlesoft
Quote:
Original post by MARS_999
Ok, thats fine, but I am still not following how or where in a HL shader function you get the TANGENT or BINORMAL parameters from Rendermonkey... The streaming map editor allows you to add these variables but how is HLSL getting them from render monkey? I have looked for documentation on this but can't find anything.

RenderMonkey generates them, just like you would with D3DXComputeTangent(). Nvidia's FXComposer has similar functionality, as well.


Ok, so how would one get them to a GLSL version? Or is this only available to HLSL??

Share this post


Link to post
Share on other sites
Quote:
Original post by Basiror
search for tantalon it has a description on how to compute the tangent and binormal



Already did that. :) I am just trying to find out if Rendermonkey will compute the tangent/bitangent vectors for GLSL like it apparently does for HLSL...

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!