This article presents algorithms which both improve performance and decrease memory costs when using a Z-buffer for medium-quality rendering. The crux of the method is to perform rendering in two passes; the first quickly renders only Z-depth values, the second does all shading calculations. This method allows the reuse of memory used to store the Z-depths and colors, as only one of these two values is needed at any given moment for any given pixel. It also eliminates all unnecessary shading/shadowing/texturing calls, which typically take the majority of computation time in medium-quality algorithms.
展开▼