Constructor
new DirectionalLightShadow()
Extends
Members
autoUpdate :Boolean
Enables automatic updates of the light's shadow. If you do not require dynamic lighting / shadows, you may set this to false.
Type:
- Boolean
- Overrides
- Default Value
- true
bias :Number
Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow. Very tiny adjustments here (in the order of 0.0001) may help reduce artefacts in shadows.
Type:
- Number
- Overrides
- Default Value
- 0
camera :t3d.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.
Type:
- Overrides
cameraFar :Number
Shadow camera far.
Type:
- Number
- Overrides
- Default Value
- 500
cameraNear :Number
Shadow camera near.
Type:
- Number
- Overrides
- Default Value
- 1
frustumEdgeFalloff :Number
Controls the extent to which the shadows fade out at the edge of the frustum. If the value is greater than 0, the shadow fades out from center to all sides of shadow texture (radial fade out), if the value is less than 0, the shadow will fade out from the y+ direction (vertical fade out).
Type:
- Number
- Default Value
- 0
mapSize :t3d.Vector2
A t3d.Vector2 defining the width and height of the shadow map. Higher values give better quality shadows at the cost of computation time. Values must be powers of 2.
Type:
- Overrides
- Default Value
- t3d.Vector2(512, 512)
matrix :t3d.Matrix4
Model to shadow camera space, to compute location and depth in shadow map. Stored in a t3d.Matrix4. This is computed internally during rendering.
Type:
- Overrides
needsUpdate :Boolean
When set to true, shadow maps will be updated in the next ShadowMapPass.render call. If you have set .autoUpdate to false, you will need to set this property to true and then make a ShadowMapPass.render call to update the light's shadow.
Type:
- Boolean
- Overrides
- Default Value
- false
normalBias :Number
Defines how much the position used to query the shadow map is offset along the object normal. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.
Type:
- Number
- Overrides
- Default Value
- 0
radius :Number
Setting this to values greater than 1 will blur the edges of the shadow. High values will cause unwanted banding effects in the shadows - a greater mapSize will allow for a higher value to be used here before these effects become visible. Note that this has no effect if the @t3d.Object3D#shadowType is set to PCF or PCSS.
Type:
- Number
- Overrides
- Default Value
- 1
windowSize :Number
The cast shadow window size.
Type:
- Number
- Default Value
- 500