transforming Vector 3 by a 4x4 matrix
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement