---
title: layers
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/directionallightcomponent/shadow/layers
---

# layers

The layers from which this light accepts shadow casters. If nil, uses layers for shadow casting. Only entities whose RenderLayerComponent.layers intersect with these layers will cast shadows in this light’s shadow map. If nil, the light uses its layers for shadow casting. Set to an empty set to disable shadow casting entirely.

## Declaration

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