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