Jump to content
  • Advertisement
Sign in to follow this  
GaryNas

Projection Transform Confusion

This topic is 4288 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm confused over what happens when I apply the projection transform in my scene. Some documents say that the projection transform will put my vertices into a cuboid shape which extents of (-1, -1, 0) and (1, 1, 1). However, the output of the projection transform is never within that range. For example, I have a vertex whos object-space position is (0.5, 0.5, 0.5, 1.0). After the projection transform (from my vertex shader) its position is (0.969, -4.479, 9.034, 9.134). Now, I'm guessing the homogenous divide takes place after the vertex shader and that's what brings the coordinates into the cuboid range. So in this case, the x,y,z values get divided by 9.134. Here's my question... what do the (0.969, -4.479, 9.034, 9.134) values actually mean? I have PIX loaded up and I'm looking at the mesh in it, but I don't understand how the "Post-Vertex Shader" window is rendered... where's the origin? How does it relate to the Viewport? Can anyone help me out? :)

Share this post


Link to post
Share on other sites
Advertisement
Umm, I think you pretty much have it right. After the divide by w, you end up in clip space, which is presumably either a cube or hemi-cube centered around your viewport.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!