> For the complete documentation index, see [llms.txt](https://flora.magneticarcade.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flora.magneticarcade.com/rendering/occlusion.md).

# Occlusion

Includes both baked and runtime GPU-based occlusion culling.

Flora supports GPU dynamic occlusion and Unity's baked occlusion data.

## GPU dynamic occlusion

GPU occlusion tests instances against the previous frame's depth buffer.

### Enable GPU occlusion

GPU occlusion requires both of the following settings:

1. Enable **GPU Occlusion Culling** in **Edit > Project Settings > Graphics > Flora > Runtime**.
2. Enable **Occlusion Culling** on the Camera.

Each Camera can opt out through `Camera.occlusionCulling`. There is no scene-level Flora setting.

### Performance considerations

It helps scenes with significant occlusion or expensive instances. In open scenes, the compute pass may cost more than it saves. Profile both settings.

### Compatibility with GPU Resident Drawer

Flora and [GPU Resident Drawer](/rendering/gpu-resident-drawer.md) use separate occlusion resources. Avoid running both for the same content unless profiling shows a benefit.

## CPU baked occlusion

Bake data with Unity's Occlusion Culling window. Flora uses valid baked data automatically.

See Unity's [Occlusion Culling documentation](https://docs.unity3d.com/Manual/OcclusionCulling.html).

## Diagnose occlusion

In the [Rendering Debugger](/rendering/debugging.md), enable **Disable GPU Occlusion Culling**. If missing instances reappear, GPU occlusion rejected them.
