Culling
| Property | Type | Default | Description |
|---|---|---|---|
| Use Baked Occlusion Culling | bool | true | Enables per-chunk occlusion testing against Unity's baked occlusion data. Chunks fully hidden behind occluders are skipped. |
| Use GPU Occlusion Culling | bool | false | Enables real-time GPU occlusion culling using a Hierarchical Z-Buffer (HZB) built from the previous frame's depth buffer. Works with dynamic objects and requires no baking. Can run alongside baked occlusion culling. |
| Use HZB Retest Pass | bool | false | Adds a second HZB pass that re-tests occluded instances against the current frame's depth prepass, recovering falsely occluded instances. Requires Use GPU Occlusion Culling. HDRP requires applying the included depth prepass patch. |
| HZB Pixel Expansion | float | 2.0 | Fixed pixel expansion applied during HZB testing to compensate for camera movement between frames. Higher values are more conservative (fewer false culls) at the cost of reduced culling effectiveness. |
| Default Small Mesh Size | float | 0.3% | Minimum screen-size percentage for culling non-LODGroup meshes. Meshes below this screen size are culled with a fade-out. Set to 0 to disable. Only applies to single-mesh prototypes without a LOD Group or per-prototype override. |
| Default Small Mesh Fade Mode | enum | AnimatedCrossfade | Fade mode for the small mesh cull boundary: None (instant pop). Crossfade (stateless dither). Animated Crossfade (time-based fade). |
For a detailed breakdown of the culling pipeline, see Culling.
Occlusion Culling Considerations
GPU occlusion culling uses a Hierarchical Z-Buffer (HZB) built from the previous frame's depth texture. There are two things to be aware of:
- Depth pyramid generation takes time. Building the HZB has a small GPU cost each frame — ensure your scene has enough occluded geometry for the savings to outweigh this overhead.
- Previous-frame depth causes false culling at low FPS. Because the depth texture comes from the previous frame, fast-moving objects at low framerates can leave behind ghost artifacts where instances behind them are incorrectly culled for one frame.
There are two ways to address the false culling problem:
HZB Retest Pass — Forces all instances to render in the depth prepass (and forces a depth prepass to exist), so the system can re-test occluded instances against the current frame's depth. This is similar to what Unity's GPU Resident Drawer does.
- Eliminates false culling entirely
- Culling runs twice — once before the depth prepass, and a second time after to calculate the actual occluded instances- All instances must be rendered in the prepass, even those behind obstacles
- Forces a depth prepass, which adds some rendering cost
HZB Pixel Expansion — Widens the occlusion bounds by a fixed number of pixels to account for camera movement between frames.
- Much cheaper than the retest pass — no forced depth prepass and no second culling pass
- Less accurate — fast moving objects or cameras may still cause some false culling