@babylonjs/core 7.33.0 → 7.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cameras/arcRotateCamera.d.ts +14 -0
- package/Cameras/arcRotateCamera.js +39 -19
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +2 -0
- package/Decorators/nodeDecorator.js +1 -0
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +63 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +150 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +3 -47
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +2 -129
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.d.ts +40 -0
- package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js +98 -0
- package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js +3 -3
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +3 -2
- package/FrameGraph/Node/Blocks/index.js +3 -2
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Passes/renderPass.js +1 -1
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.d.ts +21 -0
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +110 -0
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -0
- package/FrameGraph/frameGraph.d.ts +6 -0
- package/FrameGraph/frameGraph.js +15 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +3 -2
- package/FrameGraph/frameGraphRenderContext.js +9 -4
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/frameGraphTask.js +5 -1
- package/FrameGraph/frameGraphTask.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.d.ts +8 -0
- package/FrameGraph/frameGraphTextureManager.js +51 -7
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/FrameGraph/frameGraphTypes.d.ts +2 -0
- package/FrameGraph/frameGraphTypes.js.map +1 -1
- package/FrameGraph/index.d.ts +3 -2
- package/FrameGraph/index.js +3 -2
- package/FrameGraph/index.js.map +1 -1
- package/Layers/layer.d.ts +4 -0
- package/Layers/layer.js +13 -2
- package/Layers/layer.js.map +1 -1
- package/Loading/sceneLoader.d.ts +11 -8
- package/Loading/sceneLoader.js +64 -35
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +12 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianBlock.js +6 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianBlock.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +9 -2
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/index.d.ts +2 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.js +3 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js +10 -3
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +1 -1
- package/Materials/Node/nodeMaterial.js +1 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +7 -2
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/abstractMesh.hotSpot.js +2 -0
- package/Meshes/abstractMesh.hotSpot.js.map +1 -1
- package/Meshes/csg2.js +0 -3
- package/Meshes/csg2.js.map +1 -1
- package/Misc/webRequest.fetch.d.ts +16 -0
- package/Misc/webRequest.fetch.js +33 -0
- package/Misc/webRequest.fetch.js.map +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.d.ts +2 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js +2 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.d.ts +6 -8
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js +32 -49
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
- package/PostProcesses/thinTAAPostProcess.d.ts +72 -0
- package/PostProcesses/thinTAAPostProcess.js +149 -0
- package/PostProcesses/thinTAAPostProcess.js.map +1 -0
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.d.ts +3 -3
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js +7 -7
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +70 -69
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +102 -112
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +8 -6
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Shaders/geometry.vertex.js +1 -1
- package/Shaders/geometry.vertex.js.map +1 -1
- package/Shaders/layer.fragment.js +3 -1
- package/Shaders/layer.fragment.js.map +1 -1
- package/Shaders/volumetricLightScattering.fragment.js +1 -1
- package/Shaders/volumetricLightScattering.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +47 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.d.ts +7 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +20 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingUboDeclaration.d.ts +7 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingUboDeclaration.js +13 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingVertexDeclaration.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingVertexDeclaration.js +10 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.fragment.d.ts +10 -0
- package/ShadersWGSL/gaussianSplatting.fragment.js +23 -0
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.vertex.d.ts +14 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js +31 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -0
- package/ShadersWGSL/geometry.vertex.js +1 -1
- package/ShadersWGSL/geometry.vertex.js.map +1 -1
- package/ShadersWGSL/layer.fragment.js +4 -2
- package/ShadersWGSL/layer.fragment.js.map +1 -1
- package/ShadersWGSL/taa.fragment.d.ts +5 -0
- package/ShadersWGSL/taa.fragment.js +11 -0
- package/ShadersWGSL/taa.fragment.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock";
|
|
3
|
+
import type { FrameGraphObjectRendererTask } from "../../../Tasks/Rendering/objectRendererTask";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphObjectRendererTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphObjectRendererTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphBaseObjectRendererBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
* @param frameGraph defines the hosting frame graph
|
|
17
|
+
* @param scene defines the hosting scene
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
+
/** Indicates if depth testing must be enabled or disabled */
|
|
21
|
+
get depthTest(): boolean;
|
|
22
|
+
set depthTest(value: boolean);
|
|
23
|
+
/** Indicates if depth writing must be enabled or disabled */
|
|
24
|
+
get depthWrite(): boolean;
|
|
25
|
+
set depthWrite(value: boolean);
|
|
26
|
+
/**
|
|
27
|
+
* Gets the current class name
|
|
28
|
+
* @returns the class name
|
|
29
|
+
*/
|
|
30
|
+
getClassName(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the destination texture input component
|
|
33
|
+
*/
|
|
34
|
+
get destination(): NodeRenderGraphConnectionPoint;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the depth texture input component
|
|
37
|
+
*/
|
|
38
|
+
get depth(): NodeRenderGraphConnectionPoint;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the camera input component
|
|
41
|
+
*/
|
|
42
|
+
get camera(): NodeRenderGraphConnectionPoint;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the objects input component
|
|
45
|
+
*/
|
|
46
|
+
get objects(): NodeRenderGraphConnectionPoint;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the dependencies input component
|
|
49
|
+
*/
|
|
50
|
+
get dependencies(): NodeRenderGraphConnectionPoint;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the output component
|
|
53
|
+
*/
|
|
54
|
+
get output(): NodeRenderGraphConnectionPoint;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the output depth component
|
|
57
|
+
*/
|
|
58
|
+
get outputDepth(): NodeRenderGraphConnectionPoint;
|
|
59
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
60
|
+
protected _dumpPropertiesCode(): string;
|
|
61
|
+
serialize(): any;
|
|
62
|
+
_deserialize(serializationObject: any): void;
|
|
63
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
4
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task() {
|
|
13
|
+
return this._frameGraphTask;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a new NodeRenderGraphBaseObjectRendererBlock
|
|
17
|
+
* @param name defines the block name
|
|
18
|
+
* @param frameGraph defines the hosting frame graph
|
|
19
|
+
* @param scene defines the hosting scene
|
|
20
|
+
*/
|
|
21
|
+
constructor(name, frameGraph, scene) {
|
|
22
|
+
super(name, frameGraph, scene);
|
|
23
|
+
this.registerInput("destination", NodeRenderGraphBlockConnectionPointTypes.Texture);
|
|
24
|
+
this.registerInput("depth", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);
|
|
25
|
+
this.registerInput("camera", NodeRenderGraphBlockConnectionPointTypes.Camera);
|
|
26
|
+
this.registerInput("objects", NodeRenderGraphBlockConnectionPointTypes.ObjectList);
|
|
27
|
+
this.registerInput("dependencies", NodeRenderGraphBlockConnectionPointTypes.Texture, true);
|
|
28
|
+
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
29
|
+
this.registerOutput("outputDepth", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
30
|
+
this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);
|
|
31
|
+
this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);
|
|
32
|
+
this.dependencies.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
33
|
+
this.output._typeConnectionSource = this.destination;
|
|
34
|
+
this.outputDepth._typeConnectionSource = this.depth;
|
|
35
|
+
}
|
|
36
|
+
/** Indicates if depth testing must be enabled or disabled */
|
|
37
|
+
get depthTest() {
|
|
38
|
+
return this._frameGraphTask.depthTest;
|
|
39
|
+
}
|
|
40
|
+
set depthTest(value) {
|
|
41
|
+
this._frameGraphTask.depthTest = value;
|
|
42
|
+
}
|
|
43
|
+
/** Indicates if depth writing must be enabled or disabled */
|
|
44
|
+
get depthWrite() {
|
|
45
|
+
return this._frameGraphTask.depthWrite;
|
|
46
|
+
}
|
|
47
|
+
set depthWrite(value) {
|
|
48
|
+
this._frameGraphTask.depthWrite = value;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gets the current class name
|
|
52
|
+
* @returns the class name
|
|
53
|
+
*/
|
|
54
|
+
getClassName() {
|
|
55
|
+
return "NodeRenderGraphBaseObjectRendererBlock";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets the destination texture input component
|
|
59
|
+
*/
|
|
60
|
+
get destination() {
|
|
61
|
+
return this._inputs[0];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets the depth texture input component
|
|
65
|
+
*/
|
|
66
|
+
get depth() {
|
|
67
|
+
return this._inputs[1];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the camera input component
|
|
71
|
+
*/
|
|
72
|
+
get camera() {
|
|
73
|
+
return this._inputs[2];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets the objects input component
|
|
77
|
+
*/
|
|
78
|
+
get objects() {
|
|
79
|
+
return this._inputs[3];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Gets the dependencies input component
|
|
83
|
+
*/
|
|
84
|
+
get dependencies() {
|
|
85
|
+
return this._inputs[4];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Gets the output component
|
|
89
|
+
*/
|
|
90
|
+
get output() {
|
|
91
|
+
return this._outputs[0];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Gets the output depth component
|
|
95
|
+
*/
|
|
96
|
+
get outputDepth() {
|
|
97
|
+
return this._outputs[1];
|
|
98
|
+
}
|
|
99
|
+
_buildBlock(state) {
|
|
100
|
+
super._buildBlock(state);
|
|
101
|
+
this._frameGraphTask.name = this.name;
|
|
102
|
+
this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
|
|
103
|
+
this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the "outputDepth" texture of the task
|
|
104
|
+
const destinationConnectedPoint = this.destination.connectedPoint;
|
|
105
|
+
if (destinationConnectedPoint) {
|
|
106
|
+
this._frameGraphTask.destinationTexture = destinationConnectedPoint.value;
|
|
107
|
+
}
|
|
108
|
+
const depthConnectedPoint = this.depth.connectedPoint;
|
|
109
|
+
if (depthConnectedPoint) {
|
|
110
|
+
this._frameGraphTask.depthTexture = depthConnectedPoint.value;
|
|
111
|
+
}
|
|
112
|
+
const cameraConnectedPoint = this.camera.connectedPoint;
|
|
113
|
+
if (cameraConnectedPoint) {
|
|
114
|
+
this._frameGraphTask.camera = cameraConnectedPoint.value;
|
|
115
|
+
}
|
|
116
|
+
const objectsConnectedPoint = this.objects.connectedPoint;
|
|
117
|
+
if (objectsConnectedPoint) {
|
|
118
|
+
this._frameGraphTask.objectList = objectsConnectedPoint.value;
|
|
119
|
+
}
|
|
120
|
+
this._frameGraphTask.dependencies = [];
|
|
121
|
+
const dependenciesConnectedPoint = this.dependencies.connectedPoint;
|
|
122
|
+
if (dependenciesConnectedPoint) {
|
|
123
|
+
this._frameGraphTask.dependencies[0] = dependenciesConnectedPoint.value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
_dumpPropertiesCode() {
|
|
127
|
+
const codes = [];
|
|
128
|
+
codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);
|
|
129
|
+
codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);
|
|
130
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
131
|
+
}
|
|
132
|
+
serialize() {
|
|
133
|
+
const serializationObject = super.serialize();
|
|
134
|
+
serializationObject.depthTest = this.depthTest;
|
|
135
|
+
serializationObject.depthWrite = this.depthWrite;
|
|
136
|
+
return serializationObject;
|
|
137
|
+
}
|
|
138
|
+
_deserialize(serializationObject) {
|
|
139
|
+
super._deserialize(serializationObject);
|
|
140
|
+
this.depthTest = serializationObject.depthTest;
|
|
141
|
+
this.depthWrite = serializationObject.depthWrite;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
__decorate([
|
|
145
|
+
editableInPropertyPage("Depth test", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
146
|
+
], NodeRenderGraphBaseObjectRendererBlock.prototype, "depthTest", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
editableInPropertyPage("Depth write", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
149
|
+
], NodeRenderGraphBaseObjectRendererBlock.prototype, "depthWrite", null);
|
|
150
|
+
//# sourceMappingURL=baseObjectRendererBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AAGtG;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,oBAAoB;IAG5E;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QACpF,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,wCAAwC,CAAC,uCAAuC,EAAE,IAAI,CAAC,CAAC;QACpH,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,MAAM,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,wCAAwC,CAAC,UAAU,CAAC,CAAC;QACnF,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE,wCAAwC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAE3F,IA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AAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraph, FrameGraphTextureHandle, FrameGraphObjectList, Camera } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport type { FrameGraphObjectRendererTask } from \"../../../Tasks/Rendering/objectRendererTask\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this.registerInput(\"dependencies\", NodeRenderGraphBlockConnectionPointTypes.Texture, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.dependencies.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.name = this.name;\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n\r\n const destinationConnectedPoint = this.destination.connectedPoint;\r\n if (destinationConnectedPoint) {\r\n this._frameGraphTask.destinationTexture = destinationConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n\r\n const depthConnectedPoint = this.depth.connectedPoint;\r\n if (depthConnectedPoint) {\r\n this._frameGraphTask.depthTexture = depthConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n\r\n const cameraConnectedPoint = this.camera.connectedPoint;\r\n if (cameraConnectedPoint) {\r\n this._frameGraphTask.camera = cameraConnectedPoint.value as Camera;\r\n }\r\n\r\n const objectsConnectedPoint = this.objects.connectedPoint;\r\n if (objectsConnectedPoint) {\r\n this._frameGraphTask.objectList = objectsConnectedPoint.value as FrameGraphObjectList;\r\n }\r\n\r\n this._frameGraphTask.dependencies = [];\r\n\r\n const dependenciesConnectedPoint = this.dependencies.connectedPoint;\r\n if (dependenciesConnectedPoint) {\r\n this._frameGraphTask.dependencies[0] = dependenciesConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n"]}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import { FrameGraphObjectRendererTask } from "../../../Tasks/Rendering/objectRendererTask";
|
|
1
|
+
import type { Scene, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { NodeRenderGraphBaseObjectRendererBlock } from "./baseObjectRendererBlock";
|
|
4
3
|
/**
|
|
5
4
|
* Block that render objects to a render target
|
|
6
5
|
*/
|
|
7
|
-
export declare class NodeRenderGraphObjectRendererBlock extends
|
|
8
|
-
protected _frameGraphTask: FrameGraphObjectRendererTask;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the frame graph task associated with this block
|
|
11
|
-
*/
|
|
12
|
-
get task(): FrameGraphObjectRendererTask;
|
|
6
|
+
export declare class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {
|
|
13
7
|
/**
|
|
14
8
|
* Create a new NodeRenderGraphObjectRendererBlock
|
|
15
9
|
* @param name defines the block name
|
|
@@ -17,47 +11,9 @@ export declare class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphB
|
|
|
17
11
|
* @param scene defines the hosting scene
|
|
18
12
|
*/
|
|
19
13
|
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
-
/** Indicates if depth testing must be enabled or disabled */
|
|
21
|
-
get depthTest(): boolean;
|
|
22
|
-
set depthTest(value: boolean);
|
|
23
|
-
/** Indicates if depth writing must be enabled or disabled */
|
|
24
|
-
get depthWrite(): boolean;
|
|
25
|
-
set depthWrite(value: boolean);
|
|
26
14
|
/**
|
|
27
15
|
* Gets the current class name
|
|
28
16
|
* @returns the class name
|
|
29
17
|
*/
|
|
30
18
|
getClassName(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Gets the destination texture input component
|
|
33
|
-
*/
|
|
34
|
-
get destination(): NodeRenderGraphConnectionPoint;
|
|
35
|
-
/**
|
|
36
|
-
* Gets the depth texture input component
|
|
37
|
-
*/
|
|
38
|
-
get depth(): NodeRenderGraphConnectionPoint;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the camera input component
|
|
41
|
-
*/
|
|
42
|
-
get camera(): NodeRenderGraphConnectionPoint;
|
|
43
|
-
/**
|
|
44
|
-
* Gets the objects input component
|
|
45
|
-
*/
|
|
46
|
-
get objects(): NodeRenderGraphConnectionPoint;
|
|
47
|
-
/**
|
|
48
|
-
* Gets the dependencies input component
|
|
49
|
-
*/
|
|
50
|
-
get dependencies(): NodeRenderGraphConnectionPoint;
|
|
51
|
-
/**
|
|
52
|
-
* Gets the output component
|
|
53
|
-
*/
|
|
54
|
-
get output(): NodeRenderGraphConnectionPoint;
|
|
55
|
-
/**
|
|
56
|
-
* Gets the output depth component
|
|
57
|
-
*/
|
|
58
|
-
get outputDepth(): NodeRenderGraphConnectionPoint;
|
|
59
|
-
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
60
|
-
protected _dumpPropertiesCode(): string;
|
|
61
|
-
serialize(): any;
|
|
62
|
-
_deserialize(serializationObject: any): void;
|
|
63
19
|
}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
-
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
1
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
|
-
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
5
|
-
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
6
2
|
import { FrameGraphObjectRendererTask } from "../../../Tasks/Rendering/objectRendererTask.js";
|
|
3
|
+
import { NodeRenderGraphBaseObjectRendererBlock } from "./baseObjectRendererBlock.js";
|
|
7
4
|
/**
|
|
8
5
|
* Block that render objects to a render target
|
|
9
6
|
*/
|
|
10
|
-
export class NodeRenderGraphObjectRendererBlock extends
|
|
11
|
-
/**
|
|
12
|
-
* Gets the frame graph task associated with this block
|
|
13
|
-
*/
|
|
14
|
-
get task() {
|
|
15
|
-
return this._frameGraphTask;
|
|
16
|
-
}
|
|
7
|
+
export class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {
|
|
17
8
|
/**
|
|
18
9
|
* Create a new NodeRenderGraphObjectRendererBlock
|
|
19
10
|
* @param name defines the block name
|
|
@@ -22,34 +13,8 @@ export class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBlock {
|
|
|
22
13
|
*/
|
|
23
14
|
constructor(name, frameGraph, scene) {
|
|
24
15
|
super(name, frameGraph, scene);
|
|
25
|
-
this.registerInput("destination", NodeRenderGraphBlockConnectionPointTypes.Texture);
|
|
26
|
-
this.registerInput("depth", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);
|
|
27
|
-
this.registerInput("camera", NodeRenderGraphBlockConnectionPointTypes.Camera);
|
|
28
|
-
this.registerInput("objects", NodeRenderGraphBlockConnectionPointTypes.ObjectList);
|
|
29
|
-
this.registerInput("dependencies", NodeRenderGraphBlockConnectionPointTypes.Texture, true);
|
|
30
|
-
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
31
|
-
this.registerOutput("outputDepth", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
32
|
-
this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);
|
|
33
|
-
this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);
|
|
34
|
-
this.dependencies.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
35
|
-
this.output._typeConnectionSource = this.destination;
|
|
36
|
-
this.outputDepth._typeConnectionSource = this.depth;
|
|
37
16
|
this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, frameGraph, scene);
|
|
38
17
|
}
|
|
39
|
-
/** Indicates if depth testing must be enabled or disabled */
|
|
40
|
-
get depthTest() {
|
|
41
|
-
return this._frameGraphTask.depthTest;
|
|
42
|
-
}
|
|
43
|
-
set depthTest(value) {
|
|
44
|
-
this._frameGraphTask.depthTest = value;
|
|
45
|
-
}
|
|
46
|
-
/** Indicates if depth writing must be enabled or disabled */
|
|
47
|
-
get depthWrite() {
|
|
48
|
-
return this._frameGraphTask.depthWrite;
|
|
49
|
-
}
|
|
50
|
-
set depthWrite(value) {
|
|
51
|
-
this._frameGraphTask.depthWrite = value;
|
|
52
|
-
}
|
|
53
18
|
/**
|
|
54
19
|
* Gets the current class name
|
|
55
20
|
* @returns the class name
|
|
@@ -57,98 +22,6 @@ export class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBlock {
|
|
|
57
22
|
getClassName() {
|
|
58
23
|
return "NodeRenderGraphObjectRendererBlock";
|
|
59
24
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Gets the destination texture input component
|
|
62
|
-
*/
|
|
63
|
-
get destination() {
|
|
64
|
-
return this._inputs[0];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Gets the depth texture input component
|
|
68
|
-
*/
|
|
69
|
-
get depth() {
|
|
70
|
-
return this._inputs[1];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Gets the camera input component
|
|
74
|
-
*/
|
|
75
|
-
get camera() {
|
|
76
|
-
return this._inputs[2];
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Gets the objects input component
|
|
80
|
-
*/
|
|
81
|
-
get objects() {
|
|
82
|
-
return this._inputs[3];
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Gets the dependencies input component
|
|
86
|
-
*/
|
|
87
|
-
get dependencies() {
|
|
88
|
-
return this._inputs[4];
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Gets the output component
|
|
92
|
-
*/
|
|
93
|
-
get output() {
|
|
94
|
-
return this._outputs[0];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Gets the output depth component
|
|
98
|
-
*/
|
|
99
|
-
get outputDepth() {
|
|
100
|
-
return this._outputs[1];
|
|
101
|
-
}
|
|
102
|
-
_buildBlock(state) {
|
|
103
|
-
super._buildBlock(state);
|
|
104
|
-
this._frameGraphTask.name = this.name;
|
|
105
|
-
this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
|
|
106
|
-
this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the "outputDepth" texture of the task
|
|
107
|
-
const destinationConnectedPoint = this.destination.connectedPoint;
|
|
108
|
-
if (destinationConnectedPoint) {
|
|
109
|
-
this._frameGraphTask.destinationTexture = destinationConnectedPoint.value;
|
|
110
|
-
}
|
|
111
|
-
const depthConnectedPoint = this.depth.connectedPoint;
|
|
112
|
-
if (depthConnectedPoint) {
|
|
113
|
-
this._frameGraphTask.depthTexture = depthConnectedPoint.value;
|
|
114
|
-
}
|
|
115
|
-
const cameraConnectedPoint = this.camera.connectedPoint;
|
|
116
|
-
if (cameraConnectedPoint) {
|
|
117
|
-
this._frameGraphTask.camera = cameraConnectedPoint.value;
|
|
118
|
-
}
|
|
119
|
-
const objectsConnectedPoint = this.objects.connectedPoint;
|
|
120
|
-
if (objectsConnectedPoint) {
|
|
121
|
-
this._frameGraphTask.objectList = objectsConnectedPoint.value;
|
|
122
|
-
}
|
|
123
|
-
this._frameGraphTask.dependencies = [];
|
|
124
|
-
const dependenciesConnectedPoint = this.dependencies.connectedPoint;
|
|
125
|
-
if (dependenciesConnectedPoint) {
|
|
126
|
-
this._frameGraphTask.dependencies[0] = dependenciesConnectedPoint.value;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
_dumpPropertiesCode() {
|
|
130
|
-
const codes = [];
|
|
131
|
-
codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);
|
|
132
|
-
codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);
|
|
133
|
-
return super._dumpPropertiesCode() + codes.join("\n");
|
|
134
|
-
}
|
|
135
|
-
serialize() {
|
|
136
|
-
const serializationObject = super.serialize();
|
|
137
|
-
serializationObject.depthTest = this.depthTest;
|
|
138
|
-
serializationObject.depthWrite = this.depthWrite;
|
|
139
|
-
return serializationObject;
|
|
140
|
-
}
|
|
141
|
-
_deserialize(serializationObject) {
|
|
142
|
-
super._deserialize(serializationObject);
|
|
143
|
-
this.depthTest = serializationObject.depthTest;
|
|
144
|
-
this.depthWrite = serializationObject.depthWrite;
|
|
145
|
-
}
|
|
146
25
|
}
|
|
147
|
-
__decorate([
|
|
148
|
-
editableInPropertyPage("Depth test", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
149
|
-
], NodeRenderGraphObjectRendererBlock.prototype, "depthTest", null);
|
|
150
|
-
__decorate([
|
|
151
|
-
editableInPropertyPage("Depth write", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
152
|
-
], NodeRenderGraphObjectRendererBlock.prototype, "depthWrite", null);
|
|
153
26
|
RegisterClass("BABYLON.NodeRenderGraphObjectRendererBlock", NodeRenderGraphObjectRendererBlock);
|
|
154
27
|
//# sourceMappingURL=objectRendererBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EA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C,YAAY,CAAC,cAAc,CAAC;QACpE,IAAI,0BAA0B,EAAE;YAC5B,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,0BAA0B,CAAC,KAAgC,CAAC;SACtG;IACL,CAAC;IAEkB,mBAAmB;QAClC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,gBAAgB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACvE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAnIG;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;mEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;oEAGnF;AAyHL,aAAa,CAAC,4CAA4C,EAAE,kCAAkC,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraph, FrameGraphTextureHandle, FrameGraphObjectList, Camera } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphObjectRendererTask } from \"../../../Tasks/Rendering/objectRendererTask\";\r\n\r\n/**\r\n * Block that render objects to a render target\r\n */\r\nexport class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this.registerInput(\"dependencies\", NodeRenderGraphBlockConnectionPointTypes.Texture, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.dependencies.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n\r\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, frameGraph, scene);\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.name = this.name;\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n\r\n const destinationConnectedPoint = this.destination.connectedPoint;\r\n if (destinationConnectedPoint) {\r\n this._frameGraphTask.destinationTexture = destinationConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n\r\n const depthConnectedPoint = this.depth.connectedPoint;\r\n if (depthConnectedPoint) {\r\n this._frameGraphTask.depthTexture = depthConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n\r\n const cameraConnectedPoint = this.camera.connectedPoint;\r\n if (cameraConnectedPoint) {\r\n this._frameGraphTask.camera = cameraConnectedPoint.value as Camera;\r\n }\r\n\r\n const objectsConnectedPoint = this.objects.connectedPoint;\r\n if (objectsConnectedPoint) {\r\n this._frameGraphTask.objectList = objectsConnectedPoint.value as FrameGraphObjectList;\r\n }\r\n\r\n this._frameGraphTask.dependencies = [];\r\n\r\n const dependenciesConnectedPoint = this.dependencies.connectedPoint;\r\n if (dependenciesConnectedPoint) {\r\n this._frameGraphTask.dependencies[0] = dependenciesConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphObjectRendererBlock\", NodeRenderGraphObjectRendererBlock);\r\n"]}
|
|
1
|
+
{"version":3,"file":"objectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,sCAAsC,EAAE,MAAM,2BAA2B,CAAC;AAEnF;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,sCAAsC;IAC1F;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,eAAe,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1F,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,oCAAoC,CAAC;IAChD,CAAC;CACJ;AAED,aAAa,CAAC,4CAA4C,EAAE,kCAAkC,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { FrameGraphObjectRendererTask } from \"../../../Tasks/Rendering/objectRendererTask\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that render objects to a render target\r\n */\r\nexport class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\r\n /**\r\n * Create a new NodeRenderGraphObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, frameGraph, scene);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphObjectRendererBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphObjectRendererBlock\", NodeRenderGraphObjectRendererBlock);\r\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Scene, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { FrameGraphTAAObjectRendererTask } from "../../../Tasks/Rendering/taaObjectRendererTask.js";
|
|
3
|
+
import { NodeRenderGraphBaseObjectRendererBlock } from "./baseObjectRendererBlock";
|
|
4
|
+
/**
|
|
5
|
+
* Block that render objects with temporal anti-aliasing to a render target
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphTAAObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphTAAObjectRendererTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphTAAObjectRendererTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphTAAObjectRendererBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
* @param frameGraph defines the hosting frame graph
|
|
17
|
+
* @param scene defines the hosting scene
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
+
/** Number of accumulated samples */
|
|
21
|
+
get samples(): number;
|
|
22
|
+
set samples(value: number);
|
|
23
|
+
/** The factor used to blend the history frame with current frame */
|
|
24
|
+
get factor(): number;
|
|
25
|
+
set factor(value: number);
|
|
26
|
+
/** Indicates if depth testing must be enabled or disabled */
|
|
27
|
+
get disableOnCameraMove(): boolean;
|
|
28
|
+
set disableOnCameraMove(value: boolean);
|
|
29
|
+
/** Indicates if TAA must be enabled or disabled */
|
|
30
|
+
get disableTAA(): boolean;
|
|
31
|
+
set disableTAA(value: boolean);
|
|
32
|
+
/**
|
|
33
|
+
* Gets the current class name
|
|
34
|
+
* @returns the class name
|
|
35
|
+
*/
|
|
36
|
+
getClassName(): string;
|
|
37
|
+
protected _dumpPropertiesCode(): string;
|
|
38
|
+
serialize(): any;
|
|
39
|
+
_deserialize(serializationObject: any): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
3
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
4
|
+
import { FrameGraphTAAObjectRendererTask } from "../../../Tasks/Rendering/taaObjectRendererTask.js";
|
|
5
|
+
import { NodeRenderGraphBaseObjectRendererBlock } from "./baseObjectRendererBlock.js";
|
|
6
|
+
/**
|
|
7
|
+
* Block that render objects with temporal anti-aliasing to a render target
|
|
8
|
+
*/
|
|
9
|
+
export class NodeRenderGraphTAAObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {
|
|
10
|
+
/**
|
|
11
|
+
* Gets the frame graph task associated with this block
|
|
12
|
+
*/
|
|
13
|
+
get task() {
|
|
14
|
+
return this._frameGraphTask;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a new NodeRenderGraphTAAObjectRendererBlock
|
|
18
|
+
* @param name defines the block name
|
|
19
|
+
* @param frameGraph defines the hosting frame graph
|
|
20
|
+
* @param scene defines the hosting scene
|
|
21
|
+
*/
|
|
22
|
+
constructor(name, frameGraph, scene) {
|
|
23
|
+
super(name, frameGraph, scene);
|
|
24
|
+
this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, frameGraph, scene);
|
|
25
|
+
}
|
|
26
|
+
/** Number of accumulated samples */
|
|
27
|
+
get samples() {
|
|
28
|
+
return this._frameGraphTask.postProcess.samples;
|
|
29
|
+
}
|
|
30
|
+
set samples(value) {
|
|
31
|
+
this._frameGraphTask.postProcess.samples = value;
|
|
32
|
+
}
|
|
33
|
+
/** The factor used to blend the history frame with current frame */
|
|
34
|
+
get factor() {
|
|
35
|
+
return this._frameGraphTask.postProcess.factor;
|
|
36
|
+
}
|
|
37
|
+
set factor(value) {
|
|
38
|
+
this._frameGraphTask.postProcess.factor = value;
|
|
39
|
+
}
|
|
40
|
+
/** Indicates if depth testing must be enabled or disabled */
|
|
41
|
+
get disableOnCameraMove() {
|
|
42
|
+
return this._frameGraphTask.postProcess.disableOnCameraMove;
|
|
43
|
+
}
|
|
44
|
+
set disableOnCameraMove(value) {
|
|
45
|
+
this._frameGraphTask.postProcess.disableOnCameraMove = value;
|
|
46
|
+
}
|
|
47
|
+
/** Indicates if TAA must be enabled or disabled */
|
|
48
|
+
get disableTAA() {
|
|
49
|
+
return this._frameGraphTask.postProcess.disabled;
|
|
50
|
+
}
|
|
51
|
+
set disableTAA(value) {
|
|
52
|
+
this._frameGraphTask.postProcess.disabled = value;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets the current class name
|
|
56
|
+
* @returns the class name
|
|
57
|
+
*/
|
|
58
|
+
getClassName() {
|
|
59
|
+
return "NodeRenderGraphTAAObjectRendererBlock";
|
|
60
|
+
}
|
|
61
|
+
_dumpPropertiesCode() {
|
|
62
|
+
const codes = [];
|
|
63
|
+
codes.push(`${this._codeVariableName}.samples = ${this.samples};`);
|
|
64
|
+
codes.push(`${this._codeVariableName}.factor = ${this.factor};`);
|
|
65
|
+
codes.push(`${this._codeVariableName}.disableOnCameraMove = ${this.disableOnCameraMove};`);
|
|
66
|
+
codes.push(`${this._codeVariableName}.disableTAA = ${this.disableTAA};`);
|
|
67
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
68
|
+
}
|
|
69
|
+
serialize() {
|
|
70
|
+
const serializationObject = super.serialize();
|
|
71
|
+
serializationObject.samples = this.samples;
|
|
72
|
+
serializationObject.factor = this.factor;
|
|
73
|
+
serializationObject.disableOnCameraMove = this.disableOnCameraMove;
|
|
74
|
+
serializationObject.disableTAA = this.disableTAA;
|
|
75
|
+
return serializationObject;
|
|
76
|
+
}
|
|
77
|
+
_deserialize(serializationObject) {
|
|
78
|
+
super._deserialize(serializationObject);
|
|
79
|
+
this.samples = serializationObject.samples;
|
|
80
|
+
this.factor = serializationObject.factor;
|
|
81
|
+
this.disableOnCameraMove = serializationObject.disableOnCameraMove;
|
|
82
|
+
this.disableTAA = serializationObject.disableTAA;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
__decorate([
|
|
86
|
+
editableInPropertyPage("Samples", 2 /* PropertyTypeForEdition.Int */, "TEMPORAL ANTI-ALIASING")
|
|
87
|
+
], NodeRenderGraphTAAObjectRendererBlock.prototype, "samples", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
editableInPropertyPage("Factor", 1 /* PropertyTypeForEdition.Float */, "TEMPORAL ANTI-ALIASING")
|
|
90
|
+
], NodeRenderGraphTAAObjectRendererBlock.prototype, "factor", null);
|
|
91
|
+
__decorate([
|
|
92
|
+
editableInPropertyPage("Disable on camera move", 0 /* PropertyTypeForEdition.Boolean */, "TEMPORAL ANTI-ALIASING")
|
|
93
|
+
], NodeRenderGraphTAAObjectRendererBlock.prototype, "disableOnCameraMove", null);
|
|
94
|
+
__decorate([
|
|
95
|
+
editableInPropertyPage("Disable TAA", 0 /* PropertyTypeForEdition.Boolean */, "TEMPORAL ANTI-ALIASING")
|
|
96
|
+
], NodeRenderGraphTAAObjectRendererBlock.prototype, "disableTAA", null);
|
|
97
|
+
RegisterClass("BABYLON.NodeRenderGraphTAAObjectRendererBlock", NodeRenderGraphTAAObjectRendererBlock);
|
|
98
|
+
//# sourceMappingURL=taaObjectRendererBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taaObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,0DAA8D;AACxG,OAAO,EAAE,sCAAsC,EAAE,MAAM,2BAA2B,CAAC;AAEnF;;GAEG;AACH,MAAM,OAAO,qCAAsC,SAAQ,sCAAsC;IAG7F;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,eAAe,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAC7F,CAAC;IAED,oCAAoC;IAEpC,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC;IACpD,CAAC;IAED,IAAW,OAAO,CAAC,KAAa;QAC5B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IACrD,CAAC;IAED,oEAAoE;IAEpE,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC;IACnD,CAAC;IAED,IAAW,MAAM,CAAC,KAAa;QAC3B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,GAAG,KAAK,CAAC;IACpD,CAAC;IAED,6DAA6D;IAE7D,IAAW,mBA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AAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACnE,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAvEG;IADC,sBAAsB,CAAC,SAAS,sCAA8B,wBAAwB,CAAC;oEAGvF;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,wBAAwB,CAAC;mEAGxF;AAQD;IADC,sBAAsB,CAAC,wBAAwB,0CAAkC,wBAAwB,CAAC;gFAG1G;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,wBAAwB,CAAC;uEAG/F;AAyCL,aAAa,CAAC,+CAA+C,EAAE,qCAAqC,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphTAAObjectRendererTask } from \"core/FrameGraph/Tasks/Rendering/taaObjectRendererTask\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that render objects with temporal anti-aliasing to a render target\r\n */\r\nexport class NodeRenderGraphTAAObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\r\n protected override _frameGraphTask: FrameGraphTAAObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphTAAObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, frameGraph, scene);\r\n }\r\n\r\n /** Number of accumulated samples */\r\n @editableInPropertyPage(\"Samples\", PropertyTypeForEdition.Int, \"TEMPORAL ANTI-ALIASING\")\r\n public get samples() {\r\n return this._frameGraphTask.postProcess.samples;\r\n }\r\n\r\n public set samples(value: number) {\r\n this._frameGraphTask.postProcess.samples = value;\r\n }\r\n\r\n /** The factor used to blend the history frame with current frame */\r\n @editableInPropertyPage(\"Factor\", PropertyTypeForEdition.Float, \"TEMPORAL ANTI-ALIASING\")\r\n public get factor() {\r\n return this._frameGraphTask.postProcess.factor;\r\n }\r\n\r\n public set factor(value: number) {\r\n this._frameGraphTask.postProcess.factor = value;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Disable on camera move\", PropertyTypeForEdition.Boolean, \"TEMPORAL ANTI-ALIASING\")\r\n public get disableOnCameraMove() {\r\n return this._frameGraphTask.postProcess.disableOnCameraMove;\r\n }\r\n\r\n public set disableOnCameraMove(value: boolean) {\r\n this._frameGraphTask.postProcess.disableOnCameraMove = value;\r\n }\r\n\r\n /** Indicates if TAA must be enabled or disabled */\r\n @editableInPropertyPage(\"Disable TAA\", PropertyTypeForEdition.Boolean, \"TEMPORAL ANTI-ALIASING\")\r\n public get disableTAA() {\r\n return this._frameGraphTask.postProcess.disabled;\r\n }\r\n\r\n public set disableTAA(value: boolean) {\r\n this._frameGraphTask.postProcess.disabled = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphTAAObjectRendererBlock\";\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.samples = ${this.samples};`);\r\n codes.push(`${this._codeVariableName}.factor = ${this.factor};`);\r\n codes.push(`${this._codeVariableName}.disableOnCameraMove = ${this.disableOnCameraMove};`);\r\n codes.push(`${this._codeVariableName}.disableTAA = ${this.disableTAA};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.samples = this.samples;\r\n serializationObject.factor = this.factor;\r\n serializationObject.disableOnCameraMove = this.disableOnCameraMove;\r\n serializationObject.disableTAA = this.disableTAA;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.samples = serializationObject.samples;\r\n this.factor = serializationObject.factor;\r\n this.disableOnCameraMove = serializationObject.disableOnCameraMove;\r\n this.disableTAA = serializationObject.disableTAA;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphTAAObjectRendererBlock\", NodeRenderGraphTAAObjectRendererBlock);\r\n"]}
|