Skip to main content

ShadowCaster

type ShadowCaster = {
bias: Float;
nearDist: Float;
farDist: Float;
quality: Int32;
cascadeSplitLambda: Float;
cascadeCount: Int8;
accumulateShadowCascades: boolean;
};

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:844

Enables a light to cast shadows.

Type declaration

NameTypeDescription
biasFloatBias to apply to avoid self shadowing artifacts.
nearDistFloatDistance to the near plane.
farDistFloatDistance to the far plane.
qualityInt32Resolution of the shadow map.
cascadeSplitLambdaFloatFor directional lights, adjusts the distribution of cascade splits in Cascaded Shadow Mapping for directional lights. A value of 0 results in uniform (linear) splits across the view frustum, while a value of 1 skews the splits toward the camera, providing higher shadow resolution near the viewer and lower resolution in the distance. Intermediate values blend linear and logarithmic distributions for a balanced result. The value ranges from 0 to 1.
cascadeCountInt8For directional lights, number of cascades.
accumulateShadowCascadesbooleanFor directional lights, accumulate all shadow cascades.