Function createCsmDirectionalShadowGenerator
-
createCsmDirectionalShadowGenerator(
engine: EngineContext,
_light: DirectionalLight,
cfg?: CsmDirectionalShadowGeneratorConfig,
): ShadowGeneratorParameters
- engine: EngineContext
The engine providing the GPU device.
- _light: DirectionalLight
The directional light that casts the shadows.
- cfg: CsmDirectionalShadowGeneratorConfig = {}
Optional cascade, map-size and bias configuration.
Returns ShadowGenerator
A
ShadowGeneratorwired to the CSM render path. - engine: EngineContext
Creates a cascaded shadow map (CSM) generator for a directional light.
The shadow map is a
depth32floattexture_2d_arraywith one layer per cascade; each cascade is fit to a logarithmic/uniform slice of the active camera frustum and sampled on the receiver with a 5×5 PCF kernel. Casters are supplied via setShadowTaskCasterMeshes and the receiver is any mesh withreceiveShadows = true.