Original Post
For example, if I have a vector V = (x, y, z, w), a world matrix W, a view matrix V and a projection P, how should I calculate the final (x, y) ? I make this: V = (x, y, z, 1); V2 = V * W * V * P; V2.x /= V2.w; V2.y /= V2.w; V2.z /= V2.w; V2.w /= V2.w; And then, I draw the point at V2.x, V2.y. But it doesn't work! It works perfect only if I don't divide V2 by V2.w, but I'm sure I must divide it. I know DirectX does this by itself, but I need to know how to do it.