View Single Post
Old 06-17-2003, 10:22 PM   #6
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,816
Surfer, you are asking for an English explanation of a problem that only exists in Programmerland, not in the real world.

As Jim O'Connor says, the Z-Buffer is used to decide if a pixel should be painted to the screen, or if there is already a pxel at that location which is closer to the viewer. The important thing is that it does this for each pixel, not just each polygon. A programmer can calculate which polygons happen to be closer at the moment, and render them last, but what about polygons which intersect each other? For example, the side fins of many of the fish are single triangles which pass into the body where they connect. With no Z-buffer, you have to render either the body last or the whole fin last, including the part which should be hidden inside the body. With the Z-buffer on, the pixels which are outside the body get rendered, but not the ones which are inside.

I do not condone the removal of the Z-buffer.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote