Saving the z-cull optimization

  • Authors:
  • Stephan Mantler;Markus Hadwiger

  • Affiliations:
  • VRVis Research Center;VRVis Research Center

  • Venue:
  • ACM SIGGRAPH 2007 posters
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.