Conservative Rasterization Tiers in DirectX
Conservative rasterization is a DirectX feature that guarantees any pixel touched by a primitive is rasterized, eliminating the sampling gaps inherent to standard rasterization. This article breaks down the three DirectX conservative rasterization hardware tiers, explains their technical capabilities, and details how developers use this functionality to generate watertight voxel grids for real-time lighting, physics, and occlusion.
Understanding Conservative Rasterization
In standard graphics pipelines, a pixel generates a fragment only if the primitive covers the center of the pixel or specific multi-sample anti-aliasing (MSAA) sample locations. Consequently, thin or sub-pixel geometry often fails to trigger fragment generation, leading to visual discontinuities or missed intersections.
Conservative rasterization changes this rule: if any part of a triangle intersects any part of a pixel's bounding box, that pixel is rasterized. In DirectX 11.3 and DirectX 12, this behavior is formalized across three hardware tiers.
DirectX Conservative Rasterization Tiers
Hardware support for conservative rasterization is classified into three distinct tiers defined by accuracy and feature sets:
Tier 1
- Overestimation: Ensures no false negatives (if geometry touches a pixel, the pixel is always generated).
- Uncertainty Region: Allows an overestimation uncertainty region of up to 1/2 pixel. This means fragments may occasionally be generated for pixels that lie just outside the primitive's true boundary.
- Degenerate Geometry: Degenerate primitives (such as zero-area triangles) may not be culled consistently.
Tier 2
- Precise Overestimation: Eliminates post-snap false positives. The uncertainty region is reduced to 0 for post-snap vertices, meaning a pixel generates a fragment only if the snapped primitive truly touches it.
- Culling: Degenerate primitives are reliably culled before rasterization.
- Sub-Pixel Precision: Preserves vertex coordinates snapped to a fixed sub-pixel grid (typically 8-bit or 16-bit precision), preventing accidental over-coverage.
Tier 3
- Inner Conservative Rasterization: Introduces "underestimation" mode alongside standard overestimation.
- Full Coverage Detection: In this mode, a fragment is generated only if the pixel is completely enclosed within the primitive's boundaries.
- Use Cases: Ideal for algorithms that require fully occluded bounding tests, coarse culling, and analytical visibility queries without screen-space artifacts.
How Conservative Rasterization Is Used in Voxelization
Voxelization converts continuous 3D polygon meshes into a discrete 3D volume representation (a grid of voxels). This structure is widely used in techniques such as Voxel Global Illumination (VXGI), Sparse Voxel Octrees (SVO), and volumetric collision detection.
The Watertight Problem
Traditional GPU-based voxelization repurposes the rasterization pipeline. A scene is projected down its dominant axis (X, Y, or Z), and the pixel shader writes data into a 3D Unordered Access View (UAV) representing the volume.
With standard rasterization, thin geometry—such as wires, fences, or angled planar surfaces—often fails to cover pixel sample centers. This leaves unvoxelized holes in the 3D grid. In indirect lighting calculations, these pinhole gaps cause severe light leaking and shadow detachment.
The Conservative Solution
Enabling conservative rasterization (at least Tier 1) guarantees that every volume cell (voxel) crossed by a surface is flagged and processed:
- Dominant Axis Selection: A geometry shader calculates the face normal of each primitive and projects it along the axis of maximum projection (the axis where the triangle has the largest projected area).
- Conservative Fragment Generation: The conservative rasterizer expands the raster coverage rule. Every 2D pixel touched by the projected triangle emits a fragment, ensuring 100% volumetric continuity without holes.
- UAV 3D Storage: The pixel shader disables depth writes and render targets, instead calculating the third coordinate (depth into the volume) and executing atomic operations or image stores into a 3D texture.
By utilizing Tier 2 or Tier 3, developers also prevent over-voxelization around complex silhouettes and avoid filling neighboring empty space unnecessarily, producing tight, accurate volumetric representations essential for modern real-time rendering.