LightShadow

DirectionalLightShadowCascade

This is used internally by DirectionalLightShadowCSM for calculating shadows.

Unlike the other shadow classes, this uses an OrthographicCamera to calculate the shadows, rather than a PerspectiveCamera. This is because light rays from a DirectionalLight are parallel.

Constructor

DirectionalLightShadowCascade()

Creates a new DirectionalLightShadowCascade. This is not intended to be called directly — it is called internally by DirectionalLightShadowCSM.

Properties

See the base LightShadow class for common properties.

.camera : Camera

The light's view of the world. This is used to generate a depth map of the scene; objects behind other objects from the light's perspective will be in shadow.

The default is an OrthographicCamera with left and bottom set to -5, right and top set to 5, the near clipping plane at 0.5 and the far clipping plane at 500.

.isDirectionalLightShadowCascade : Boolean

Read-only flag to check if a given object is of type DirectionalLightShadowCascade.

.pancakeDepth : Boolean

When enabled, clamps the depth of occluder objects outside the shadow frustum along the Z axis in shadow camera view space, i.e. pancakes to shadow camera near plane. The default is true.

Methods

See the base LightShadow class for common methods.

Source

For more info on how to obtain the source code of this module see this page.