<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpotLightComponent/Shadow",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV6ShadowV"
  },
  "title" : "SpotLightComponent.Shadow"
}
-->

# SpotLightComponent.Shadow

A spotlight component that adds shadows to entities that it illuminates.

```
struct Shadow
```

## Topics

### Creating a shadow

[`init()`](/documentation/RealityKit/SpotLightComponent/Shadow/init())

Creates a new spot light shadow object.

[`init(layers: RenderLayer.Set?)`](/documentation/RealityKit/SpotLightComponent/Shadow/init(layers:))

Creates a spot light shadow that accepts shadow casters from the specified layers.

[`var layers: RenderLayer.Set?`](/documentation/RealityKit/SpotLightComponent/Shadow/layers)

The layers of entities that cast shadows from this light.

### Configuring the shadow

[`var depthBias: Float`](/documentation/RealityKit/SpotLightComponent/Shadow/depthBias)

A constant value that RealityKit applies as a bias to its shadow calculations.

[`var zNear: SpotLightComponent.Shadow.ShadowClippingPlane`](/documentation/RealityKit/SpotLightComponent/Shadow/zNear)

The near-plane of a shadow frustum.

[`var zFar: SpotLightComponent.Shadow.ShadowClippingPlane`](/documentation/RealityKit/SpotLightComponent/Shadow/zFar)

The orthogonal plane of the shadow frustum that’s furthest from the spotlight.

[`var cullModeOverride: SpotLightComponent.Shadow.ShadowMapCullMode?`](/documentation/RealityKit/SpotLightComponent/Shadow/cullModeOverride)

The light’s culling mode for shadow map rendering.

### Configuring shadow quality

[`var quality: SpotLightComponent.Shadow.QualityMode`](/documentation/RealityKit/SpotLightComponent/Shadow/quality)

The shadow-filtering algorithm this light uses.

[`struct QualityMode`](/documentation/RealityKit/SpotLightComponent/Shadow/QualityMode)

Constants that select the shadow-filtering algorithm a spotlight uses.

[`var lightSize: Float`](/documentation/RealityKit/SpotLightComponent/Shadow/lightSize)

The radius of the spotlight’s emitting surface, in meters.

### Type Aliases

[`typealias ShadowMapCullMode`](/documentation/RealityKit/SpotLightComponent/Shadow/ShadowMapCullMode)

### Enumerations

[`enum ShadowClippingPlane`](/documentation/RealityKit/SpotLightComponent/Shadow/ShadowClippingPlane)

An object that specifies the mode of a shadow clipping plane.

## Relationships

### Conforms To

[`Component`](/documentation/RealityKit/Component)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)