Sign in to follow this  
yuppies

Transformed Vertex?

Recommended Posts

ok i admit that im confuse on the defination of transformed and Untransformed Vertex.. Can somebody explain whats the difference of the two? And can somebody teach me on WHEN to use Transformed Vertex in my Vertex structure and when not to use .. thanks in advance

Share this post


Link to post
Share on other sites
When you specify a transformed vertex, you're giving Direct3D the position of the vertex in screen coordinates (pixel coordinates). The z-coordinate is ignored.
When you specify an untransformed vertex, you specify it in world space. D3D will transform that vertex by the current world, view and projection matrices, to get a transformed vertex that it can then plot in screen space.

You'd usually want transformed vertices for 2D items in screen space such as a HUD or menu items. Untransformed vertices would be used for everything else like models and landscape.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
When you specify a transformed vertex, you're giving Direct3D the position of the vertex in screen coordinates (pixel coordinates). The z-coordinate is ignored.

I used to think so too, until ntnet told me that z-coordinate isn't ignored - it's used for z-testing and on passing the test, gets written to the z-buffer.

Quote:
When you specify an untransformed vertex, you specify it in world space.

Should be "...specify it in local/model/object space".

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
I used to think so too, until ntnet told me that z-coordinate isn't ignored - it's used for z-testing and on passing the test, gets written to the z-buffer.

I'm not sure this is fact. It just makes sense. If you are going to rely on it, do a quick test.

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