<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpotLightComponent/Shadow/layers",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV6ShadowV6layersAA11RenderLayerV3SetVSgvp"
  },
  "title" : "layers"
}
-->

# layers

The layers of entities that cast shadows from this light.

```
var layers: RenderLayer.Set? { get set }
```

## Discussion

An entity casts a shadow into this light’s shadow map when the layers of
its [`RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent) intersect with this set.

Set this property to:

- `nil` (the default) to inherit [`layers`](/documentation/RealityKit/SpotLightComponent/layers),
  so any entity the light illuminates can also cast a shadow from it.
- An empty set to disable shadow casting from this light entirely.

Shadow casting can be restricted by layer on devices with Apple6 GPU family feature support.

---

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)