Projection Transform Confusion
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? :)
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement