ShadowMap

internal constructor new Cesium.ShadowMap()

Use Viewer#shadowMap to get the scene's shadow map. Do not construct this directly.

The normalOffset bias pushes the shadows forward slightly, and may be disabled for applications that require ultra precise shadows.

Throws:
Demo:

Members

Determines the darkness of the shadows.
Default Value: 0.3
Determines if the shadow map will be shown.
Default Value: true

fadingEnabled : boolean

Determines whether shadows start to fade out once the light gets closer to the horizon.
Default Value: true

maximumDistance : number

Determines the maximum distance of the shadow map. Only applicable for cascaded shadows. Larger distances may result in lower quality shadows.
Default Value: 5000.0

normalOffset : boolean

Determines if a normal bias will be applied to shadows.
Default Value: true
The width and height, in pixels, of each shadow map.
Default Value: 2048

softShadows : boolean

Determines if soft shadows are enabled. Uses pcf filtering which requires more texture reads and may hurt performance.
Default Value: false

softShadowsFuzziness : Number

调整PCSS软阴影软化程度的参数
Default Value: 200.0

throughTransparentMaterial : Boolean

阴影是否会透过不透明材质
Default Value: false

transparencyTolerance : Number

材质不透明度小于多少才会被阴影视为“透明” 仅当throughTransparentMaterial为true时起作用
Default Value: 0.8
是否采用PCSS方式生成软阴影. 阴影距离遮挡物越远阴影越软,反之距离越近阴影越硬
Default Value: false
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.