Skip to main content
gamedev.net
🔒 Locked

Transforming vertices

Started by cyberbum Mar 5, 2000 at 4:01 AM 0 replies 450+ views
Original Post
cyberbum
cyberbum
Hey all, I am trying to figure out a model coordinate from a screen coordinate. What I want to do is take the screen coords and transform it by the inverse of the world-view-projection matrices. Problem is, when I take an untransformed vertex and I multiply it by the world-view-projection matrices, I don''t even get any screen coords! Everything is setup fine, since I can view my model, rotate it etc. When I use a vertex buffer and do ProcessVertices, I get the proper screen coords. Is there an extra step in the geometry pipeline? Isn''t just a case of taking your model vertex and multiplying by the world-view-proj matrices?
Spellbound
Spellbound
After transformations of world-view-projection matrices your coordinates are in normalized screen space which is a cube with corners (-1,-1,0) and (1,1,1). In the geometry pipeline this cube is then scaled and translated to fit into the viewport.

More info in the DirectX SDK Doc:

Direct3D->Direct3D Immediate Mode Essentials->Geometry Pipeline

Topic Locked

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

Sign in to reply to this topic.