Interface LightShadowOptions

Light shadow options

LightShadowOptions

2024.1.3

yisky

interface LightShadowOptions {
    autoUpdate?: boolean;
    bias?: number;
    camera?: {
        far: number;
        frustumSize?: number;
        near: number;
    };
    intensity?: number;
    mapSize?: number;
    needsUpdate?: boolean;
    normalBias?: number;
    radius?: number;
}

Properties

autoUpdate?: boolean

Enables automatic updates of the light's shadow. If you do not require dynamic lighting / shadows, you may set this to false.

LightShadowOptions

bias?: number

Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.

The Very tiny adjustments here (in the order of 0.0001) may help reduce artifacts in shadows.

LightShadowOptions

camera?: {
    far: number;
    frustumSize?: number;
    near: number;
}

Shadow camera defining.

LightShadowOptions

intensity?: number

The intensity of the shadow. The default is 1. Valid values are in the range [0, 1].

LightShadowOptions

mapSize?: number

Defining the width and height of the shadow map

Higher values give better quality shadows at the cost of computation time.

LightShadowOptions

needsUpdate?: boolean

When set to true, shadow maps will be updated in the next render call. If you have set autoUpdate to false, you will need to set this property to true and then make a render call to update the light's shadow.

LightShadowOptions

normalBias?: number

Defines how much the position used to query the shadow map is offset along the object normal.

LightShadowOptions

radius?: number

Setting this to values greater than 1 will blur the edges of the shadow.toi

LightShadowOptions