gpu-curtains
    Preparing search index...

    Interface SpotShadowParams

    Base parameters used to create a SpotShadow.

    interface SpotShadowParams {
        intensity?: number;
        bias?: number;
        normalBias?: number;
        pcfSamples?: number;
        depthTextureSize?: Vec2;
        depthTextureFormat?: GPUTextureFormat;
        autoRender?: boolean;
        useRenderBundle?: boolean;
        light: SpotLight;
        camera?: { near?: number; far?: number };
    }

    Hierarchy (View Summary)

    Index

    Properties

    intensity?: number

    Intensity of the shadow in the [0, 1] range. Default to 1.

    bias?: number

    Shadow map bias. Default to 0.

    normalBias?: number

    Shadow map normal bias. Default to 0.

    pcfSamples?: number

    Number of samples to use for Percentage Closer Filtering calculations in the shader. Increase for smoother shadows, at the cost of performance. Default to 1.

    depthTextureSize?: Vec2

    Size of the depth Texture to use. Default to Vec2(512).

    depthTextureFormat?: GPUTextureFormat

    Format of the depth Texture to use. Default to depth24plus.

    autoRender?: boolean

    Whether the shadow should be automatically rendered each frame or not. Should be set to false if the scene is static and be rendered manually instead. Default to true.

    useRenderBundle?: boolean

    Whether the shadow casting meshes should be rendered using a RenderBundle. Default to true.

    light: SpotLight

    SpotLight used to create the SpotShadow.

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

    Optional PerspectiveCamera near and far values to use.

    Type Declaration

    • Optionalnear?: number

      Optional PerspectiveCamera near value to use. Default to 0.1.

    • Optionalfar?: number

      Optional PerspectiveCamera far value to use, if the SpotLight range is 0. If the light range is greater than 0, then the range value will be used instead. Default to 150.