Sign in to follow this  
Followers 0
Endemoniada

DX11
Normal Mapping Upside Down

2 posts in this topic

Hi guys,

 

I'm not sure if I'm calculating my tangents and binormals correctly or if my shader is wrong. Will you please give me some correct vectors for testing.

 

I'm using DirectX coordinates so the x-axis points right, the y-axis up, and the z-axis into the screen.

 

If I have a plane with normal 0,0,1 (pointing straight down the positive z-axis) what will the tangent and binormal be ? And also for a plane with normal -1,0,0 (pointing straight down the negative x-axis).

 

I got the calculations from http://www.rastertek.com/dx11tut20.html in case anyone is interested.

 

Thank you.

 

0

Share this post


Link to post
Share on other sites

Tanget/bitangent vectors need to point in the direction that your U and V texture coordinates are increasing, so it depends on how you setup the texture coordinates of your quad vertices.

1

Share this post


Link to post
Share on other sites

I set the binormal to point down U and the tangent to point down V and it's working nicely now. Thank you.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0