Expand description
Occlusion culling for the rendering pipeline.
After the engine updates node transforms and bounds, this module traverses the scene front-to-back and identifies layers that are fully hidden behind opaque layers. Occluded nodes are collected into a set so the drawing code can skip them.
The computation accepts an arbitrary root node so that scenes drawn from different starting points each get their own occlusion data.
Clip-awareness: when a parent has clip_children = true, child bounds are
intersected with the parent clip. Children fully outside the clip are marked
occluded. Opaque layers only contribute the intersection of their bounds
with the active clip to the occlusion mask.
Functions§
- Compute the set of occluded nodes for a given root.
Type Aliases§
- Per-root occlusion data: the set of node ids that are fully occluded.