What is z-buffer?
The principal problem of 3D objects is that they must be drawn on a 2D surface (that of the screen in computer art). The z-buffer is a part of the memory (usually an array) where the positions of each point in the depth dimension are stored. This information is then used to determine what parts of the object are visible and what parts are hidden by those in front of them. In ray-tracing programs, this information is also used to calculate the distance of each point to the light source and therefore its brightness.