API

Class FrameGraphCopyToTextureTask

Task used to copy a texture to another texture.

Hierarchy (View Summary)

Index
dependencies?: Set<FrameGraphTextureHandle>

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

lodLevel: number = 0

The LOD level to copy from the source texture (default: 0).

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 output texture (same as targetTexture, but the handle may be different).

sourceTexture: FrameGraphTextureHandle

The source texture to copy from.

targetTexture: FrameGraphTextureHandle

The target texture to copy to.

viewport?: any

The viewport to use when doing the copy. If set to null, the currently active viewport is used. If undefined (default), the viewport is reset to a full screen viewport before performing the copy.

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