Jump to content
• Advertisement

# point vector to texture space

This topic is 3178 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

hello, I wonder, is it possible to transform an object space point vector by a tangent matrix to texture space? Becouse I have heard that tangent matrix only rotates direction vectors. I would like to move an object space position vector to 3dimensional texture space. It is becouse I would like to then subtract [u,v,0] point from it thus have a very precise light direction vector. I also do not very well understand interpolators on vertex output-> pixel input transfer. In general you set the light direction in vertex shader but direction is different for every pixel on the triangle anyway for a point light for example. Moving to texture space sounds like an option to perform vertex operations with pixels. I am curious for the results, gonna dig it right away ...>

#### Share this post

##### Share on other sites
Advertisement
I have two results:
1- I transformed not normalized vector to texture space and measured its length in pixel shader... good result (I think this is thanks to interpolators)
2- I transformed a position vector to texture space and subtracted [u,v,0] from it... bad result

So guys, come on, can a tangent matrix transform position vectors? If not, what matrix could do so? Lets find such a matrix, might come in handy.

#### Share this post

##### Share on other sites
What is a "tangent" matrix? I'm not familiar with the term.

If you want to map 3D space to 2D texture coordinate space in a linear way, then yes, there is an affine matrix which can do that. Is that what you want?

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5
• Advertisement

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631780
• Total Posts
3002314
×

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