Use
Viewer#shadowMap
to get the scene's shadow map originating from the sun. Do not construct this directly.
The normalOffset bias pushes the shadows forward slightly, and may be disabled for applications that require ultra precise shadows.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
An object containing the following properties:
|
Throws:
-
DeveloperError : Only one or four cascades are supported.
Members
-
color : Color
-
the color of shadow.
-
Default Value:
Black
-
Determines the darkness of the shadows.
-
Default Value:
0.3
-
Determines if the shadow map will be shown.
-
Default Value:
true
-
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
-
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
-
Determines if soft shadows are enabled. Uses pcf filtering which requires more texture reads and may hurt performance.
-
Default Value:
false