View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# 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.

### #1cozzie  Members

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

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

### #2cozzie  Members

Posted 30 January 2014 - 02:33 PM

anyone?

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

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.