I have recently come to the realization that OpenGL and Direct3D use different clipping volumes. OpenGL clips against a cube, while Direct3D clips against a half-cube (0 <= Z <= 1). Is there a technical reason for this difference? Does one offer more precision over the other, or does it boil down to historical reasons?
I am trying to make sense of why D3D clips against a half-cube, as it seems somewhat counter-intuitive and arbitrary to use -1 to 1 for the X and Y axes but 0 to 1 for Z. I could technically rig up a projection matrix that slaps a -eye_x into the w clip component, so that the hardware ends up dividing by -eye_x instead of by -eye_z -- so if the reasoning is tied to division by -eye_z, it makes little sense in the more general case.
The only thing I can think of is that this mapping makes intuitive sense if the near and far planes are always in front of the camera -- this way, -1 to 1 on the X and Y axes corresponds to left-to-right and top-to-bottom, and 0 to 1 on the Z axis corresponds to "Near to far, in front of the camera." But then there's the case of an orthographic projection where the near plane is *behind* the camera -- then the reasoning once again falls apart.
I realize that at the end of the day, the dimensions of the clipping cube really only matters when deriving projection matrices, but I am curious about design decisions such as these. :)
Better late than never: No,
Better late than never: No, there is no technical reason to choose one over the other. The Z column of the projection matrix in D3D, and Z row of the projection matrix in OpenGL, can map the desired Z range to whatever the API needs with equal precision.