# Frame Graph Task List

> Learn all about the tasks implemented in the Frame Graph system.

Source: https://doc.babylonjs.com/features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphTaskList

This page describes all the tasks that are implemented in the framework and are available for your own use when creating frame graphs.

Note that most of these tasks are wrappers around existing processes in Babylon.js: whenever applicable, we will provide a link to the original documentation to avoid redundant explanations.

To illustrate the use of each task, two PGs are provided:
* one using frame graph classes
* the other using a node render graph

This way, you can choose which approach best suits your needs.

## Layer tasks

### FrameGraphGlowLayerTask

![Glow layer](https://doc.babylonjs.com/img/frameGraph/task_glow.webp)

Provides the same functionality as the [glow layer](https://doc.babylonjs.com/features/featuresDeepDive/mesh/glowLayer) class.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphglowlayertask)

- [Playground: Glow layer](https://playground.babylonjs.com/#GCG2Z7#5) - Example of a frame graph using the glow layer task
- [Playground: Glow layer (NRG)](https://playground.babylonjs.com/#GCG2Z7#6) - Example of a node render graph using the glow layer block

Inputs:
* **targetTexture**. The target texture to apply the effect layer to. The effect will be blended with the contents of this texture.
* **objectRendererTask**. The object renderer task used to render the objects in the texture to which the layer will be applied. This is needed because the layer may have to inject code into the rendering manager used by the object renderer task.
* **layerTexture** (optional). The layer texture to render the effect into. If not provided, a default texture will be created, based on **targetTexture** size, type and format.
<br/>

Properties:
* **layer**. Gives you access to the configuration of the glow layer itself.
<br/>

Outputs:
* **outputTexture**. The output texture of the task (same underlying texture as **targetTexture**, but the handle will be different).

### FrameGraphHighlightLayerTask

![Highlight layer](https://doc.babylonjs.com/img/frameGraph/task_highlight.webp)

Provides the same functionality as the [highlight layer](https://doc.babylonjs.com/features/featuresDeepDive/mesh/highlightLayer) class.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphhighlightlayertask)

- [Playground: Highlight layer](https://playground.babylonjs.com/#PV8OLY#35) - Example of a frame graph using the highlight layer task
- [Playground: Highlight layer (NRG)](https://playground.babylonjs.com/#PV8OLY#36) - Example of a node render graph using the highlight layer block

Inputs:
* **targetTexture**. The target texture to apply the effect layer to. The effect will be blended with the contents of this texture.
* **objectRendererTask**. The object renderer task used to render the objects in the texture to which the layer will be applied. This is needed because the layer may have to inject code into the rendering manager used by the object renderer task.
* **layerTexture** (optional). The layer texture to render the effect into. If not provided, a default texture will be created, based on **targetTexture** size, type and format.
<br/>

Properties:
* **layer**. Gives you access to the configuration of the highlight layer itself.
<br/>

Outputs:
* **outputTexture**. The output texture of the task (same underlying texture as **targetTexture**, but the handle will be different).
<br/>

Note that the **objectRendererTask** you define for the corresponding property must use a depth texture with a stencil aspect. An exception will be thrown if this is not the case.

### FrameGraphSelectionOutlineLayerTask

![Selection Outline layer](https://doc.babylonjs.com/img/frameGraph/task_selectionoutline.webp)

Provides the same functionality as the [Selection outline layer](https://doc.babylonjs.com/features/featuresDeepDive/mesh/selectionOutlineLayer) class.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphselectionoutlinelayertask)

- [Playground: Selection outline layer](https://playground.babylonjs.com/#E1F0GP#4) - Example of a frame graph using the Selection outline layer task
- [Playground: Selection outline layer (NRG)](https://playground.babylonjs.com/#ADUC74#1) - Example of a node render graph using the Selection outline layer block

Inputs:
* **targetTexture**. The target texture to apply the effect layer to. The effect will be blended with the contents of this texture.
* **objectRendererTask**. The object renderer task used to render the objects in the texture to which the layer will be applied. This is needed because the layer may have to inject code into the rendering manager used by the object renderer task.
* **depthTexture**. The depth texture to use when rendering the selection outline layer. It must store the scene depth in camera view space Z, normalized or not. If not normalized, the **storeCameraSpaceZ** option must be passed to the constructor.
* **layerTexture** (optional). The layer texture to render the effect into. If not provided, a default texture will be created, based on **targetTexture** size, type and format.
<br/>

Properties:
* **layer**. Gives you access to the configuration of the selection outline layer itself.
<br/>

Outputs:
* **outputTexture**. The output texture of the task (same underlying texture as **targetTexture**, but the handle will be different).
<br/>

## Miscellaneous tasks

### FrameGraphComputeShaderTask

![Compute shader](https://doc.babylonjs.com/img/frameGraph/task_computeshader.webp)

Task used to execute a compute shader (WebGPU only).

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcomputeshadertask)

- [Playground: Compute shader task](https://playground.babylonjs.com/?webgpu#KOBPUW#18) - Example of a frame graph using the compute shader task
- [Playground: Compute shader task (NRG)](https://playground.babylonjs.com/?webgpu#KOBPUW#19) - Example of a node render graph using the compute shader block

Inputs:
* **dispatchSize**. Defines the dispatch size for the compute shader.
* **indirectDispatch** (optional). Defines an indirect dispatch buffer and offset. If set, this will be used instead of the **dispatchSize** property and an indirect dispatch will be performed.
* **execute** (optional). An optional execute function that will be called at the beginning of the task execution.
<br/>

You can use the **execute** function to apply additional settings (uniform parameters, textures, etc.) before executing the compute shader: see the example above.

The compute shader created by the class is accessible via the **computeShader** getter. For ease of use, all methods of the original [ComputeShader](https://doc.babylonjs.com/typedoc/classes/babylon.computeshader) class (such as `setTexture`, `setInternalTexture`, etc.) are available directly in the `FrameGraphComputeShaderTask` class.

You can create uniform buffers directly via the `FrameGraphComputeShaderTask` class by calling the `createUniformBuffer(name, description, autoUpdate)` method. The advantage over creating the buffer by calling `new UniformBuffer()` is that, by default (see the **autoUpdate** parameter in `createUniformBuffer`), the `UniformBuffer.update()` method will be called automatically before the compute shader is run. Also, the buffer will be automatically disposed when the task is disposed.

### FrameGraphCullObjectsTask

![Cull meshes](https://doc.babylonjs.com/img/frameGraph/task_cull.webp)

Task used to cull objects that are not visible.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcullobjectstask)

- [Playground: Cull task](https://playground.babylonjs.com/#MJDYB1#15) - Example of a frame graph using the cull task
- [Playground: Cull task (NRG)](https://playground.babylonjs.com/#MJDYB1#16) - Example of a node render graph using the cull block

Inputs:
* **objectList**. The object list to cull.
* **camera**. The camera to use for culling.
<br/>

Outputs:
* **outputObjectList**. The output object list containing the culled objects.
<br/>

Notes:
* Only meshes are culled, not particle systems
* If meshes are frozen, culling is not performed and the last culling result before switching to frozen mode is reused
* If the task is disabled, the list of output objects (**outputObjectList**) is identical to the list of input objects (**objectList**).

### FrameGraphExecuteTask

![Execute task](https://doc.babylonjs.com/img/frameGraph/task_execute.webp)

Task used to execute a custom function.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphexecutetask)

- [Playground: Execute task](https://playground.babylonjs.com/#SUEU9U#110) - Example of a frame graph using the execute task
- [Playground: Execute task (NRG)](https://playground.babylonjs.com/#SUEU9U#133) - Example of a node render graph using the execute block

Inputs:
* **func**. The function to execute when the task is enabled.
* **funcDisabled** (optional). The function to execute when the task is disabled. If not provided, **func** is also used when the task is disabled.
* **customIsReady** (optional). Custom readiness check.
<br/>

You can use this task for any custom process you want to run during the execution of the frame graph. In the PG example above, we use it to increment a counter each time the task is executed.

### FrameGraphGUITask

![GUI](https://doc.babylonjs.com/img/frameGraph/task_gui.webp)

Task that renders a GUI texture.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.gui.framegraphguitask)

- [Playground: GUI task](https://playground.babylonjs.com/#SUEU9U#111) - Example of a frame graph using the gui task
- [Playground: GUI task (NRG)](https://playground.babylonjs.com/#SUEU9U#134) - Example of a node render graph using the gui block

Inputs:
* **targetTexture**. The target texture to render the GUI to.
<br/>

Properties:
* **gui**. Gets the underlying advanced dynamic texture.
<br/>

Outputs:
* **outputTexture**. The output texture of the task. This is the same texture as the target texture, but the handles are different!
<br/>

Note that you can provide an existing instance of `AdvancedDynamicTexture` at construction time (third parameter of the constructor), but you must ensure that the **useStandalone** property is set to *true*, as this is required for correct use in frame graphs!

### FrameGraphLightingVolumeTask

![Lighting volume](https://doc.babylonjs.com/img/frameGraph/task_lightingvolume.webp)

Task used to create a lighting volume from a directional light's shadow generator.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphlightingvolumetask)

- [Playground: Lighting volume task](https://playground.babylonjs.com/?webgpu#3VH0AC#13) - Example of a frame graph using the lighting volume task
- [Playground: Lighting volume task (NRG)](https://playground.babylonjs.com/?webgpu#3VH0AC#15) - Example of a node render graph using the lighting volume block

Inputs:
* **shadowGenerator**. The shadow generator used to create the lighting volume.
<br/>

Properties:
* **lightingVolume**. The lighting volume created by this task.
<br/>

Outputs:
* **outputMeshLightingVolume**. The output object list containing the lighting volume mesh. You can get the mesh by doing  `outputMeshLightingVolume.meshes[0]`.
<br/>

This task is typically used in conjunction with [FrameGraphVolumetricLightingTask](#framegraphvolumetriclightingtask) to generate volumetric lighting for a directional light.

### FrameGraphMinMaxReducerTask

![Min/max reducer task](https://doc.babylonjs.com/img/frameGraph/task_minmaxreducer.webp)

Reduces the red channel of a frame graph color texture, or the depth aspect of a WebGPU depth/stencil attachment, to its minimum and maximum values.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphminmaxreducertask)

- [Playground: Min/max reducer task](https://playground.babylonjs.com/#LIZ1OE#2) - Reuse a geometry renderer's normalized view-depth texture with the frame graph min/max reducer task
- [Playground: Min/max reducer task (NRG)](https://playground.babylonjs.com/#ILJO1V#2) - Use the MinMaxReducer block in a node render graph to reduce geometry view depth

Inputs:
* **sourceTexture**. A `FrameGraphTextureHandle` for a non-integer color texture or a supported WebGPU depth/stencil attachment produced by an earlier task.
<br/>

Depth/stencil sources must be single-sampled off-screen 2D attachments on WebGPU; the initial reduction samples only the depth aspect with `texture_depth_2d`, not stencil. Backbuffer depth/stencil, stencil-only or unsupported depth formats, multisampled attachments, and 2D-array, cube, or 3D textures are rejected. No depth/stencil attachment is supported as a source on WebGL.

Properties:
* **depthRedux**. Ignores the depth clear value when reducing depth-as-color data (default: `false`). Automatically enabled for depth/stencil attachments.
* **depthTextureType**. The depth-as-color encoding when **depthRedux** is enabled: `DepthTextureType.NormalizedViewDepth` (default), `DepthTextureType.ViewDepth`, or `DepthTextureType.ScreenDepth`. Depth/stencil attachments automatically use screen depth, with the clear value handled for both forward (1) and reverse (0) depth.
* **textureType**. Type of the intermediate and output textures: `TEXTURETYPE_HALF_FLOAT` (default), `TEXTURETYPE_FLOAT`, or `TEXTURETYPE_UNSIGNED_BYTE`.
* **waitForReadback**. Whether to wait for WebGPU readback before notifying observers (default: `false`). When `true`, the notification is asynchronous after readback; it does not block frame execution. WebGL readback remains synchronous.
<br/>

Outputs:
* **outputTexture**. A 1x1 RG color texture handle, with the minimum in red and maximum in green, for downstream graph tasks.
* **onAfterReductionPerformed**. Observable receiving `{ min, max }` when subscribed. With depth reduction enabled, equal-valued depth falls back to `[0, 1]`. Without observers, the task does not perform CPU readback; use **outputTexture** if only GPU-side results are needed.
<br/>

For example, after configuring a `FrameGraphGeometryRendererTask` to request its normalized view-depth channel and adding it to `frameGraph`:

```javascript
const reducerTask = new FrameGraphMinMaxReducerTask("depth range", frameGraph);
reducerTask.sourceTexture = geometryRendererTask.geometryNormViewDepthTexture;
reducerTask.depthRedux = true;
reducerTask.onAfterReductionPerformed.add(({ min, max }) => {
    // Use the reduced depth range after readback.
});
frameGraph.addTask(reducerTask);
```

The geometry renderer task must be added **before** the reducer, and `geometryNormViewDepthTexture` is available only when that geometry channel was requested. This reuses the geometry depth-as-color output without rendering another depth map. For other depth-as-color encodings, use `geometryViewDepthTexture` or `geometryScreenDepthTexture` and set **depthTextureType** to match. Set **depthRedux** to `true` for depth-as-color values so the depth clear value is ignored; leave it `false` for ordinary color data. For WebGPU depth/stencil attachments, neither setting needs to be changed: the task enables depth reduction and infers screen depth automatically. With the default **waitForReadback**, a WebGPU notification may contain previous values; setting it to `true` notifies only after the asynchronous GPU readback, not synchronously with the current frame.

Unlike this frame graph task, the legacy `MinMaxReducer.setSourceTexture` accepts a `RenderTargetTexture`, not a frame graph texture handle. The legacy reducer also has **waitForReadback** with the same default and WebGPU notification behavior.

## Post-process tasks

Unless otherwise specified, all post-process tasks share certain common properties.

Inputs:
* **sourceTexture**. The source texture to apply the post process to. It is allowed to be `undefined` if the post process does not require a source texture. In that case, `targetTexture` must be provided.
* **sourceSamplingMode**. The sampling mode to use for the source texture.
* **alphaMode**. The alpha mode to use when applying the post process (default is ALPHA_DISABLE).
* **targetTexture** (optional). 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.
* **stencilState** (optional). The stencil state to use for the post process.
* **depthAttachmentTexture** (optional). The depth attachment texture to use for the post process. 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.
<br/>

Properties:
* **depthReadOnly**. If *true*, the depth attachment will be read-only. This means that the post process will not write to the depth/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.
* **stencilReadOnly**. If *true*, the stencil attachment will be read-only. This means that the post process will not write to the stencil buffer. See above for further explanation.
* **disableColorWrite**. 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.
* **drawBackFace**. If *true*, the post process will be generated by a back face full-screen quad (CW order).
* **depthTest**. If depth testing should be enabled.
* **viewport** (optional). 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.
<br/>

Outputs:
* **outputTexture**. The output texture of the post process. It is the same texture as **targetTexture**, but with a different handle.
* **outputDepthAttachmentTexture**. The output depth attachment texture. This texture will point to the same texture as the **depthAttachmentTexture** property if it is set. Note, however, that the handle itself will be different!
<br/>

Since these properties are common to all post-process tasks, we will not repeat their description in the following sections.

In addition, all these tasks are wrappers around existing post-process classes. You should therefore refer to the documentation for these classes (for each task in the following sections, we provide a link to the corresponding post-process class) to find out which specific properties are available for each task: you can access these properties via **postProcessTask.postProcess**.

### FrameGraphAnaglyphTask

![Anaglyph post-process](https://doc.babylonjs.com/img/frameGraph/task_anaglyph.webp)

Task which applies an anaglyph post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphanaglyphtask)

- [Playground: Anaglyph task](https://playground.babylonjs.com/#SUEU9U#112) - Example of a frame graph using the anaglyph task
- [Playground: Anaglyph task (NRG)](https://playground.babylonjs.com/#SUEU9U#135) - Example of a node render graph using the anaglyph block

Inputs:
* **leftTexture**. The texture to use as the left texture.

### FrameGraphBlackAndWhiteTask

![Black and white post-process](https://doc.babylonjs.com/img/frameGraph/task_blackandwhite.webp)

Task which applies a black and white post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphblackandwhitetask)

- [Playground: Black and white task](https://playground.babylonjs.com/#SUEU9U#113) - Example of a frame graph using the black and white task
- [Playground: Black and white task (NRG)](https://playground.babylonjs.com/#SUEU9U#136) - Example of a node render graph using the black and white block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinblackandwhitepostprocess). The properties of the post-process.
<br/>

### FrameGraphBloomTask

![Bloom post-process](https://doc.babylonjs.com/img/frameGraph/task_bloom.webp)

Task which applies a bloom post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphbloomtask)

- [Playground: Bloom task](https://playground.babylonjs.com/#SUEU9U#114) - Example of a frame graph using the bloom task
- [Playground: Bloom task (NRG)](https://playground.babylonjs.com/#SUEU9U#137) - Example of a node render graph using the bloom block

This post-process **doesn't share** the common properties of post-processes!

Inputs:
* **sourceTexture**. The source texture to apply the bloom effect on.
* **sourceSamplingMode**. The sampling mode to use for the source texture.
* **alphaMode**. The alpha mode to use when applying the bloom post process (default is ALPHA_DISABLE).
* **targetTexture** (optional). The target texture to render the bloom effect to. If not supplied, a texture with the same configuration as the source texture will be created.
<br/>

Properties:
* **hdr** (read only). Whether the bloom effect is HDR. When *true*, the bloom effect will use a higher precision texture format (half float or float). Else, it will use unsigned byte.
* [bloom](https://doc.babylonjs.com/typedoc/classes/babylon.thinbloomeffect). The properties of the post-process.
<br/>

Outputs:
* **outputTexture**. The output texture of the bloom effect.
<br/>

Note that you can set **weight**, **kernel**, **threshold**, and **hdr** at construction time (these are constructor parameters). You can change these values later via the **bloom** property, except for **hdr**, which is only a construction parameter.

### FrameGraphBlurTask

![Blur post-process](https://doc.babylonjs.com/img/frameGraph/task_blur.webp)

Task which applies a blur post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphblurtask)

- [Playground: Blur task](https://playground.babylonjs.com/#SUEU9U#115) - Example of a frame graph using the blur task
- [Playground: Blur task (NRG)](https://playground.babylonjs.com/#SUEU9U#138) - Example of a node render graph using the blur block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinblurpostprocess). The properties of the post-process.
<br/>

### FrameGraphChromaticAberrationTask

![Chromatic aberration post-process](https://doc.babylonjs.com/img/frameGraph/task_chromaticaberration.webp)

Task which applies a chromatic aberration post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphchromaticaberrationtask)

- [Playground: Chromatic aberration task](https://playground.babylonjs.com/#SUEU9U#116) - Example of a frame graph using the chromatic aberration task
- [Playground: Chromatic aberration task (NRG)](https://playground.babylonjs.com/#SUEU9U#139) - Example of a node render graph using the chromatic aberration block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinchromaticaberrationpostprocess). The properties of the post-process.
<br/>

### FrameGraphCircleOfConfusionTask

![Circle of confusion post-process](https://doc.babylonjs.com/img/frameGraph/task_circleofconfusion.webp)

Task which applies a circle of confusion post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcircleofconfusiontask)

- [Playground: Circle of confusion task](https://playground.babylonjs.com/#SUEU9U#117) - Example of a frame graph using the circle of confusion task
- [Playground: Circle of confusion task (NRG)](https://playground.babylonjs.com/#SUEU9U#154) - Example of a node render graph using the circle of confusion block

Inputs:
* **depthTexture**. The depth texture to use for the circle of confusion effect. It must store camera space depth (Z coordinate).
* **depthSamplingMode**. The sampling mode to use for the depth texture.
* **camera**. The camera to use for the circle of confusion effect.
<br/>

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thincircleofconfusionpostprocess). The properties of the post-process.
<br/>

### FrameGraphColorCorrectionTask

![Color correction post-process](https://doc.babylonjs.com/img/frameGraph/task_colorcorrection.webp)

Task which applies a color correction post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcolorcorrectiontask)

- [Playground: Color correction task](https://playground.babylonjs.com/#SUEU9U#118) - Example of a frame graph using the color correction task
- [Playground: Color correction task (NRG)](https://playground.babylonjs.com/#SUEU9U#141) - Example of a node render graph using the color correction block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thincolorcorrectionpostprocess). The properties of the post-process.
<br/>

### FrameGraphConvolutionTask

![Convolution post-process](https://doc.babylonjs.com/img/frameGraph/task_convolution.webp)

Task which applies a convolution post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphconvolutiontask)

- [Playground: Convolution task](https://playground.babylonjs.com/#SUEU9U#119) - Example of a frame graph using the convolution task
- [Playground: Convolution task (NRG)](https://playground.babylonjs.com/#SUEU9U#142) - Example of a node render graph using the convolution block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinconvolutionpostprocess). The properties of the post-process.
<br/>

### FrameGraphCustomPostProcessTask

![Custom post-process](https://doc.babylonjs.com/img/frameGraph/task_custompostprocess.webp)

Task which applies a custom post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcustompostprocesstask)

- [Playground: Custom task](https://playground.babylonjs.com/#R33LVG#6) - Example of a frame graph using the custom task

Inputs:
* **onApplyObservable**. Observable triggered when bind is called for the post process. Use this to set custom uniforms (see example playground).
<br/>

### FrameGraphDepthOfFieldTask

![Depth of field post-process](https://doc.babylonjs.com/img/frameGraph/task_depthoffield.webp)

Task which applies a depth of field post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphdepthoffieldtask)

- [Playground: Depth of field task](https://playground.babylonjs.com/#SUEU9U#120) - Example of a frame graph using the depth of field task
- [Playground: Depth of field task (NRG)](https://playground.babylonjs.com/#SUEU9U#155) - Example of a node render graph using the depth of field block

This post-process **doesn't share** the common properties of post-processes!

Inputs:
* **sourceTexture**. The source texture to apply the depth of field effect on.
* **sourceSamplingMode**. The sampling mode to use for the source texture.
* **alphaMode**. The alpha mode to use when applying the depth of field post process (default is ALPHA_DISABLE).
* **depthTexture**. The depth texture to use for the depth of field effect. Should store camera space depth (Z coordinate).
* **depthSamplingMode**. The sampling mode to use for the depth texture.
* **camera**. The camera used to render the scene.
* **targetTexture** (optional). The target texture to render the depth of field effect to. If not supplied, a texture with the same configuration as the source texture will be created.
<br/>

Properties:
* **hdr** (read only). Whether the depth of field effect is applied on HDR textures. When true, the depth of field effect will use a higher precision texture format (half float or float). Else, it will use unsigned byte.
* [depthOfField](https://doc.babylonjs.com/typedoc/classes/babylon.thindepthoffieldeffect). The properties of the post-process.
<br/>

Outputs:
* **outputTexture**. The output texture of the depth of field effect.
<br/>

Note that **hdr** can only be set at construction time (it is a constructor parameter).

### FrameGraphExtractHighlightsTask

![Extract highlights post-process](https://doc.babylonjs.com/img/frameGraph/task_extracthighlights.webp)

Task which applies an extract-highlights post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphextracthighlightstask)

- [Playground: Extract highlights task](https://playground.babylonjs.com/#SUEU9U#121) - Example of a frame graph using the extract highlights task
- [Playground: Extract highlights task (NRG)](https://playground.babylonjs.com/#SUEU9U#144) - Example of a node render graph using the extract highlights block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinextracthighlightspostprocess). The properties of the post-process.
<br/>

### FrameGraphFilterTask

![Filter post-process](https://doc.babylonjs.com/img/frameGraph/task_filter.webp)

Task which applies a filter post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphfiltertask)

- [Playground: Filter task](https://playground.babylonjs.com/#SUEU9U#122) - Example of a frame graph using the filter task
- [Playground: Filter task (NRG)](https://playground.babylonjs.com/#SUEU9U#145) - Example of a node render graph using the filter block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinfilterpostprocess). The properties of the post-process.
<br/>

### FrameGraphFXAATask

![FXAA post-process](https://doc.babylonjs.com/img/frameGraph/task_fxaa.webp)

Task which applies an FXAA post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphfxaatask)

- [Playground: FXAA task](https://playground.babylonjs.com/#SUEU9U#123) - Example of a frame graph using the FXAA task
- [Playground: FXAA task (NRG)](https://playground.babylonjs.com/#SUEU9U#146) - Example of a node render graph using the FXAA block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinfxaapostprocess). The properties of the post-process.
<br/>

### FrameGraphGrainTask

![Grain post-process](https://doc.babylonjs.com/img/frameGraph/task_grain.webp)

Task which applies a grain post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphgraintask)

- [Playground: Grain task](https://playground.babylonjs.com/#SUEU9U#124) - Example of a frame graph using the grain task
- [Playground: Grain task (NRG)](https://playground.babylonjs.com/#SUEU9U#147) - Example of a node render graph using the grain block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thingrainpostprocess). The properties of the post-process.
<br/>

### FrameGraphImageProcessingTask

![Image processing post-process](https://doc.babylonjs.com/img/frameGraph/task_imageprocessing.webp)

Task which applies an image-processing post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphimageprocessingtask)

- [Playground: Image processing task](https://playground.babylonjs.com/#SUEU9U#125) - Example of a frame graph using the image processing task
- [Playground: Image processing task (NRG)](https://playground.babylonjs.com/#SUEU9U#148) - Example of a node render graph using the image processing block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinimageprocessingpostprocess). The properties of the post-process.
<br/>

If you use this post-process, you will probably want to set **disableImageProcessing = true** on the object renderer that renders the texture to which the image processing is applied.
Alternatively, you can also set `FrameGraphImageProcessingTask.postProcess.fromLinearSpace = false` to indicate that the source texture is in gamma space.

### FrameGraphMeshBlendingTask

![Coastal cliff scene with mesh blending](https://doc.babylonjs.com/img/how_to/meshBlending/coastal-after.png)

Task which softens validated contacts between meshes by blending SceneColor in screen space.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphmeshblendingtask)

[Mesh blending documentation](https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/meshBlending)

- [Playground: Mesh blending coastal cliff](https://playground.babylonjs.com/#BJBKKU#12) - Coastal cliff scene using the FrameGraph mesh blending task
- [Playground: Mesh blending coastal cliff (NRG)](https://playground.babylonjs.com/#BJBKKU#14) - Coastal cliff scene loading the mesh blending Node Render Graph with ParseFromSnippetAsync

Inputs:
* **sourceTexture**. SceneColor to blend.
* **meshBlendTagTexture**. Packed `R8UI` mesh tags generated by `FrameGraphGeometryRendererTask`.
* **depthTexture**. View or screen depth aligned with SceneColor and the mesh tags.
* **baseColorTexture** (optional). Linear albedo used to attenuate transferred shadows. Omitting it compiles all shadow-estimation work out.
* **camera**. Camera used to project world radii and reconstruct positions.
* **targetTexture** (optional). Target texture for the result. If omitted, a compatible texture is created from **sourceTexture**.
<br/>

Properties:
* **quality**. Compile-time quality variant.
* **radiusClasses**. Four world-radius and minimum-physical-pixel definitions.
* **slopeFactor**. Contact-slope narrowing factor. A value of `1` disables narrowing.
* **depthType**. Representation stored in **depthTexture**.
* **debugMode**. Compiled diagnostic visualization.
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinmeshblendingpostprocess). The shared thin post-process implementation.
<br/>

Outputs:
* **outputTexture**. The blended SceneColor result.
<br/>

All connected textures must have matching physical dimensions and sample counts, and must be single-sampled. The tag texture must use `TEXTURETYPE_UNSIGNED_BYTE` with `TEXTUREFORMAT_RED_INTEGER`, nearest sampling, and no mipmaps. The effect supports WebGL 2 and WebGPU.

### FrameGraphMotionBlurTask

![Motion blur post-process](https://doc.babylonjs.com/img/frameGraph/task_motionblur.webp)

Task which applies a motion blur post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphmotionblurtask)

- [Playground: Motion blur task (screen based)](https://playground.babylonjs.com/#YB006J#790) - Example of a frame graph using the motion blur task (screen based)
- [Playground: Motion blur task (object based)](https://playground.babylonjs.com/#YB006J#791) - Example of a frame graph using the motion blur task (object based)
- [Playground: Motion blur task (NRG)](https://playground.babylonjs.com/#YB006J#794) - Example of a node render graph using the motion blur block

Inputs:
* **velocityTexture** (optional). The velocity texture to use for the motion blur effect. Needed for object-based motion blur.
* **depthTexture** (optional). The (view) depth texture to use for the motion blur effect. Needed for screen-based motion blur.
<br/>

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinmotionblurpostprocess). The properties of the post-process.
<br/>

This task requires a geometry texture as input, which depends on the type of motion blur you want to use:
* for object-based motion blur, you need to connect a **geometry velocity** texture
* for screen-based motion blur, you need to connect a **geometry view depth** texture

If the appropriate texture is not connected according to the current motion blur type, you will get an error in the console log.

Both of these textures can be generated by the [FrameGraphGeometryRendererTask](#framegraphgeometryrenderertask) task (see below).

### FrameGraphScreenSpaceCurvatureTask

![Screen space curvature post-process](https://doc.babylonjs.com/img/frameGraph/task_screenspacecurvature.webp)

Task which applies a screen space curvature post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphscreenspacecurvaturetask)

- [Playground: Screen space curvature task](https://playground.babylonjs.com/#SUEU9U#126) - Example of a frame graph using the screen space curvature task
- [Playground: Screen space curvature task (NRG)](https://playground.babylonjs.com/#SUEU9U#158) - Example of a node render graph using the screen space curvature block

Inputs:
* **normalTexture**. The normal texture to use for the screen space curvature effect. It must store normals in camera view space.
<br/>

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinscreenspacecurvaturepostprocess). The properties of the post-process.
<br/>

### FrameGraphSharpenTask

![Sharpen post-process](https://doc.babylonjs.com/img/frameGraph/task_sharpen.webp)

Task which applies a sharpen post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphsharpentask)

- [Playground: Sharpen task](https://playground.babylonjs.com/#SUEU9U#127) - Example of a frame graph using the sharpen task
- [Playground: Sharpen task (NRG)](https://playground.babylonjs.com/#SUEU9U#150) - Example of a node render graph using the sharpen block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thinsharpenpostprocess). The properties of the post-process.
<br/>

### FrameGraphSSAO2RenderingPipelineTask

![SSAO2 post-process](https://doc.babylonjs.com/img/frameGraph/task_ssao2.webp)

Task which applies a screen-space ambient occlusion post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphssao2renderingpipelinetask)

- [Playground: SSAO2 task](https://playground.babylonjs.com/#SUEU9U#128) - Example of a frame graph using the SSAO2 task
- [Playground: SSAO2 task (NRG)](https://playground.babylonjs.com/#SUEU9U#156) - Example of a node render graph using the SSAO2 block

This post-process **doesn't share** the common properties of post-processes!

Inputs:
* **sourceTexture**. The source texture to apply the SSAO2 effect on.
* **sourceSamplingMode**. The sampling mode to use for the source texture.
* **alphaMode**. The alpha mode to use when applying the SSAO post process (default is ALPHA_DISABLE).
* **depthTexture**. The depth texture used by the SSAO2 effect (Z coordinate in camera view space).
* **normalTexture**. The normal texture used by the SSAO2 effect (normal vector in camera view space).
* **camera**. The camera used to render the scene.
* **targetTexture** (optional). The target texture to render the SSAO2 effect to. If not supplied, a texture with the same configuration as the source texture will be created.
<br/>

Properties:
* **ratioSSAO** (read only). The ratio between the SSAO texture size and the source texture size.
* **ratioBlur** (read only). The ratio between the SSAO blur texture size and the source texture size.
* **textureType** (read only). The texture type used by the different post processes created by SSAO2. It's a read-only property. If you want to change it, you must recreate the task and pass the appropriate texture type to the constructor.
* [ssao](https://doc.babylonjs.com/typedoc/classes/babylon.thinssao2renderingpipeline). The properties of the post-process.
<br/>

Outputs:
* **outputTexture**. The output texture of the ssao effect.
<br/>

Note that you can set **ratioSSAO**, **ratioBlur** and **textureType** only at construction time (these are constructor parameters).

### FrameGraphSSRRenderingPipelineTask

![SSR post-process](https://doc.babylonjs.com/img/frameGraph/task_ssr.webp)

Task which applies a screen-space reflection post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphssrrenderingpipelinetask)

- [Playground: SSR task](https://playground.babylonjs.com/#SUEU9U#129) - Example of a frame graph using the SSR task
- [Playground: SSR task (NRG)](https://playground.babylonjs.com/#PIZ1GK#2388) - Example of a node render graph using the SSR block

This post-process **doesn't share** the common properties of post-processes!

Inputs:
* **sourceTexture**. The source texture to apply the SSR effect on.
* **sourceSamplingMode**. The sampling mode to use for the source texture.
* **alphaMode**. The alpha mode to use when applying the SSR post process (default is ALPHA_DISABLE).
* **depthTexture**. The depth texture used by the SSR effect. Can be a view or screen space depth texture.
* **normalTexture**. The normal texture used by the SSR effect. Can be a view or world space normal texture.
* **backDepthTexture** (optional). The back depth texture used by the SSR effect. Can be a view or screen space depth texture. This is used when automatic thickness computation is enabled. The back depth texture is the depth texture of the scene rendered for the back side of the objects (that is, front faces are culled).
* **reflectivityTexture**. The reflectivity texture used by the SSR effect.
* **camera**. The camera used to render the scene.
* **targetTexture** (optional). The target texture to render the SSR effect to. If not supplied, a texture with the same configuration as the source texture will be created.
<br/>

Properties:
* **textureType** (read only). The texture type used by the different post processes created by SSR. It's a read-only property. If you want to change it, you must recreate the task and pass the appropriate texture type to the constructor.
* [ssr](https://doc.babylonjs.com/typedoc/classes/babylon.thinssrrenderingpipeline). The properties of the post-process.
<br/>

Outputs:
* **outputTexture**. The output texture of the ssr effect.
<br/>

Note that you can set **textureType** only at construction time (this is a constructor parameter).

If you programmatically change the blur strength value (the `FrameGraphSSRRenderingPipelineTask.ssr.blurDispersionStrength` property) from 0 to a non-zero value, or vice versa, you must call the `FrameGraph.build()` function again to rebuild the graph! This is because the frame graph task of the SSR rendering pipeline generates blur tasks when this parameter is non-zero, and does not generate them when it is zero (for performance reasons). This means that the rendering passes generated are not the same depending on this parameter, which is why you need to call `build()` again when you change it.

**backDepthTexture** is optional, and you should only connect a texture to this input if you set **FrameGraphSSRRenderingPipelineTask.ssr.enableAutomaticThicknessComputation = true**. Do not connect a texture if you do not use this option, otherwise you will be penalized in terms of performance for having generated the texture when it is not used by the SSR block. If you connect something to **backDepthTexture**, you must connect the same type of texture as the one you connect to **depthTexture**: a view or a screen space depth texture. You will get an error message in the console if you mix the types. Also, don't forget to set **reverseCulling = true** in the geometry renderer task that generates the back depth texture, as this texture must store the depth of the back faces!

Refer to [Screen Space Reflections (SSR) Rendering Pipeline](https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/SSRRenderingPipeline) for more information on SSR and the parameters you can use to adjust the effect.

### FrameGraphTAATask

![TAA post-process](https://doc.babylonjs.com/img/frameGraph/task_taa.webp)

Task which applies a temporal anti-aliasing post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphtaatask)

- [Playground: TAA task](https://playground.babylonjs.com/#OWGOUN#19) - Example of a frame graph using the TAA task

Inputs:
* **objectRendererTask**. The object renderer task used to render the scene objects.
* **velocityTexture**. The handle to the velocity texture. Only needed if **postProcess.reprojectHistory** is enabled. Note that you must use the linear velocity texture!
<br/>

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thintaapostprocess). The properties of the post-process.
<br/>

This task is slightly different from other post-process tasks, as the **source** input is mandatory and the **target** input is not (yet) used.
In addition, this task must instrument the rendering of objects, which is why you must connect a [FrameGraphObjectRendererTask](#framegraphobjectrenderertask) instance to the **objectRendererTask** input.

If you are using the [reprojectHistory](https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/TAARenderingPipeline#reproject-history) option, you must provide a **velocityTexture** texture. You can generate this texture using the [FrameGraphGeometryRendererTask](#framegraphgeometryrenderertask) task. Note that you should not connect anything to the **velocityTexture** input if you are not using the reprojection history option, otherwise you may get rendering artifacts (and affect performance).

In addition, when using TAA post-processing, you probably don't want to use MSAA for the color/depth texture. So set their samples to 1.

Refer to [Temporal Anti-Aliasing (TAA) Rendering Pipeline](https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/TAARenderingPipeline) for more information on TAA and the parameters you can use to adjust the effect.

### FrameGraphTonemapTask

![Tonemap post-process](https://doc.babylonjs.com/img/frameGraph/task_tonemap.webp)

Task which applies a tonemap post-process.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphtonemaptask)

- [Playground: Tonemap task](https://playground.babylonjs.com/#SUEU9U#130) - Example of a frame graph using the tonemap task
- [Playground: Tonemap task (NRG)](https://playground.babylonjs.com/#SUEU9U#152) - Example of a node render graph using the tonemap block

Properties:
* [postProcess](https://doc.babylonjs.com/typedoc/classes/babylon.thintonemappostprocess). The properties of the post-process.
<br/>

### FrameGraphVolumetricLightingTask

![Volumetric lighting post-process](https://doc.babylonjs.com/img/frameGraph/task_volumetriclighting.webp)

A frame graph task that performs volumetric lighting.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphvolumetriclightingtask)

- [Playground: Volumetric lighting task](https://playground.babylonjs.com/?webgpu#WLGEJB#45) - Example of a frame graph using the volumetric lighting task
- [Playground: Volumetric lighting (NRG)](https://playground.babylonjs.com/?webgpu#WLGEJB#46) - Example of a node render graph using the volumetric lighting block

This post-process **doesn't share** the common properties of post-processes!

Inputs:
* **targetTexture**. The target texture to which the volumetric lighting will be applied.
* **sourceSamplingMode**. The sampling mode to use when blending the volumetric lighting texture with **targetTexture**.
* **depthTexture**. The depth texture used for volumetric lighting calculations. It must be the depth (attachment) texture used to generate **targetTexture**.
* **camera**. The camera used for volumetric lighting calculations.
* **lightingVolumeMesh**. The mesh representing the lighting volume. This is the mesh that will be rendered to create the volumetric lighting effect. A common use case is to use the output of the [FrameGraphLightingVolumeTask](#framegraphlightingvolumetask) task for this mesh.
* **light**. The directional light used for volumetric lighting.
* **lightingVolumeTexture** (optional). The lighting volume texture. If not provided, a new texture will be created with the same size, format, and type as **targetTexture**. This is the texture that will store the volumetric lighting information before being blended into **targetTexture**.
<br/>

Properties:
* **phaseG**. The phase G parameter for the volumetric lighting effect (default: 0). This parameter controls the anisotropy of the scattering. A value of 0 means isotropic scattering, while a value of 1 means forward scattering and -1 means backward scattering.
* **extinction**. The extinction coefficient for the volumetric lighting effect (default: (0, 0, 0) - no extinction). This parameter controls how much light is absorbed and scattered as it travels through the medium. Will only have an effect if **enableExtinction** is set to true in the constructor!
* **lightPower**. The light power/color for the volumetric lighting effect (default: (1, 1, 1)). This parameter controls the intensity and color of the light used for volumetric lighting.
<br/>

Outputs:
* **outputTexture**. The output texture of the task. It will be the same as **targetTexture**.
<br/>

The **extinction** property will only work if **enableExtinction** is set to *true* in the constructor when creating the `FrameGraphVolumetricLightingTask` instance. If you don't plan to set extinction to something different than (0, 0, 0), you can disable this to save some performance.

## Rendering tasks

### FrameGraphObjectRendererTask

![Object renderer](https://doc.babylonjs.com/img/frameGraph/task_objectrenderer.webp)

Task used to render objects to a texture.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphobjectrenderertask)

- [Playground: Object renderer task](https://playground.babylonjs.com/#IG8NRC#88) - Example of a frame graph using the object renderer task
- [Playground: Object renderer task (NRG)](https://playground.babylonjs.com/#IG8NRC#89) - Example of a node render graph using the object renderer block

Inputs:
* **targetTexture**. The target texture(s) where the objects will be rendered. Define an array of handles if you want to use multi-target rendering (see below for more details).
* **depthTexture** (optional). The depth attachment texture where the objects will be rendered.
* **shadowGenerators** (optional). The shadow generators used to render the objects.
* **camera**. Camera used to render the objects.
* **objectList**. The list of objects to render.
<br/>

Properties:
* **depthTest**. If depth testing should be enabled (default is true).
* **depthWrite**. If depth writing should be enabled (default is true).
* **disableShadows**. If shadows should be disabled (default is false).
* **disableImageProcessing**. If image processing should be disabled (default is false). *false* means that the default image processing configuration will be applied (the one from the scene).
* **isMainObjectRenderer**. Sets this property to *true* if this task is the main object renderer of the frame graph. It will help to locate the main object renderer in the frame graph when multiple object renderers are used. This is useful for the inspector to know which object renderer to use for additional rendering features like wireframe rendering or frustum light debugging. It is also used to determine the main camera used by the frame graph: this is the camera used by the main object renderer.
* **renderMeshes**. Defines if meshes should be rendered (default is true).
* **renderDepthOnlyMeshes**. Defines if depth only meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
* **renderOpaqueMeshes**. Defines if opaque meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
* **renderAlphaTestMeshes**. Defines if alpha test meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
* **renderTransparentMeshes**. Defines if transparent meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
* **useOITForTransparentMeshes**. Defines if Order Independent Transparency should be used for transparent meshes (default is false).
* **oitPassCount**. Defines the number of passes to use for Order Independent Transparency (default is 5).
* **renderParticles**. Defines if particles should be rendered (default is true).
* **renderSprites**. Defines if sprites should be rendered (default is true).
* **forceLayerMaskCheck**. Forces checking the layerMask property even if a custom list of meshes is provided (i.e. if renderList is not undefined). Default is true.
* **enableBoundingBoxRendering**. Enables the rendering of bounding boxes for meshes (still subject to `Mesh.showBoundingBox` or `scene.forceShowBoundingBoxes`). Default is true.
* **enableOutlineRendering**. Enables the rendering of outlines/overlays for meshes (still subject to `Mesh.renderOutline` / `Mesh.renderOverlay`). Default is true.
* **resolveMSAAColors**. If true, targetTexture will be resolved at the end of the render pass, if this/these texture(s) is/are MSAA (default: true).
* **resolveMSAADepth**. If true, **depthTexture** will be resolved at the end of the render pass, if this texture is provided and is MSAA (default: false).
* **objectRenderer**. The object renderer used to render the objects.
<br/>

Outputs:
* **outputTexture**. The output texture. This texture will point to the same texture as the **targetTexture** property. Note, however, that the handle itself will be different!
* **outputDepthTexture**. The output depth attachment texture. This texture will point to the same texture as the depthTexture property if it is set. Note, however, that the handle itself will be different!
<br/>

This is the main task used to render objects on a texture. You can consider it as the equivalent of [RenderTargetTexture](https://doc.babylonjs.com/typedoc/classes/babylon.rendertargettexture) when you want to create a render pass programmatically.

The **shadowGenerators** input is optional and can be used if you want to generate shadows at the same time as you render objects. This input expects an array of [FrameGraphShadowGeneratorTask](#framegraphshadowgeneratortask) instances. This way, you can generate shadows from multiple lights at once.

If you enable Order Independent Transparency (OIT - **useOITForTransparentMeshes = true**), the target/depth texture(s) must **NOT** use MSAA! So, number of samples must be 1 for these textures. If you want to get rid of anti-aliasing artifacts, you can use a [FXAA](#framegraphfxaatask) or [TAA](#framegraphtaatask) post-process after the rendering pass.

Note that this class supports multi-target rendering, which means you can render to multiple textures at once. To enable it, simply provide an array of texture handles for the **targetTexture** property instead of a single handle. For this mode to work, all textures must have the same dimensions and the same number of MSAA samples (if applicable). In this mode, **outputTexture** remains a single texture handle: it is the first texture in the array that you passed to **targetTexture**.
<br/><br/>
To illustrate the use of this mode, here are two playgrounds:

- [Playground: Object renderer task (multi RTT)](https://playground.babylonjs.com/#XSNYAU#164) - Example of a frame graph using the object renderer task (multi RTT)
- [Playground: Object renderer task (multi RTT) (NRG)](https://playground.babylonjs.com/#XSNYAU#160) - Example of a node render graph using the object renderer block (multi RTT)

### FrameGraphGeometryRendererTask

![Geometry renderer](https://doc.babylonjs.com/img/frameGraph/task_geometryrenderer.webp)

Task used to render geometry to a set of textures.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphgeometryrenderertask)

- [Playground: Geometry renderer task](https://playground.babylonjs.com/#ARI9J5#6) - Example of a frame graph using the geometry renderer task
- [Playground: Geometry renderer task (NRG)](https://playground.babylonjs.com/#SUEU9U#157) - Example of a node render graph using the geometry renderer block

<br/><br/>

This class is a superset of [FrameGraphObjectRendererTask](#framegraphobjectrenderertask): it can render a scene (with some restrictions, see below) and generate geometry textures.
This means that all inputs, properties, and outputs described above are supported, as well as:<br/>

Properties:
* **size**. The size of the output textures (default is 100% of the back buffer texture size).
* **sizeIsPercentage**. Whether the size is a percentage of the back buffer size (default is true).
* **samples**. The number of samples to use for the output textures (default is 1).
* **reverseCulling**. Whether to reverse culling (default is false).
* **dontRenderWhenMaterialDepthWriteIsDisabled**. Indicates if a mesh shouldn't be rendered when its material has depth write disabled (default is true).
* **disableDepthPrePass**. Indicates whether the depth pre-pass is disabled (default is true). Materials that require depth pre-pass (`Material.needDepthPrePass == true`) don't work with the geometry renderer, that's why this setting is *true* by default. However, if the geometry renderer doesn't generate any geometry textures but only renders to the main target texture, then depth pre-pass can be enabled.
* **textureDescriptions**. The list of texture descriptions used by the geometry renderer task. Only geometry textures described in this array will be generated. See below for more information.
<br/>

Methods:
* `excludeSkinnedMeshFromVelocityTexture(skinnedMesh: AbstractMesh)`. Excludes the given skinned mesh from computing bones velocities. Computing bones velocities can have a cost. The cost can be saved by calling this function and by passing the skinned mesh to ignore.
* `removeExcludedSkinnedMeshFromVelocityTexture(skinnedMesh: AbstractMesh)`. Removes the given skinned mesh from the excluded meshes list.
<br/>

Outputs:
* **geometryIrradianceTexture**. The irradiance output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryViewDepthTexture**. The depth (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryNormViewDepthTexture**. The normalized depth (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions! The normalization is `(d - near) / (far - near)`, where **d** is the depth value in view space and **near** and **far** are the near and far planes of the camera.
* **geometryScreenDepthTexture**. The depth (in screen space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryViewNormalTexture**. The normal (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryWorldNormalTexture**. The normal (in world space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryLocalPositionTexture**. The position (in local space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryWorldPositionTexture**. The position (in world space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryAlbedoTexture**. The albedo output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryReflectivityTexture**. The reflectivity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryVelocityTexture**. The velocity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
* **geometryLinearVelocityTexture**. The linear velocity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!
<br/>

This task is primarily used to generate geometry textures, i.e. textures containing special data such as depths in view/screen space, normals in view/world space, reflectivity, etc. Here is a list of all outputs that this task can generate. The clear values below apply to the color components present in each texture's format, before any objects are drawn:
* **geometryIrradianceTexture**: irradiance color, normally written by the material's geometry rendering shader. Cleared to zero.
* **geometryViewDepthTexture**: depth in camera view space. This is the Z component of the vertex coordinate in the camera's view space and is a value between **near** and **far**, the camera's near and far clipping planes. Cleared to zero.
* **geometryNormViewDepthTexture**: normalized depth in camera view space. Identical to the value above, but with values between 0 and 1, calculated using the formula `normViewDepth = (viewDepth - near) / (far - near)`. Cleared to one.
* **geometryScreenDepthTexture**: depth in screen space. This is the depth written to the depth buffer (`gl_FragCoord.z`) and is a value between 0 and 1. Cleared to one, or to zero when reverse depth buffering is enabled.
* **geometryViewNormalTexture**: normal in camera view space. This is the normal to the vertex in camera view space. The vector is normalized before being written to the texture. Cleared to zero.
* **geometryWorldNormalTexture**: normal in world space. This is the normal at the vertex in world space. The vector is normalized before being written to the texture. It is also scaled and offset by 0.5 to generate components between 0 and 1. Cleared to zero.
* **geometryLocalPositionTexture**: position in local space. This is the position of the vertex in the object model space, i.e., before any camera or world transformations. Cleared to zero.
* **geometryWorldPositionTexture**: position in world space. This is the position of the vertex in world space. Cleared to zero.
* **geometryAlbedoTexture**: albedo color. This is the albedo/diffuse color of the vertex. Cleared to zero.
* **geometryReflectivityTexture**: reflectivity color. This is the reflectivity color of the vertex (used by SSR, for example). Cleared to zero.
* **geometryVelocityTexture**: velocity vector in screen space. See [Motion blur by object](https://john-chapman-graphics.blogspot.com/2013/01/per-object-motion-blur.html) for more details on what a velocity texture is. **geometryVelocityTexture** is a texture constructed with the optimization described in the “Format and precision” section to improve accuracy when using an unsigned byte texture type. Cleared to zero.
* **geometryLinearVelocityTexture**: linear velocity vector in screen space. It is identical to the one above, but without the optimization, so without the `pow()` call. The coordinates are multiplied by 0.5, so that they are between [-0.5, 0.5] instead of [-1, 1]. Cleared to zero.
<br/>

**Using an existing channel for custom geometry data**: If your graph does not need one of the supported `PREPASS_*` outputs for its original purpose, you can use its attachment to carry application-defined per-object data. For example, request the irradiance channel with a format and type appropriate for your data:

```javascript
const geomRendererTask = new BABYLON.FrameGraphGeometryRendererTask("customGeometry", frameGraph, scene);
geomRendererTask.objectList = { meshes: [mesh], particleSystems: [] };
geomRendererTask.camera = camera;
geomRendererTask.textureDescriptions.push({
    type: BABYLON.Constants.PREPASS_IRRADIANCE_TEXTURE_TYPE,
    textureFormat: BABYLON.Constants.TEXTUREFORMAT_RGBA,
    textureType: BABYLON.Constants.TEXTURETYPE_HALF_FLOAT,
});

frameGraph.addTask(geomRendererTask);
// Connect this handle to a downstream task's texture input.
const customGeometryTexture = geomRendererTask.geometryIrradianceTexture;
```

Here `frameGraph`, `scene`, `camera`, and `mesh` are from your existing graph setup; provide **depthTexture** if your pass needs one. The handle becomes a usable texture when the graph is built; requesting or consuming the output **does not** write your data into it. Every material/shader contributing objects to that texture must explicitly write the custom value at the matching `PREPASS_IRRADIANCE_INDEX`, **after** any built-in irradiance write. For example, in the fragment shader of a material whose prepass/MRT declarations provide `WRITE_GEOMETRY_FRAGMENT_OUTPUT`, place this write after the material's default geometry output code:

```glsl
#ifdef PREPASS_IRRADIANCE
    WRITE_GEOMETRY_FRAGMENT_OUTPUT(PREPASS_IRRADIANCE_INDEX, vec4(customData.rgb, 1.0));
#endif
```

Here `customData` is an application-provided value, not a built-in shader variable. For WGSL, use `vec4f` rather than `vec4` and write to `fragData[PREPASS_IRRADIANCE_INDEX]` **before** the material copies that array into `fragmentOutputs`; if you inject code after that copy, you must instead update the corresponding `fragmentOutputs.fragDataN` output (`N` is the attachment index). The GLSL macro is not WGSL syntax. If you prefer a domain-specific guard in your own shader, you can replace the guard above with this optional alias:

```glsl
#ifdef PREPASS_IRRADIANCE
    #define CUSTOM_GEOMETRY_NAME
#endif

// After the material's default geometry output code:
#ifdef CUSTOM_GEOMETRY_NAME
    WRITE_GEOMETRY_FRAGMENT_OUTPUT(PREPASS_IRRADIANCE_INDEX, vec4(customData.rgb, 1.0));
#endif
```

`CUSTOM_GEOMETRY_NAME` is **not** generated by the engine, and a define alone does not replace the stock shader write.

Choose an attachment format/type that preserves the values and precision you need, and account for its default clear value and color/alpha conventions (the example writes alpha 1 for covered opaque pixels; untouched pixels retain the clear value). MRT outputs share the pass's attachment count, formats, dimensions, and sample settings; you cannot add arbitrary extra shader outputs just by inventing another `PREPASS_*` type. Do not repurpose the special object-ID or integer mesh-blend-tag channels. Other materials and built-in rendering paths may still write their usual irradiance values, so use this texture only when you control all contributing writes, or account for mixed content.

However, this task can also render a scene, similar to how `FrameGraphObjectRendererTask` does. There are some limitations when geometry textures and the normal texture scene (**outputTexture** property) are generated by `FrameGraphGeometryRendererTask`:
* You must set **disableDepthPrePass** to *false* if any of your materials use **needDepthPrePass**, in order to avoid artifacts/errors with geometry textures, but this means you may get artifacts in the normal texture scene. Again, if you need this to work, use a separate `FrameGraphObjectRendererTask` to generate the normal scene texture.
* You must use the same number of MSAA samples for all textures (**targetTexture**, **depthTexture**, and **FrameGraphObjectRendererTask.samples**). Using MSAA textures is more demanding in terms of performance. If you don't need MSAA for geometry textures, you can use the geometry renderer only for geometry textures and use a `FrameGraphObjectRendererTask` instance to generate the normal texture scene.
<br/>

**Important**: If you do not plan to use **outputTexture**, do not set anything in the **targetTexture** input property! If you connect something to **targetTexture**, the texture will be generated, even if it is not used via **outputTexture**.

### FrameGraphShadowGeneratorTask

![Shadow generator](https://doc.babylonjs.com/img/frameGraph/task_shadowgenerator.webp)

Task used to generate shadows from a list of objects.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphshadowgeneratortask)

[Link to the class (CSM)](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcascadedshadowgeneratortask)

- [Playground: Shadow generator task](https://playground.babylonjs.com/#JWKDME#189) - Example of a frame graph using the shadow generator task
- [Playground: Shadow generator task (NRG)](https://playground.babylonjs.com/#JWKDME#190) - Example of a node render graph using the shadow generator block
- [Playground: Cascaded shadow generator task (NRG)](https://playground.babylonjs.com/#JWKDME#198) - Example of a node render graph using the cascaded shadow generator block

Inputs:
* **objectList**. The object list that generates shadows.
* **light**. The light to generate shadows from.
* **camera**. The camera used to generate the shadows.
<br/>

Inputs (specific to cascaded shadow maps):
* **depthTexture** (optional). 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 set up 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.
<br/>

Properties:
* **mapSize**. The size of the shadow map.
* **useFloat32TextureType**. If true, the shadow map will use a 32 bits float texture type (else, 16 bits float is used if supported).
* **useRedTextureFormat**. If true, the shadow map will use a red texture format (else, a RGBA format is used).
* **bias**. The bias to apply to the shadow map.
* **normalBias**. The normal bias to apply to the shadow map.
* **darkness**. The darkness of the shadows.
* **transparencyShadow**. Gets or sets the ability to have transparent shadows.
* **enableSoftTransparentShadow**. Enables or disables shadows with varying strength based on the transparency.
* **useOpacityTextureForTransparentShadow**. If this is true, use the opacity texture's alpha channel for transparent shadows instead of the diffuse one.
* **filter**. The filter to apply to the shadow map.
* **filteringQuality**. The filtering quality to apply to the filter.
* **shadowGenerator** (read only). The shadow generator.
<br/>

Properties (specific to cascaded shadow maps):
* **numCascades**. The number of cascades.
* **debug**. Indicates whether the shadow generator should display the cascades.
* **stabilizeCascades**. Indicates whether the shadow generator should stabilize the cascades.
* **lambda**. Lambda parameter of the shadow generator.
* **cascadeBlendPercentage**. Cascade blend percentage.
* **depthClamp**. Indicates whether the shadow generator should use depth clamping.
* **autoCalcDepthBounds**. Indicates whether the shadow generator should automatically calculate the depth bounds.
* **autoCalcDepthBoundsRefreshRate**. Defines the refresh rate of the min/max computation used when **autoCalcDepthBounds** is set to true. Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...
* **shadowMaxZ**. Maximum shadow Z value. If 0, will use **camera.maxZ**.
<br/>

Outputs:
* **outputTexture**. The shadow map texture.
<br/>

Use this task when you want to generate shadows from a light. The light must be a “shadow light”, i.e. any light except area lights and hemispherical lights.

You may be surprised to see a **camera** input, because the scene is rendered from the point of view of the light to generate the shadow map, not from the point of view of a camera. This camera is necessary to:
* split the camera frustum when using a `FrameGraphCascadedShadowGeneratorTask` block
* calculate the LOD of the meshes. The LOD of the meshes is defined according to the distance from a camera, not from a light.
<br/>

Refer to [Shadows](https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows) for general information about shadows, and [Cascaded Shadow Maps](https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows_csm) for specific information about cascaded shadow maps.

### FrameGraphUtilityLayerRendererTask

![Utility layer renderer](https://doc.babylonjs.com/img/frameGraph/task_utilitylayerrenderer.webp)

Task used to render a utility layer.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphutilitylayerrenderertask)

- [Playground: Utility layer renderer task](https://playground.babylonjs.com/#SUEU9U#131) - Example of a frame graph using the utility layer renderer task
- [Playground: Utility layer renderer task (NRG)](https://playground.babylonjs.com/#SUEU9U#132) - Example of a node render graph using the utility layer renderer block

Inputs:
* **targetTexture**. The target texture of the task.
* **camera**. The camera used to render the utility layer.
<br/>

Properties:
* **layer**. The utility layer renderer.
<br/>

Outputs:
* **outputTexture**. The output texture of the task. This is the same texture as the target texture, but the handles are different!
<br/>

This class is a wrapper around [UtilityLayerRenderer](https://doc.babylonjs.com/typedoc/classes/babylon.utilitylayerrenderer) and allows you to use gizmos with frame graphs: see the PGs above for some examples.

## Texture tasks

### FrameGraphClearTextureTask

Task used to clear a texture.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcleartexturetask)

No specific example: the clear texture task is used in all the PG on this page!

Inputs:
* **targetTexture** (optional). The color texture to clear.
* **depthTexture** (optional). The depth attachment texture to clear.
<br/>

Properties:
* **color**. The color to clear the texture with.
* **clearColor**. If the color should be cleared.
* **convertColorToLinearSpace**. If the color should be converted to linear space (default: false).
* **clearDepth**. If the depth should be cleared.
* **clearStencil**. If the stencil should be cleared.
* **stencilValue**. The value to use to clear the stencil buffer (default: 0).
<br/>

Outputs:
* **outputTexture**. The output texture (same as **targetTexture**, but the handle will be different).
* **outputDepthTexture**. The output depth texture (same as **depthTexture**, but the handle will be different).
<br/>

The inputs **target** and **depth** are optional, but you must provide at least one of them (otherwise there is no reason to use a clear task!).

### FrameGraphCopyToBackbufferColorTask

Task which copies a texture to the backbuffer color texture (the screen).

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcopytobackbuffercolortask)

No specific example: the copy to backbuffer color task is used in all the PG on this page!

Inputs:
* **sourceTexture**. The source texture to copy to the backbuffer color texture.
<br/>

### FrameGraphCopyToTextureTask

Task used to copy a texture to another texture.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphcopytotexturetask)

Playground: see the PG for the [Geometry renderer task](#framegraphgeometryrenderertask)

Inputs:
* **sourceTexture**. The source texture to copy from.
* **targetTexture**. The target texture to copy to.
<br/>

Properties:
* **viewport** (optional). 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.
* **lodLevel**. The LOD level to copy from the source texture (default: 0).
<br/>

Outputs:
* **outputTexture**. The output texture (same as **targetTexture**, but the handle may be different).
<br/>

### FrameGraphGenerateMipMapsTask

![Generate mipmaps](https://doc.babylonjs.com/img/frameGraph/task_generatemipmaps.webp)

Task which generates mipmaps for a texture.

[Link to the class](https://doc.babylonjs.com/typedoc/classes/babylon.framegraphgeneratemipmapstask)

- [Playground: Generate mipmaps task](https://playground.babylonjs.com/#4QES4Q#4) - Example of a frame graph using the generate mipmaps task
- [Playground: Generate mipmaps task (NRG)](https://playground.babylonjs.com/#4QES4Q#5) - Example of a node render graph using the generate mipmaps block

Inputs:
* **targetTexture**. The texture to generate mipmaps for.
<br/>

Outputs:
* **outputTexture**. The output texture (same as **targetTexture**, but the handle may be different).
<br/>

Note that in a frame graph, mipmaps are not generated automatically; you must use a `FrameGraphGenerateMipMapsTask` task to do so.
