Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

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


Sign up now

Trying to understand tangent/ worldspace

4: Adsense

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   

4963
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

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

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


#2 cozzie   Members   

4963
Like
0Likes
Like

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.