4 ms·
The projection matrix transforms the 3D world into a 3D world in screen space. Two of the dimensions are the screen coordinates, and the third is depth into the
by Animats 8y ago
The projection matrix transforms the 3D world into a 3D world in screen space. Two of the dimensions are the screen coordinates, and the third is depth into the screen. The depth is used for Z-buffering (hiding the stuff in back), and for fog and focus effects.
- seandougall 8y agoDepth in OpenGL is a separate 2D buffer. You can use it to approximate the effects of 3D space, but it’s still fundamentally a set of 2D operations. Of course, it’s all fundamentally just bits on a heap, so past a certain point the argument becomes academic.
- skolemtotem 8y agoThat, I sort-of agree with. Layering isn't unique to 3D, so it's debatable whether the incorporation of a depth buffer makes OpenGL a 3D API.
- Animats 8y agoIt's not layering. It's depth. The depth buffer will work for cases where two objects cross in Z. Unlike the painter's algorithm.