Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8c785ff
Add transmission example
Popov72 May 20, 2025
9ecbff3
Add doc for the motion blur post-process
Popov72 May 24, 2025
3c5c872
Add geometry texture VAT example to frame graph doc
Popov72 Jun 10, 2025
26e9d11
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Jun 10, 2025
cc09ab9
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Oct 21, 2025
ed8ee83
Update the TAA block doc
Popov72 Oct 22, 2025
1b19cf8
Add an example to create a custom post-process
Popov72 Oct 24, 2025
0ed481d
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Oct 24, 2025
0fd6516
Add doc about the class framework
Popov72 Oct 28, 2025
feaba5c
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Oct 28, 2025
3fa9015
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Nov 1, 2025
e8410aa
Add more frame graph doc
Popov72 Nov 1, 2025
a050dc2
More update
Popov72 Nov 5, 2025
520b8f8
More docs
Popov72 Nov 8, 2025
b3fa17a
Merge branch 'master' of https://github.com/BabylonJS/Documentation i…
Popov72 Nov 8, 2025
2e340f7
Fix typo
Popov72 Nov 9, 2025
cc8534a
Change structure
Popov72 Nov 10, 2025
5bb36b7
Add description for new properties
Popov72 Nov 12, 2025
0d9058c
Fix doc wrt cull passes
Popov72 Nov 13, 2025
6f2d6a4
Address comments
Popov72 Nov 13, 2025
cb09614
Address comments
Popov72 Nov 13, 2025
e571de1
Fix PG
Popov72 Nov 13, 2025
84062d5
Revert change
Popov72 Nov 17, 2025
a6de89a
Fix PGs
Popov72 Nov 18, 2025
c91e7a9
Fix pg
Popov72 Nov 18, 2025
8fef068
Update doc according to latest changes in code
Popov72 Nov 20, 2025
df5a72f
More updates
Popov72 Nov 20, 2025
b827750
Fix VAT PGs
Popov72 Nov 21, 2025
2a1d7e9
Fix doc VAT
Popov72 Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions configuration/structure.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,22 @@
},
"content": "features/featuresDeepDive/frameGraph/frameGraphBasicConcepts"
},
"frameGraphClassFramework": {
"friendlyName": "Description of the class framework",
"children": {
"frameGraphClassOverview": {
"friendlyName": "Introduction to Frame Graph classes",
"children": {},
"content": "features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphClassOverview"
},
"frameGraphTaskList": {
"friendlyName": "Frame Graph Task List",
"children": {},
"content": "features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphTaskList"
}
},
"content": "features/featuresDeepDive/frameGraph/frameGraphClassFramework"
},
"frameGraphBlocks": {
"friendlyName": "Render Graph Blocks",
"children": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ Once again, the inputs and outputs are self-explanatory: **target** is the textu

## Misc blocks

<H3Image title="ComputeShader" image="/img/frameGraph/block_computeshader.jpg" alt="ComputeShader node"/>

This block allows you to execute a compute shader (WebGPU only - doesn't do anything in WebGL). The compute shader must be configured programmatically. See the NRG playground in [FrameGraphComputeShaderTask](/features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphTaskList#framegraphcomputeshadertask) for an example of how to use this block.

<H3Image title="Cull" image="/img/frameGraph/block_cull.jpg" alt="Cull node"/>

This block allows you to cull a list of objects against a camera frustum: you must provide the camera via the **camera** input, and the list of objects via the **objects** input. The result of this block is provided by the **output**: the list of objects that are (at least partially) inside the camera frustum.
Expand All @@ -244,8 +248,6 @@ executeBlock.task.func = (_context) => {
};
```

In WebGPU, you can use this block to execute a compute shader at a specific moment in the execution of the frame graph, for example.

<H3Image title="GUI" image="/img/frameGraph/block_gui.jpg" alt="GUI node"/>

This block allows you to apply a full-screen GUI over a frame graph texture.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Description of the frame graph framework
image:
description: Learn all about the Babylon.js Frame Graph system.
keywords: diving deeper, frame graph, rendering, node editor, framework
---

See the [Basic Concepts and Getting Started](/features/featuresDeepDive/frameGraph/frameGraphBasicConcepts) section for general information on nomenclature and an overview of the frame graph concept.

This section describes the frame graph class framework:
* [Overview of the frame graph framework](/features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphClassOverview) describes the main classes that are part of the framework
* [List of task classes in the frame graph framework](/features/featuresDeepDive/frameGraph/frameGraphClassFramework/frameGraphTaskList) describes all the tasks that can be used with a frame graph.
<br/>
Note that the implementation of the framework is inspired by Unity's [Render Graph System](https://docs.unity3d.com/6000.2/Documentation/Manual/urp/render-graph-introduction.html).

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const task = new BABYLON.FrameGraphCustomPostProcessTask("edgeDetection", frameG
uniforms: ["escale", "threshold"],
});

this.task.onApplyObservable.add((effect) => {
task.onApplyObservable.add((effect) => {
effect.setFloat("escale", 3);
effect.setFloat("threshold", 0.1);
});
Expand Down Expand Up @@ -87,10 +87,10 @@ Note: **EdgeDetectionFragment** is the shader code of the post-process.

This is the same code as above, but it allows you to easily modify the **escale** and **threshold** properties.

As for the implementation of the node graph rendering block `NodeRenderGraphEdgePostProcessBlock`, it is quite simple thanks to the use of `NodeRenderGraphBasePostProcessBlock`:
As for the implementation of the node graph rendering block `NodeRenderGraphEdgePostProcessBlock`, it is quite simple thanks to the use of `NodeRenderGraphBaseWithPropertiesPostProcessBlock`:
* First, we declare a private variable to contain the wrapper class and initialize it in the constructor:
```typescript
export class NodeRenderGraphEdgePostProcessBlock extends BABYLON.NodeRenderGraphBasePostProcessBlock {
export class NodeRenderGraphEdgePostProcessBlock extends BABYLON.NodeRenderGraphBaseWithPropertiesPostProcessBlock {
protected override _frameGraphTask: BABYLON.FrameGraphCustomPostProcessTask;

public override get task() {
Expand Down Expand Up @@ -178,7 +178,7 @@ Note: Since a playground can be launched multiple times, we first check whether

You can use this PG to test it:

<Playground id="#ZC3Y12#4" title="Custom post-process in NRGE" description="Making a custom post-process available in NRGE" isMain={true}/>
<Playground id="#ZC3Y12#8" image="/img/playgroundsAndNMEs/pg-ZC3Y12-4.png" title="Custom post-process in NRGE" description="Making a custom post-process available in NRGE" isMain={true}/>

The scene is displayed normally. To use a frame graph with the edge detection post-process, proceed as follows:
* Open the inspector
Expand All @@ -202,7 +202,7 @@ scene.frameGraph = nrg.frameGraph;
await nrg.whenReadyAsync();
```

<Playground id="#ZC3Y12#5" image="/img/playgroundsAndNMEs/pg-ZC3Y12-2.png" title="Load node render graph with custom post-process" description="Loading a node render graph from the snippet server with custom post-process" isMain={true}/>
<Playground id="#ZC3Y12#7" image="/img/playgroundsAndNMEs/pg-ZC3Y12-2.png" title="Load node render graph with custom post-process" description="Loading a node render graph from the snippet server with custom post-process" isMain={true}/>

**Important**: editing the node render graph with the standalone NRGE (https://nrge.babylonjs.com) will not work!

Expand All @@ -212,7 +212,7 @@ This is because the implementation of the block node for the edge detection post

Note that you can also open NRGE using a code:
```typescript
const nrg = await BABYLON.NodeRenderGraph.ParseFromSnippetAsync("XQF0ML#1", scene);
const nrg = await BABYLON.NodeRenderGraph.ParseFromSnippetAsync("XQF0ML", scene);

nrg.build();
nrg.edit();
Expand Down
3 changes: 2 additions & 1 deletion lib/frontendUtils/frontendTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const getExampleLink = (example: Partial<IExampleLink>, full: boolean = t
return `https://nrge.babylonjs.com/${id}`;
case "pg":
default:
return `https://playground.babylonjs.com/${full ? "full.html" : ""}${params}${id}`;
return `http://localhost:1338/${full ? "full.html" : ""}${params}${id}`;
//return `https://playground.babylonjs.com/${full ? "full.html" : ""}${params}${id}`;
}
};

Expand Down
Binary file added public/img/frameGraph/block_computeshader.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/empty.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_anaglyph.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_blackandwhite.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_bloom.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_blur.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_circleofconfusion.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_colorcorrection.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_computeshader.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_convolution.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_cull.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_depthoffield.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_execute.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_filter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_fxaa.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_generatemipmaps.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_geometryrenderer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_glow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_grain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_gui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_highlight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_imageprocessing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frameGraph/task_motionblur.jpg
Binary file added public/img/frameGraph/task_objectrenderer.jpg
Binary file added public/img/frameGraph/task_shadowgenerator.jpg
Binary file added public/img/frameGraph/task_sharpen.jpg
Binary file added public/img/frameGraph/task_ssao2.jpg
Binary file added public/img/frameGraph/task_ssr.jpg
Binary file added public/img/frameGraph/task_taa.jpg
Binary file added public/img/frameGraph/task_tonemap.jpg
Binary file added public/img/playgroundsAndNMEs/pg-4QES4Q-1.png
Binary file added public/img/playgroundsAndNMEs/pg-539X0P-52.png
Binary file added public/img/playgroundsAndNMEs/pg-ARI9J5-1.png
Binary file added public/img/playgroundsAndNMEs/pg-GCG2Z7-2.png
Binary file added public/img/playgroundsAndNMEs/pg-GCG2Z7-3.png
Binary file added public/img/playgroundsAndNMEs/pg-GCG2Z7.png
Binary file added public/img/playgroundsAndNMEs/pg-IG8NRC-81.png
Binary file added public/img/playgroundsAndNMEs/pg-IG8NRC-82.png
Binary file added public/img/playgroundsAndNMEs/pg-JWKDME-174.png
Binary file added public/img/playgroundsAndNMEs/pg-JWKDME-175.png
Binary file added public/img/playgroundsAndNMEs/pg-JWKDME-176.png
Binary file added public/img/playgroundsAndNMEs/pg-KOBPUW-11.png
Binary file added public/img/playgroundsAndNMEs/pg-KOBPUW-14.png
Binary file added public/img/playgroundsAndNMEs/pg-KOBPUW-9.png
Binary file added public/img/playgroundsAndNMEs/pg-MJDYB1-3.png
Binary file added public/img/playgroundsAndNMEs/pg-MJDYB1-6.png
Binary file added public/img/playgroundsAndNMEs/pg-MJDYB1-8.png
Binary file added public/img/playgroundsAndNMEs/pg-OWGOUN-15.png
Binary file added public/img/playgroundsAndNMEs/pg-PIZ1GK-2373.png
Binary file added public/img/playgroundsAndNMEs/pg-PV8OLY-26.png
Binary file added public/img/playgroundsAndNMEs/pg-PV8OLY-28.png
Binary file added public/img/playgroundsAndNMEs/pg-PV8OLY-29.png
Binary file added public/img/playgroundsAndNMEs/pg-R33LVG-2.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-10.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-11.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-12.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-13.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-14.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-15.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-16.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-17.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-18.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-19.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-21.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-22.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-24.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-25.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-26.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-27.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-28.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-29.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-31.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-32.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-33.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-34.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-35.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-36.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-37.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-38.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-39.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-4.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-45.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-46.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-47.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-48.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-49.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-50.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-51.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-52.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-54.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-55.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-57.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-58.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-74.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-77.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-78.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-84.png
Binary file added public/img/playgroundsAndNMEs/pg-SUEU9U-85.png
Binary file added public/img/playgroundsAndNMEs/pg-YB006J-746.png
Binary file added public/img/playgroundsAndNMEs/pg-YB006J-749.png
Binary file added public/img/playgroundsAndNMEs/pg-YB006J-753.png