Class FrameGraphPostProcessTask
Hierarchy (View Summary)
- FrameGraphTask
- FrameGraphPostProcessTask
- FrameGraphAnaglyphTask
- FrameGraphBlackAndWhiteTask
- FrameGraphBlurTask
- FrameGraphChromaticAberrationTask
- FrameGraphCircleOfConfusionTask
- FrameGraphColorCorrectionTask
- FrameGraphConvolutionTask
- FrameGraphCustomPostProcessTask
- FrameGraphExtractHighlightsTask
- FrameGraphFilterTask
- FrameGraphFXAATask
- FrameGraphGrainTask
- FrameGraphImageProcessingTask
- FrameGraphMotionBlurTask
- FrameGraphMeshBlendingTask
- FrameGraphPassTask
- FrameGraphPassCubeTask
- FrameGraphSharpenTask
- FrameGraphScreenSpaceCurvatureTask
- FrameGraphTAATask
- FrameGraphTonemapTask
- FrameGraphPostProcessTask
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new FrameGraphPostProcessTask(
name: string,
frameGraph: FrameGraph,
postProcess: EffectWrapper,
): FrameGraphPostProcessTaskConstructs a new post process task.
Parameters
- name: string
Name of the task.
- frameGraph: FrameGraph
The frame graph this task is associated with.
- postProcess: EffectWrapper
The post process to apply.
Returns FrameGraphPostProcessTask
- name: string
Properties
Optionaldependencies
The (texture) dependencies of the task (optional).
Optionaldepth Attachment Texture
The depth attachment texture to use for the post process (optional). Note that a post-process task never writes to the depth buffer: attaching a depth texture is only useful if you want to test against the depth/stencil aspect or write to the stencil buffer.
depth Read Only
If true, the depth attachment will be read-only. This means that the post process will not write to the depth buffer. Setting depthReadOnly and stencilReadOnly to true is useful when you want to also be able to bind this same depth/stencil attachment to a shader. Note that it will only work in WebGPU, as WebGL does not support read-only depth/stencil attachments.
depth Test
If depth testing should be enabled (default is true).
disable Color Write
If true, color write will be disabled when applying the post process. This means that the post process will not write to the color buffer.
draw Back Face
If true, the post process will be generated by a back face full-screen quad (CW order).
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 Attachment Texture
The output depth attachment texture. This texture will point to the same texture than the depthAttachmentTexture property if it is set. Note, however, that the handle itself will be different!
Readonlyoutput Texture
The output texture of the post process.
Readonlypost Process
The post process to apply.
source Sampling Mode
The sampling mode to use for the source texture.
Optionalsource Texture
The source texture to apply the post process on. It's allowed to be undefined if the post process does not require a source texture. In that case, targetTexture must be provided.
stencil Read Only
If true, the stencil attachment will be read-only. This means that the post process will not write to the stencil buffer. Setting depthReadOnly and stencilReadOnly to true is useful when you want to also be able to bind this same depth/stencil attachment to a shader. Note that it will only work in WebGPU, as WebGL does not support read-only depth/stencil attachments.
Optionalstencil State
The stencil state to use for the post process (optional).
Optionaltarget Texture
The target texture to render the post process to. If not supplied, a texture with the same configuration as the source texture will be created.
Optionalviewport
The viewport to use when applying the post process. If set to null, the currently active viewport is used. If undefined (default), the viewport is reset to a full screen viewport before applying the post process.
Accessors
alpha Mode
-
get alphaMode(): number
The alpha mode to use when applying the post process (default is ALPHA_DISABLE).
Returns number
-
set alphaMode(value: number): void
Parameters
- value: number
Returns void
disabled
-
get disabled(): boolean
Whether the task is disabled.
Returns boolean
-
set disabled(value: boolean): void
Parameters
- value: boolean
Returns void
draw Wrapper
-
get drawWrapper(): DrawWrapper
The draw wrapper used by the post process
Returns DrawWrapper
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 any
True if the task is ready to be executed, else false.
record
-
record(
skipCreationOfDisabledPasses?: boolean,
additionalExecute?: (context: FrameGraphRenderContext) => void,
additionalBindings?: (context: FrameGraphRenderContext) => void,
): FrameGraphRenderPassRecords 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.
OptionaladditionalExecute: (context: FrameGraphRenderContext) => voidOptionaladditionalBindings: (context: FrameGraphRenderContext) => void
Returns FrameGraphRenderPass
- skipCreationOfDisabledPasses: boolean = false
Task which applies a post process.