Jump to content
  • Advertisement
Sign in to follow this  
bazeragi

transforming Vector 3 by a 4x4 matrix

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

Hi i am trying to make a software renderer and i have got up to getting it into 3D, i have made a projection matrix but im not sure how i can transform the vector 3 by the matrix. I am doing it without using directx or anything like that so could anyone tell me how to do this or any site that might tell me? do i need to add a fourth element (x,y,z,w)? any help would be appreciated

Share this post


Link to post
Share on other sites
Advertisement
How you transform the vector depends on what it represents. If it represents a point, like a vertex, you use a w coordinate of 1. If it represents a direction, like a normal, you use a w coordinate of 0.

Share this post


Link to post
Share on other sites
Ah thanks yea its to represent a point so i will use 1 for w
anouther question after it has been transformed by the matrix how do i actually make it a vector 2 because it will still come out as a vector 3.
Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

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!