Skip to main content
gamedev.net
🔒 Locked

Fixed function pipeline

Started by Frozen Nov 23, 2004 at 12:30 AM 0 replies 700+ views
Original Post
Frozen
Frozen
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.