# Per-view occlusion a SubViewport runs its own Hi-Z cull for its own camera. ```{raw} html 📄 Docs only ``` **Tags:** `3d` `subviewport` `culling` `performance` ``SubViewport.use_occlusion = True`` gives an offscreen view its own two-phase Hi-Z occlusion island (scratch depth prepass + pyramid sized to the view's target), so the view's camera culls what its OWN wall hides, independent of the main camera. Here the SubViewport contains a near wall with a dense cube field packed behind it; its feed shows the wall plus the un-occluded flanks, while the hidden field is never drawn into the texture. The main scene shows the live feed on a monitor slab plus a picture-in-picture sprite, and the HUD reports the per-view cull counts from ``App.last_telemetry`` (``view_occlusion_drawn`` / ``view_occlusion_total``). The main scene itself renders WITHOUT occlusion culling (no WorldEnvironment toggle): only the SubViewport opts in, which is exactly the per-view point. Controls: ESC : Quit Usage: uv run python examples/features/3d/sub_viewport_occlusion.py ## Source ```{literalinclude} ../../examples/features/3d/sub_viewport_occlusion.py :language: python :linenos: ```