---
title: OcclusionCullingComponent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/occlusioncullingcomponent
---

# OcclusionCullingComponent

A component that controls whether the system performs occlusion culling on the owning Entity and its descendants.

## Declaration

```swift
struct OcclusionCullingComponent
```

## Overview

Overview Occlusion culling can improve performance by skipping rendering for entities that are fully hidden behind other geometry. Entities are opted into this system by default. This component can be used to disable occlusion culling for an Entity hierarchy if it’s observed that culling produces incorrect visuals. Such scenarios may include: Content that quickly moves in and out of occluded areas. Content that uses a Geometry Modifier to warp vertices outside of the mesh’s reported bounds. A camera teleports to a new location in a single frame and starts viewing the scene from a drastically different angle or position. The enablement setting on this component will be applied recursively to descendant Entities. A component added to a descendant Entity will override any settings inherited from its parent.

## Topics

### Creating a component

- [init(isEnabled:)](realitykit/occlusioncullingcomponent/init(isenabled:).md)

### Enabling occlusion culling

- [isEnabled](realitykit/occlusioncullingcomponent/isenabled.md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)

## See Also

### Portals, clipping, and occlusion

- [RenderLayerComponent](realitykit/renderlayercomponent.md)
- [RenderLayer](realitykit/renderlayer.md)
- [PortalFactory](realitykit/portalfactory.md)
- [ClippingComponent](realitykit/clippingcomponent.md)
- [ClippingPrimitiveComponent](realitykit/clippingprimitivecomponent.md)
