gpu-curtains
    Preparing search index...

    Create a shadow map from a SpotLight by rendering to a depth texture using a PerspectiveCamera.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    renderer: CameraRenderer

    The CameraRenderer used to create this Shadow.

    index: number

    Index of this Shadow used in the corresponding CameraRenderer shadow buffer binding.

    sampleCount: number

    Sample count of the depthTexture. Only 1 is accepted for now.

    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.

    renderBundle: RenderBundle

    Optional RenderBundle to use for rendering the depth meshes.

    depthTexture: Texture

    Depth Texture used to create the shadow map.

    depthPassTarget: RenderTarget

    Depth RenderTarget onto which the castingMeshes will be rendered.

    depthComparisonSampler: Sampler

    Depth comparison Sampler used to compare depth in the shaders.

    castingMeshes: Map<string, Mesh>

    Map of all the parent Mesh casting shadows used to create the depth meshes.

    depthMeshes: Map<string, Mesh>

    Map of all the depth Mesh rendered to the shadow map.

    rendererBinding: BufferBinding

    CameraRenderer corresponding BufferBinding that holds all the bindings for this type of shadow to send to the shaders.

    light: SpotLight

    SpotLight associated with this SpotShadow.

    Options used to create this SpotShadow.

    Shadow PerspectiveCamera used for shadow calculations.

    focus: number

    Focus of the camera. Default to 1.

    Accessors

    • get isActive(): boolean

      Get whether this Shadow is actually casting shadows.

      Returns boolean

      • Whether this Shadow is actually casting shadows.
    • set isActive(value: boolean): void

      Start or stop casting shadows.

      Parameters

      • value: boolean

        New active state.

      Returns void

    Methods