new ShadowMap(options)
Creates a shadow map from the provided light camera.
The normalOffset bias pushes the shadows forward slightly, and may be disabled
for applications that require ultra precise shadows.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | An object containing the following properties:
Properties
|
- Source:
Throws:
-
Only one or four cascades are supported.
- Type
- DeveloperError
Members
darkness :Number
Determines the darkness of the shadows.
Type:
- Number
- Default Value:
- 0.3
- Source:
enabled :Boolean
Determines if the shadow map will be shown.
Type:
- Boolean
- Default Value:
- true
- Source:
maximumDistance :Number
Determines the maximum distance of the shadow map. Only applicable for cascaded shadows. Larger distances may result in lower quality shadows.
Type:
- Number
- Default Value:
- 5000.0
- Source:
size :Number
The width and height, in pixels, of each shadow map.
Type:
- Number
- Default Value:
- 2048
- Source:
softShadows :Boolean
Determines if soft shadows are enabled. Uses pcf filtering which requires more texture reads and may hurt performance.
Type:
- Boolean
- Default Value:
- false
- Source: