API

Class FrameGraphCascadedShadowGeneratorTask

Task used to generate a cascaded shadow map from a list of objects.

Hierarchy (View Summary)

Index
dependencies?: Set<FrameGraphTextureHandle>

The (texture) dependencies of the task (optional).

depthTexture?: any

The depth texture used by the autoCalcDepthBounds feature (optional if autoCalcDepthBounds is set to false). This texture is used to compute the min/max depth bounds of the scene to setup the cascaded shadow generator. The texture should contain either “view,” “normalized view,” or “screen” depth values - if possible, connect “normalized view,” or “screen” for best performance. Warning: Do not set a texture if you are not using the autoCalcDepthBounds feature, to avoid generating a depth texture that will not be used.

depthTextureType: DepthTextureType = DepthTextureType.NormalizedViewDepth

The type of the depth texture used by the autoCalcDepthBounds feature.

objectList: FrameGraphObjectList

The object list that generates shadows.

onAfterTaskExecute: Observable<FrameGraphTask> = ...

An observable that is triggered after the task is executed.

onBeforeTaskExecute: Observable<FrameGraphTask> = ...

An observable that is triggered before the task is executed.

onTexturesAllocatedObservable: Observable<FrameGraphRenderContext> = ...

An observable that is triggered after the textures have been allocated.

outputTexture: FrameGraphTextureHandle

The shadow map texture.

shadowGenerator: ShadowGenerator

The shadow generator.

  • This function is called once after the task has been added to the frame graph and before the frame graph is built for the first time. This allows you to initialize asynchronous resources, which is not possible in the constructor.

    Returns Promise<unknown>

    A promise that resolves when the initialization is complete.