Quickly implement an approximation for z-buffer for points and lines.