next up previous contents
Next: 20.2 Lighting Equations Up: 20.1 Projection Matrices Previous: 20.1.2 Orthographic Projection

Perspective z-Coordinate Transformations

The z value in eye coordinates, tex2html_wrap_inline11504, can be computed from the window coordinate z value, tex2html_wrap_inline11508, using the near and far plane values, near and far, from the glFrustum() command and the viewport near and far values, tex2html_wrap_inline11514 and tex2html_wrap_inline11516, from the glDepthRange() command using the equation:
displaymath11518

The z window coordinate is computed from the eye coordinate z using the equation:
displaymath11524