Skip to main content

Type Alias: 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:874

Enables a light to cast shadows.

Properties

bias

bias: Float;

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

Bias to apply to avoid self shadowing artifacts.

Default Value

0.002;

nearDist

nearDist: Float;

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

Distance to the near plane.

Default Value

0.1;

farDist

farDist: Float;

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

Distance to the far plane.

Default Value

100;

quality

quality: Int32;

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

Resolution of the shadow map.

Default Value

1024;

cascadeSplitLambda

cascadeSplitLambda: Float;

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

For 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.

Default Value

0.94;

cascadeCount

cascadeCount: Int8;

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

For directional lights, number of cascades.

Default Value

4;

accumulateShadowCascades

accumulateShadowCascades: boolean;

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

For directional lights, accumulate all shadow cascades.

Default Value

true;