first pass at z-buffering