Class: LightShadow

(abstract) zen3d.LightShadow

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
Default Value:
  • true
Source:

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
Default Value:
  • 0
Source:

camera :zen3d.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:
Source:

cameraFar :number

Shadow camera far.
Type:
  • number
Default Value:
  • 500
Source:

cameraNear :number

Shadow camera near.
Type:
  • number
Default Value:
  • 1
Source:

mapSize :zen3d.Vector2

A zen3d.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:
Default Value:
  • zen3d.Vector2(512, 512)
Source:

matrix :zen3d.Matrix4

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

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
Default Value:
  • false
Source:

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 @zen3d.Object3D#shadowType is set to PCF or PCSS.
Type:
  • number
Default Value:
  • 2
Source: