Page cover

Occlusion

Includes both baked and runtime GPU-based occlusion culling.

Flora supports two forms of occlusion culling: GPU-based dynamic occlusion and Unity’s CPU-based baked occlusion. Both systems help skip rendering instances that are not visible to the camera, improving performance in scenes with overdraw or high instance counts.


GPU Dynamic Occlusion

Flora’s GPU occlusion system uses compute shaders and the previous frame’s depth buffer to determine visibility. Occluded instances are skipped during rendering.

Performance Considerations

  • In scenes with significant occlusion and high-vertex instances, GPU occlusion can greatly reduce rendering cost.

  • In scenes with minimal occlusion, the extra compute pass may increase GPU load unnecessarily.

GPU occlusion is scene-dependent — always profile with and without it to measure the impact in your project.

Compatibility with GPU Resident Drawer

If you're using Unity’s GPU Resident Drawer, be aware:

  • Flora and GPU Resident Drawer each maintain separate occlusion resources

  • Both systems perform their own depth sampling passes

  • This can result in redundant GPU work, particularly on lower-end hardware

Recommendation: Use only one GPU occlusion system per scene to avoid unnecessary overhead.


Usage

GPU occlusion is enabled by default, but can be configured at multiple levels:


CPU Baked Occlusion

Flora also supports Unity’s built-in CPU-based occlusion culling, which uses pre-baked visibility data to cull geometry blocked by static objects.

Advantages

  • Ideal for lower-end platforms (e.g., mobile) where GPU compute may be too costly

  • Requires no runtime compute passes

  • Automatically used by Flora if baked occlusion data is present in the scene

Setup

No special configuration is needed.

As long as occlusion data is baked using Unity's built-in tools, Flora will use it automatically.

For more information, see Unity’s Occlusion Culling documentation.

Last updated