Sign in to follow this  
Frozen

Fixed function pipeline

Recommended Posts

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.

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