<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/DirectionalLightComponent/Shadow/init(shadowProjection:depthBias:cullMode:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation25DirectionalLightComponentV6ShadowV16shadowProjection9depthBias8cullModeA2E0fH4TypeO_SfAA22MaterialParameterTypesV11FaceCullingOSgtcfc"
  },
  "title" : "init(shadowProjection:depthBias:cullMode:)"
}
-->

# init(shadowProjection:depthBias:cullMode:)

Creates a directional light shadow with a shadow projection, depth bias and cull mode.

```
init(shadowProjection: DirectionalLightComponent.Shadow.ShadowProjectionType, depthBias: Float, cullMode: DirectionalLightComponent.Shadow.ShadowMapCullMode? = nil)
```

## Parameters

`shadowProjection`

The shadow projection used for shadow map rendering.

`depthBias`

The depth bias for the shadow.

`cullMode`

The mode used to cull faces when generating the shadow.

---

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)