---
title: "init(shadowProjection:depthBias:cullMode:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/directionallightcomponent/shadow/init(shadowprojection:depthbias:cullmode:)"
---

# init(shadowProjection:depthBias:cullMode:)

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

## Declaration

```swift
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.

## See Also

### Creating the shadow

- [init()](realitykit/directionallightcomponent/shadow/init().md)
- [init(maximumDistance:depthBias:)](realitykit/directionallightcomponent/shadow/init(maximumdistance:depthbias:).md)
- [init(layers:)](realitykit/directionallightcomponent/shadow/init(layers:).md)
