01/22/2001
15-462 Computer Graphics I
21
The z-Buffer Algorithm
•z-buffer with depth value z for each pixel
•Before writing a pixel into framebuffer
–Compute distance z of pixel origin from viewer
–If closer write and update z-buffer, otherwise discard