API

Class FrameGraphClearTextureTask

Task used to clear a texture.

Hierarchy

  • FrameGraphTaskMultiRenderTarget
    • FrameGraphClearTextureTask
Index
clearColor: boolean = true

If the color should be cleared.

clearDepth: boolean = false

If the depth should be cleared.

clearStencil: boolean = false

If the stencil should be cleared.

color: Color4 = ...

The color to clear the texture with.

convertColorToLinearSpace: boolean = false

If the color should be converted to linear space (default: false).

dependencies?: Set<FrameGraphTextureHandle>

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

depthTexture?: any

The depth attachment texture to clear.

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.

outputDepthTexture: FrameGraphTextureHandle

The output depth texture (same as depthTexture, but the handle will be different).

outputTexture: FrameGraphTextureHandle

The output texture (same as targetTexture, but the handle will be different).

stencilValue: number = 0

The value to use to clear the stencil buffer (default: 0).

targetTexture?: any

The color texture to clear.

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

  • Records the task in the frame graph. Use this function to add content (render passes, ...) to the task.

    Parameters

    • skipCreationOfDisabledPasses: boolean = false

      If true, the disabled passe(s) won't be created.

    Returns FrameGraphRenderPass

  • Sets the output layer and face indices for multi-target rendering.

    Parameters

    • indices: LayerAndFaceIndex[]

      The array of layer and face indices.

    Returns void