Jump to content

  • Log In with Google      Sign In   
  • Create Account

Trying to understand tangent/ worldspace


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 cozzie   Members   -  Reputation: 1611

Like
0Likes
Like

Posted 29 January 2014 - 05:04 PM

Hi,
I'm trying to fully understand my normal mapping implementation (HLSL), but there's one thing I just cant figure out.

- I have light vectors in worldspace
- before I used normal mapping, I believe my lighting calculations were done in world space
- in my normal mapping vertex shader I make a matrix for transforming coordinate space, using normal, binormal and tangent vectors
- in the pixel shader I retrieve the normal map normal and multiply it by the matrix above

I believe this means my normalmap normal is transformed from tangent space to world space, so all my lighting calculations are in 1 coordinate space: worldspace.

So far so good.
But... Why is the matrix I described almost always called worldtotangentspace, when it's used to transform tangent space normal map normals into world space? (so shouldn't it be tangenttoworldspace)

Is my theory/ are my assumptions right or am I overseeing something?

Ps: the matrix is formed by multiplying normal, binormal and tangent with the objects world matrix

Sponsor:

#2 cozzie   Members   -  Reputation: 1611

Like
0Likes
Like

Posted 30 January 2014 - 02:33 PM

anyone?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS