A lazy object-space shading architecture with decoupled sampling

Christopher A. Burns, Kayvon Fatahalian, William R. MarkHigh Performance Graphics 2010

TL;DR

This paper introduces a novel "Lazy Shading Grid" architecture that significantly improves the efficiency of object-space rendering pipelines, like the classic Reyes system. By decoupling geometric tessellation from shading and performing shading after visibility tests, it reduces unnecessary computations and allows for much coarser geometric detail without sacrificing image quality.

What Problem Does This Paper Address?

Traditional object-space rendering systems, exemplified by the Reyes architecture, excel at producing high-quality motion blur and depth-of-field effects by performing shading calculations in object space before visibility testing. This allows expensive shading computations to be reused across multiple visibility samples. However, Reyes has two major inefficiencies:

  1. Micropolygon Tessellation: To achieve a sufficient shading rate (samples per pixel), surfaces must be tessellated into very small triangles (micropolygons). This dramatically increases the cost of visibility testing.
  2. Pre-Visibility Shading: Shading occurs before precise visibility information is known, leading to many unnecessary shading computations for occluded or back-facing geometry.

The authors aim to overcome these limitations, making object-space rendering more efficient for modern hardware while retaining its benefits for effects like motion blur.

Methods

The paper proposes a "Lazy Shading Grid" architecture with two core innovations:

  • Decoupled Shading Grid: Instead of shading at triangle vertices, the system samples shading on a uniform grid in object space, independent of the geometric tessellation. This "shading grid" acts like a texture map for shading results. The geometric tessellation (polygon grid) is then used solely for visibility testing. This allows the geometric detail (triangle size) to be driven by visual fidelity needs, which are often coarser than shading density requirements.
  • Lazy Shader Execution: Shading is performed on demand after fine-grained visibility testing. When a 2x2 block of shading samples is needed to color a visible fragment, it's computed. This avoids shading geometry that is occluded, back-facing, or outside the view frustum, significantly reducing shader invocations.

The system also incorporates techniques for calculating smooth screen-space derivatives and handling high-frequency displacement mapping to ensure accurate shading grid resolution.

Datasets

The paper evaluates its approach using a variety of scenes designed to exhibit different challenges:

  • Army, Big Guy, Furball, Spheres: These scenes represent coarse, medium, and fine-grained occlusion complexity.
  • Turbulence, Zone Plate: These scenes consist of a single surface with displacement mapping, particularly challenging due to self-occlusion and silhouette edges. The "Zone Plate" scene is highlighted as especially difficult.

The authors do not introduce new benchmark datasets but use these existing scenes to demonstrate the performance and quality improvements of their method compared to standard Reyes and other related techniques.

Key Insights and Ideas

  • Geometry vs. Shading Resolution: The most significant insight is that geometric detail and shading density do not need to be tightly coupled. By separating them, we can use much coarser geometry (larger triangles) for visibility, drastically reducing rasterization costs, while still achieving high-quality shading.
  • "Shading on Demand" is Powerful: Performing shading only after precise visibility is known is a crucial optimization. This "lazy" approach directly tackles the inefficiency of shading occluded geometry, leading to substantial savings, especially in scenes with complex occlusion.
  • Object-Space Benefits Persist: The paper demonstrates that object-space shading's advantages for motion blur and depth-of-field can be maintained and even enhanced with these new techniques, offering an alternative to image-space approaches for these effects.
  • Tessellation Costs are High: The paper quantifies how much rasterization costs are reduced by increasing triangle size, highlighting that sample testing and bounding box computations are major contributors to these costs.

Key Results

  • Reduced Geometric Complexity: The proposed method allows for meshes with an order of magnitude fewer vertices with minimal loss of image quality. Triangle size can be increased from sub-pixel to an average of 4.9-7.0 pixels, reducing visibility costs by up to 2x.
  • Reduced Shader Invocations: Lazy shading reduces shader invocations by over two times compared to pre-visibility object-space shading, especially in scenes with fine-grained occlusion.
  • Improved Tiling Efficiency: In tiled rendering scenarios, lazy shading significantly reduces "bin-spread" (redundant shading at tile boundaries), bringing it down to around 12% for scenes without blur effects.
  • Image Quality: While not explicitly quantified with metrics, the paper states that the image quality is similar to vertex shading, with only slight variations attributed to grid rounding.

Limitations and Future Work

  • Limit Surface Evaluation: The shading grid relies on the ability to evaluate the limit surface at arbitrary parametric coordinates. This might be challenging for some subdivision surfaces.
  • Triangular Domains: The current approach is optimized for quadrilateral domains. Supporting triangular domains might require degenerate edges, potentially impacting shading efficiency and introducing aliasing.
  • Per-Pixel Detail Necessity: The benefits of larger triangles are limited when per-pixel detail is essential (e.g., with very detailed displacement or very small input primitives).
  • Future Work:
    • Implement the architecture on parallel hardware for interactive rendering.
  • Develop an adaptive tessellator that dynamically adjusts triangle size based on local geometry complexity (silhouettes, displacement).
  • Explore the potential for combining this object-space approach with GPU pipelines.
  • Investigate alternative sorting and scheduling algorithms for real-time object-space renderers to further mitigate blur-related penalties in tiled systems.

Summary updated

BibTeX
@inproceedings{burns2010lazy,
  author = {Christopher A. Burns and Kayvon Fatahalian and William R. Mark},
  title = {{A lazy object-space shading architecture with decoupled sampling}},
  booktitle = {High Performance Graphics},
  year = {2010},
  doi = {10.2312/eggh/hpg10/019-028},
}
Figure