Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DirectionalLightShadow

Hierarchy

Index

Constructors

constructor

Properties

autoUpdate

autoUpdate: boolean

Enables automatic updates of the light's shadow. Default is true. If you do not require dynamic lighting / shadows, you may set this to false.

default

true

bias

bias: number

Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow. The default is 0. Very tiny adjustments here (in the order of 0.0001) may help reduce artifacts in shadows

[property:Integer blurSamples]

The amount of samples to use when blurring a VSM shadow map.

default

0

blurSamples

blurSamples: number
default

8

camera

Readonly isDirectionalLightShadow

isDirectionalLightShadow: true

map

The depth map generated using the internal camera; a location beyond a pixel's depth is in shadow. Computed internally during rendering.

default

null

mapPass

The distribution map generated using the internal camera; an occlusion is calculated based on the distribution of depths. Computed internally during rendering.

default

null

mapSize

mapSize: I3JS.Vector2

A 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, up to the WebGLRenderer.capabilities.maxTextureSize for a given device, although the width and height don't have to be the same (so, for example, (512, 1024) is valid). The default is ( 512, 512 ).

default

new THREE.Vector2( 512, 512 )

matrix

matrix: I3JS.Matrix4

Model to shadow camera space, to compute location and depth in shadow map. Stored in a Matrix4. This is computed internally during rendering.

default

new THREE.Matrix4()

needsUpdate

needsUpdate: boolean

When set to true, shadow maps will be updated in the next render call. Default is false. If you have set .autoUpdate to false, you will need to set this property to true and then make a render call to update the light's shadow.

default

false

normalBias

normalBias: number

Defines how much the position used to query the shadow map is offset along the object normal. The default is 0. 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.

default

0

radius

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. If WebGLRenderer.shadowMap.type is set to PCFSoftShadowMap, radius has no effect and it is recommended to increase softness by decreasing .mapSize instead. Note that this has no effect if the WebGLRenderer.shadowMap.type is set to BasicShadowMap.

default

1

Methods

clone

copy

dispose

  • dispose(): void

getFrameExtents

getFrustum

  • getFrustum(): number

getViewport

getViewportCount

toJSON

  • toJSON(): any

updateMatrices

  • updateMatrices(light: I3JS.Light, viewportIndex?: number): void

Generated using TypeDoc