Real-time relief mapping on arbitrary polygonal surfaces
Proceedings of the 2005 symposium on Interactive 3D graphics and games
Efficient depth buffer compression
GH '06 Proceedings of the 21st ACM SIGGRAPH/EUROGRAPHICS symposium on Graphics hardware
Hi-index | 0.00 |
Modern graphics hardware employs z-culling, or early-z culling, as a conservative z-test before the actual per-fragment z-test [Kilgariff and Fernando 2005]. Z-culling is used to avoid executing expensive fragment shaders for invisible fragments, and minimize reading, testing, and updating z-buffer entries. However, these optimizations need to be disabled for shaders that modify the z value of a fragment (depth replace). Such shaders are rapidly gaining in importance, however, especially in the context of per-pixel displacement mapping such as relief mapping [Policarpo et al. 2005]. We propose a slight modification to graphics APIs and hardware drivers that would allow to retain many of the z-cull optimizations for a large class of depth-modifying shaders, including displacement shaders. The basic idea is for shaders to specify a non-negative depth offset that is added to the z value of the fragment. While the exact z value is not known before the shader is executed, the lower bound is sufficient to perform all z-culling tests. Updates to the z-cull buffer are limited, but not worse than with texkill shaders.