Class FrameGraphClearTextureTask
Hierarchy
- FrameGraphTaskMultiRenderTarget
- FrameGraphClearTextureTask
Constructors
constructor
-
Constructs a new clear task.
Parameters
- name: string
The name of the task.
- frameGraph: FrameGraph
The frame graph the task belongs to.
Returns FrameGraphClearTextureTask
- name: string
Properties
clear Color
If the color should be cleared.
clear Depth
If the depth should be cleared.
clear Stencil
If the stencil should be cleared.
color
The color to clear the texture with.
convert Color To Linear Space
If the color should be converted to linear space (default: false).
Optionaldependencies
The (texture) dependencies of the task (optional).
Optionaldepth Texture
The depth attachment texture to clear.
on After Task Execute
An observable that is triggered after the task is executed.
on Before Task Execute
An observable that is triggered before the task is executed.
on Textures Allocated Observable
An observable that is triggered after the textures have been allocated.
Readonlyoutput Depth Texture
The output depth texture (same as depthTexture, but the handle will be different).
Readonlyoutput Texture
The output texture (same as targetTexture, but the handle will be different).
stencil Value
The value to use to clear the stencil buffer (default: 0).
Optionaltarget Texture
The color texture to clear.
Accessors
disabled
-
get disabled(): boolean
Whether the task is disabled.
Returns boolean
-
set disabled(value: boolean): void
Parameters
- value: boolean
Returns void
name
-
get name(): string
The name of the task.
Returns string
-
set name(value: string): void
Parameters
- value: string
Returns void
passes
-
get passes(): IFrameGraphPass[]
Gets the passes of the task.
Returns IFrameGraphPass[]
passes Disabled
-
get passesDisabled(): IFrameGraphPass[]
Gets the disabled passes of the task.
Returns IFrameGraphPass[]
Methods
dispose
-
Disposes of the task.
Returns void
get Class Name
-
Gets the current class name
Returns string
the class name
init Async
-
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.
is Ready
-
Checks if the task is ready to be executed.
Returns boolean
True if the task is ready to be executed, else false.
record
-
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
- skipCreationOfDisabledPasses: boolean = false
set Output Layer And Face Indices
-
Sets the output layer and face indices for multi-target rendering.
Parameters
- indices: LayerAndFaceIndex[]
The array of layer and face indices.
Returns void
- indices: LayerAndFaceIndex[]
Task used to clear a texture.