@babylonjs/core 8.49.6 → 8.49.7
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/Animations/animationGroup.d.ts +2 -3
- package/Animations/animationGroup.js +10 -15
- package/Animations/animationGroup.js.map +1 -1
- package/Bones/bone.d.ts +2 -0
- package/Bones/bone.js +2 -0
- package/Bones/bone.js.map +1 -1
- package/Bones/skeleton.js +7 -0
- package/Bones/skeleton.js.map +1 -1
- package/Cameras/Limits/geospatialLimits.d.ts +1 -1
- package/Cameras/Limits/geospatialLimits.js +1 -1
- package/Cameras/Limits/geospatialLimits.js.map +1 -1
- package/Culling/ray.core.js +2 -2
- package/Culling/ray.core.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.d.ts +76 -0
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.js +209 -0
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.d.ts +5 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +34 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +20 -6
- package/FrameGraph/Tasks/Layers/baseLayerTask.js +108 -77
- package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/glowLayerTask.js +1 -1
- package/FrameGraph/Tasks/Layers/glowLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js +1 -1
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.d.ts +28 -0
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js +36 -0
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +5 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js +12 -1
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +5 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +12 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +5 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +10 -1
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.d.ts +5 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js +12 -1
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.d.ts +5 -0
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +12 -1
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +2 -1
- package/FrameGraph/frameGraphRenderContext.js +3 -1
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/Layers/effectLayer.d.ts +4 -0
- package/Layers/effectLayer.js +2 -0
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/highlightLayer.js +1 -0
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/index.d.ts +2 -0
- package/Layers/index.js +2 -0
- package/Layers/index.js.map +1 -1
- package/Layers/selectionOutlineLayer.d.ts +180 -0
- package/Layers/selectionOutlineLayer.js +319 -0
- package/Layers/selectionOutlineLayer.js.map +1 -0
- package/Layers/thinEffectLayer.d.ts +5 -1
- package/Layers/thinEffectLayer.js +21 -16
- package/Layers/thinEffectLayer.js.map +1 -1
- package/Layers/thinGlowLayer.js +1 -0
- package/Layers/thinGlowLayer.js.map +1 -1
- package/Layers/thinHighlightLayer.js +1 -0
- package/Layers/thinHighlightLayer.js.map +1 -1
- package/Layers/thinSelectionOutlineLayer.d.ts +148 -0
- package/Layers/thinSelectionOutlineLayer.js +579 -0
- package/Layers/thinSelectionOutlineLayer.js.map +1 -0
- package/Loading/Plugins/babylonFileLoader.js +136 -48
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.d.ts +6 -0
- package/Materials/Node/Blocks/Dual/textureBlock.js +10 -0
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +9 -0
- package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
- package/Materials/Node/Blocks/index.d.ts +1 -0
- package/Materials/Node/Blocks/index.js +1 -0
- package/Materials/Node/Blocks/index.js.map +1 -1
- package/Materials/Node/Blocks/pannerBlock.d.ts +39 -0
- package/Materials/Node/Blocks/pannerBlock.js +88 -0
- package/Materials/Node/Blocks/pannerBlock.js.map +1 -0
- package/Materials/Node/nodeMaterialBuildStateSharedData.js +1 -1
- package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
- package/Maths/math.vector.functions.d.ts +11 -3
- package/Maths/math.vector.functions.js +10 -0
- package/Maths/math.vector.functions.js.map +1 -1
- package/Meshes/Compression/dracoCompressionWorker.d.ts +1 -1
- package/Meshes/Compression/dracoCompressionWorker.js +14 -9
- package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.js +1 -1
- package/Meshes/Compression/dracoDecoder.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.d.ts +2 -2
- package/Meshes/Compression/dracoEncoder.js +11 -5
- package/Meshes/Compression/dracoEncoder.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.types.d.ts +8 -5
- package/Meshes/Compression/dracoEncoder.types.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +18 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +122 -28
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.d.ts +74 -0
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.js +107 -0
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.js.map +1 -0
- package/Meshes/abstractMesh.d.ts +4 -0
- package/Meshes/abstractMesh.js +4 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/csg2.js +9 -1
- package/Meshes/csg2.js.map +1 -1
- package/Meshes/instancedMesh.js +2 -2
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/mesh.js +6 -1
- package/Meshes/mesh.js.map +1 -1
- package/Misc/environmentTextureTools.js +1 -1
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/fileTools.js +1 -1
- package/Misc/fileTools.js.map +1 -1
- package/Misc/textureTools.d.ts +2 -1
- package/Misc/textureTools.js +5 -3
- package/Misc/textureTools.js.map +1 -1
- package/Morph/morphTarget.js +2 -1
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.d.ts +27 -4
- package/Particles/Node/Blocks/systemBlock.js +36 -8
- package/Particles/Node/Blocks/systemBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.helper.js +42 -6
- package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
- package/Shaders/selection.fragment.d.ts +7 -0
- package/Shaders/selection.fragment.js +47 -0
- package/Shaders/selection.fragment.js.map +1 -0
- package/Shaders/selection.vertex.d.ts +17 -0
- package/Shaders/selection.vertex.js +95 -0
- package/Shaders/selection.vertex.js.map +1 -0
- package/Shaders/selectionOutline.fragment.d.ts +5 -0
- package/Shaders/selectionOutline.fragment.js +23 -0
- package/Shaders/selectionOutline.fragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalUnlitComponents.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalUnlitComponents.js.map +1 -1
- package/ShadersWGSL/selection.fragment.d.ts +7 -0
- package/ShadersWGSL/selection.fragment.js +47 -0
- package/ShadersWGSL/selection.fragment.js.map +1 -0
- package/ShadersWGSL/selection.vertex.d.ts +17 -0
- package/ShadersWGSL/selection.vertex.js +96 -0
- package/ShadersWGSL/selection.vertex.js.map +1 -0
- package/ShadersWGSL/selectionOutline.fragment.d.ts +5 -0
- package/ShadersWGSL/selectionOutline.fragment.js +24 -0
- package/ShadersWGSL/selectionOutline.fragment.js.map +1 -0
- package/package.json +1 -1
- package/scene.d.ts +2 -2
- package/scene.js +10 -2
- package/scene.js.map +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Scene, NodeRenderGraphBuildState, FrameGraph, NodeRenderGraphConnectionPoint } from "../../../../index.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
|
+
import { FrameGraphSelectionOutlineLayerTask } from "../../../Tasks/Layers/selectionOutlineTask.js";
|
|
4
|
+
import { Color3 } from "../../../../Maths/math.color.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block that implements the selection outline layer
|
|
7
|
+
*/
|
|
8
|
+
export declare class NodeRenderGraphSelectionOutlineLayerBlock extends NodeRenderGraphBlock {
|
|
9
|
+
protected _frameGraphTask: FrameGraphSelectionOutlineLayerTask;
|
|
10
|
+
_additionalConstructionParameters: [number, number | undefined, number];
|
|
11
|
+
/**
|
|
12
|
+
* Gets the frame graph task associated with this block
|
|
13
|
+
*/
|
|
14
|
+
get task(): FrameGraphSelectionOutlineLayerTask;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new NodeRenderGraphSelectionOutlineLayerBlock
|
|
17
|
+
* @param name defines the block name
|
|
18
|
+
* @param frameGraph defines the hosting frame graph
|
|
19
|
+
* @param scene defines the hosting scene
|
|
20
|
+
* @param layerTextureRatio multiplication factor applied to the main texture size to compute the size of the layer render target texture (default: 1.0)
|
|
21
|
+
* @param layerTextureFixedSize defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided (default: undefined)
|
|
22
|
+
* @param layerTextureType defines the type of the layer texture (default: Constants.TEXTURETYPE_HALF_FLOAT)
|
|
23
|
+
*/
|
|
24
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene, layerTextureRatio?: number, layerTextureFixedSize?: number, layerTextureType?: number);
|
|
25
|
+
private _createTask;
|
|
26
|
+
/** Multiplication factor applied to the main texture size to compute the size of the layer render target texture */
|
|
27
|
+
get layerTextureRatio(): number;
|
|
28
|
+
set layerTextureRatio(value: number);
|
|
29
|
+
/** Defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided */
|
|
30
|
+
get layerTextureFixedSize(): number;
|
|
31
|
+
set layerTextureFixedSize(value: number);
|
|
32
|
+
/** Defines the type of the layer texture */
|
|
33
|
+
get layerTextureType(): number;
|
|
34
|
+
set layerTextureType(value: number);
|
|
35
|
+
/** The outline color */
|
|
36
|
+
get outlineColor(): Color3;
|
|
37
|
+
set outlineColor(value: Color3);
|
|
38
|
+
/** The thickness of the edges */
|
|
39
|
+
get outlineThickness(): number;
|
|
40
|
+
set outlineThickness(value: number);
|
|
41
|
+
/** The strength of the occlusion effect */
|
|
42
|
+
get occlusionStrength(): number;
|
|
43
|
+
set occlusionStrength(value: number);
|
|
44
|
+
/** The occlusion threshold */
|
|
45
|
+
get occlusionThreshold(): number;
|
|
46
|
+
set occlusionThreshold(value: number);
|
|
47
|
+
/**
|
|
48
|
+
* Gets the current class name
|
|
49
|
+
* @returns the class name
|
|
50
|
+
*/
|
|
51
|
+
getClassName(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Gets the target texture input component
|
|
54
|
+
*/
|
|
55
|
+
get target(): NodeRenderGraphConnectionPoint;
|
|
56
|
+
/**
|
|
57
|
+
* Gets the layer texture input component
|
|
58
|
+
*/
|
|
59
|
+
get layer(): NodeRenderGraphConnectionPoint;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the objectRenderer input component
|
|
62
|
+
*/
|
|
63
|
+
get objectRenderer(): NodeRenderGraphConnectionPoint;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the depth input component
|
|
66
|
+
*/
|
|
67
|
+
get depth(): NodeRenderGraphConnectionPoint;
|
|
68
|
+
/**
|
|
69
|
+
* Gets the output component
|
|
70
|
+
*/
|
|
71
|
+
get output(): NodeRenderGraphConnectionPoint;
|
|
72
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
73
|
+
protected _dumpPropertiesCode(): string;
|
|
74
|
+
serialize(): any;
|
|
75
|
+
_deserialize(serializationObject: any): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
5
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
6
|
+
import { FrameGraphSelectionOutlineLayerTask } from "../../../Tasks/Layers/selectionOutlineTask.js";
|
|
7
|
+
|
|
8
|
+
import { NodeRenderGraphConnectionPointCustomObject } from "../../nodeRenderGraphConnectionPointCustomObject.js";
|
|
9
|
+
import { NodeRenderGraphBaseObjectRendererBlock } from "../Rendering/baseObjectRendererBlock.js";
|
|
10
|
+
import { Color3 } from "../../../../Maths/math.color.js";
|
|
11
|
+
/**
|
|
12
|
+
* Block that implements the selection outline layer
|
|
13
|
+
*/
|
|
14
|
+
export class NodeRenderGraphSelectionOutlineLayerBlock extends NodeRenderGraphBlock {
|
|
15
|
+
/**
|
|
16
|
+
* Gets the frame graph task associated with this block
|
|
17
|
+
*/
|
|
18
|
+
get task() {
|
|
19
|
+
return this._frameGraphTask;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a new NodeRenderGraphSelectionOutlineLayerBlock
|
|
23
|
+
* @param name defines the block name
|
|
24
|
+
* @param frameGraph defines the hosting frame graph
|
|
25
|
+
* @param scene defines the hosting scene
|
|
26
|
+
* @param layerTextureRatio multiplication factor applied to the main texture size to compute the size of the layer render target texture (default: 1.0)
|
|
27
|
+
* @param layerTextureFixedSize defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided (default: undefined)
|
|
28
|
+
* @param layerTextureType defines the type of the layer texture (default: 2)
|
|
29
|
+
*/
|
|
30
|
+
constructor(name, frameGraph, scene, layerTextureRatio = 1.0, layerTextureFixedSize, layerTextureType = 2) {
|
|
31
|
+
super(name, frameGraph, scene);
|
|
32
|
+
this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, layerTextureType];
|
|
33
|
+
this.registerInput("target", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);
|
|
34
|
+
this.registerInput("layer", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);
|
|
35
|
+
this.registerInput("objectRenderer", NodeRenderGraphBlockConnectionPointTypes.Object, false, new NodeRenderGraphConnectionPointCustomObject("objectRenderer", this, 0 /* NodeRenderGraphConnectionPointDirection.Input */, NodeRenderGraphBaseObjectRendererBlock, "NodeRenderGraphBaseObjectRendererBlock"));
|
|
36
|
+
this.registerInput("depth", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);
|
|
37
|
+
this.depth.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth | NodeRenderGraphBlockConnectionPointTypes.TextureNormalizedViewDepth);
|
|
38
|
+
this._addDependenciesInput();
|
|
39
|
+
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
40
|
+
this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);
|
|
41
|
+
this.layer.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
42
|
+
this.output._typeConnectionSource = this.target;
|
|
43
|
+
this._frameGraphTask = new FrameGraphSelectionOutlineLayerTask(this.name, this._frameGraph, this._scene, {
|
|
44
|
+
mainTextureRatio: layerTextureRatio,
|
|
45
|
+
mainTextureFixedSize: layerTextureFixedSize,
|
|
46
|
+
mainTextureType: layerTextureType,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
_createTask(layerTextureRatio, layerTextureFixedSize, layerTextureType) {
|
|
50
|
+
const outlineColor = this.outlineColor;
|
|
51
|
+
const outlineThickness = this.outlineThickness;
|
|
52
|
+
const occlusionStrength = this.occlusionStrength;
|
|
53
|
+
const occlusionThreshold = this.occlusionThreshold;
|
|
54
|
+
this._frameGraphTask?.dispose();
|
|
55
|
+
this._frameGraphTask = new FrameGraphSelectionOutlineLayerTask(this.name, this._frameGraph, this._scene, {
|
|
56
|
+
mainTextureRatio: layerTextureRatio,
|
|
57
|
+
mainTextureFixedSize: layerTextureFixedSize,
|
|
58
|
+
mainTextureType: layerTextureType,
|
|
59
|
+
});
|
|
60
|
+
this.outlineColor = outlineColor;
|
|
61
|
+
this.outlineThickness = outlineThickness;
|
|
62
|
+
this.occlusionStrength = occlusionStrength;
|
|
63
|
+
this.occlusionThreshold = occlusionThreshold;
|
|
64
|
+
this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, layerTextureType];
|
|
65
|
+
}
|
|
66
|
+
/** Multiplication factor applied to the main texture size to compute the size of the layer render target texture */
|
|
67
|
+
get layerTextureRatio() {
|
|
68
|
+
return this._frameGraphTask.layer._options.mainTextureRatio;
|
|
69
|
+
}
|
|
70
|
+
set layerTextureRatio(value) {
|
|
71
|
+
const options = this._frameGraphTask.layer._options;
|
|
72
|
+
this._createTask(value, options.mainTextureFixedSize, options.mainTextureType);
|
|
73
|
+
}
|
|
74
|
+
/** Defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided */
|
|
75
|
+
get layerTextureFixedSize() {
|
|
76
|
+
return this._frameGraphTask.layer._options.mainTextureFixedSize;
|
|
77
|
+
}
|
|
78
|
+
set layerTextureFixedSize(value) {
|
|
79
|
+
const options = this._frameGraphTask.layer._options;
|
|
80
|
+
this._createTask(options.mainTextureRatio, value, options.mainTextureType);
|
|
81
|
+
}
|
|
82
|
+
/** Defines the type of the layer texture */
|
|
83
|
+
get layerTextureType() {
|
|
84
|
+
return this._frameGraphTask.layer._options.mainTextureType;
|
|
85
|
+
}
|
|
86
|
+
set layerTextureType(value) {
|
|
87
|
+
const options = this._frameGraphTask.layer._options;
|
|
88
|
+
this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, value);
|
|
89
|
+
}
|
|
90
|
+
/** The outline color */
|
|
91
|
+
get outlineColor() {
|
|
92
|
+
return this._frameGraphTask.layer.outlineColor;
|
|
93
|
+
}
|
|
94
|
+
set outlineColor(value) {
|
|
95
|
+
this._frameGraphTask.layer.outlineColor = value;
|
|
96
|
+
}
|
|
97
|
+
/** The thickness of the edges */
|
|
98
|
+
get outlineThickness() {
|
|
99
|
+
return this._frameGraphTask.layer.outlineThickness;
|
|
100
|
+
}
|
|
101
|
+
set outlineThickness(value) {
|
|
102
|
+
this._frameGraphTask.layer.outlineThickness = value;
|
|
103
|
+
}
|
|
104
|
+
/** The strength of the occlusion effect */
|
|
105
|
+
get occlusionStrength() {
|
|
106
|
+
return this._frameGraphTask.layer.occlusionStrength;
|
|
107
|
+
}
|
|
108
|
+
set occlusionStrength(value) {
|
|
109
|
+
this._frameGraphTask.layer.occlusionStrength = value;
|
|
110
|
+
}
|
|
111
|
+
/** The occlusion threshold */
|
|
112
|
+
get occlusionThreshold() {
|
|
113
|
+
return this._frameGraphTask.layer.occlusionThreshold;
|
|
114
|
+
}
|
|
115
|
+
set occlusionThreshold(value) {
|
|
116
|
+
this._frameGraphTask.layer.occlusionThreshold = value;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Gets the current class name
|
|
120
|
+
* @returns the class name
|
|
121
|
+
*/
|
|
122
|
+
getClassName() {
|
|
123
|
+
return "NodeRenderGraphSelectionOutlineLayerBlock";
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Gets the target texture input component
|
|
127
|
+
*/
|
|
128
|
+
get target() {
|
|
129
|
+
return this._inputs[0];
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Gets the layer texture input component
|
|
133
|
+
*/
|
|
134
|
+
get layer() {
|
|
135
|
+
return this._inputs[1];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Gets the objectRenderer input component
|
|
139
|
+
*/
|
|
140
|
+
get objectRenderer() {
|
|
141
|
+
return this._inputs[2];
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Gets the depth input component
|
|
145
|
+
*/
|
|
146
|
+
get depth() {
|
|
147
|
+
return this._inputs[3];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Gets the output component
|
|
151
|
+
*/
|
|
152
|
+
get output() {
|
|
153
|
+
return this._outputs[0];
|
|
154
|
+
}
|
|
155
|
+
_buildBlock(state) {
|
|
156
|
+
super._buildBlock(state);
|
|
157
|
+
this.output.value = this._frameGraphTask.outputTexture;
|
|
158
|
+
this._frameGraphTask.targetTexture = this.target.connectedPoint?.value;
|
|
159
|
+
this._frameGraphTask.layerTexture = this.layer.connectedPoint?.value;
|
|
160
|
+
this._frameGraphTask.objectRendererTask = this.objectRenderer.connectedPoint?.value;
|
|
161
|
+
this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value;
|
|
162
|
+
}
|
|
163
|
+
_dumpPropertiesCode() {
|
|
164
|
+
const codes = [];
|
|
165
|
+
codes.push(`${this._codeVariableName}.outlineColor = new BABYLON.Color3(${this.outlineColor.r}, ${this.outlineColor.g}, ${this.outlineColor.b});`);
|
|
166
|
+
codes.push(`${this._codeVariableName}.outlineThickness = ${this.outlineThickness};`);
|
|
167
|
+
codes.push(`${this._codeVariableName}.occlusionStrength = ${this.occlusionStrength};`);
|
|
168
|
+
codes.push(`${this._codeVariableName}.occlusionThreshold = ${this.occlusionThreshold};`);
|
|
169
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
170
|
+
}
|
|
171
|
+
serialize() {
|
|
172
|
+
const serializationObject = super.serialize();
|
|
173
|
+
serializationObject.outlineColor = this.outlineColor.asArray();
|
|
174
|
+
serializationObject.outlineThickness = this.outlineThickness;
|
|
175
|
+
serializationObject.occlusionStrength = this.occlusionStrength;
|
|
176
|
+
serializationObject.occlusionThreshold = this.occlusionThreshold;
|
|
177
|
+
return serializationObject;
|
|
178
|
+
}
|
|
179
|
+
_deserialize(serializationObject) {
|
|
180
|
+
super._deserialize(serializationObject);
|
|
181
|
+
this.outlineColor = Color3.FromArray(serializationObject.outlineColor);
|
|
182
|
+
this.outlineThickness = serializationObject.outlineThickness;
|
|
183
|
+
this.occlusionStrength = serializationObject.occlusionStrength;
|
|
184
|
+
this.occlusionThreshold = serializationObject.occlusionThreshold;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
__decorate([
|
|
188
|
+
editableInPropertyPage("Layer texture ratio", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
|
|
189
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "layerTextureRatio", null);
|
|
190
|
+
__decorate([
|
|
191
|
+
editableInPropertyPage("Layer texture fixed size", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
|
|
192
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "layerTextureFixedSize", null);
|
|
193
|
+
__decorate([
|
|
194
|
+
editableInPropertyPage("Layer texture type", 10 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
|
|
195
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "layerTextureType", null);
|
|
196
|
+
__decorate([
|
|
197
|
+
editableInPropertyPage("Outline color", 6 /* PropertyTypeForEdition.Color3 */, "PROPERTIES")
|
|
198
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "outlineColor", null);
|
|
199
|
+
__decorate([
|
|
200
|
+
editableInPropertyPage("Outline thickness", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 30 })
|
|
201
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "outlineThickness", null);
|
|
202
|
+
__decorate([
|
|
203
|
+
editableInPropertyPage("Occlusion strength", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
204
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "occlusionStrength", null);
|
|
205
|
+
__decorate([
|
|
206
|
+
editableInPropertyPage("Occlusion threshold", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
207
|
+
], NodeRenderGraphSelectionOutlineLayerBlock.prototype, "occlusionThreshold", null);
|
|
208
|
+
RegisterClass("BABYLON.NodeRenderGraphSelectionOutlineLayerBlock", NodeRenderGraphSelectionOutlineLayerBlock);
|
|
209
|
+
//# sourceMappingURL=selectionOutlineLayerBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionOutlineLayerBlock.js","sourceRoot":"","sources":["../../../../../../../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AsC,YAAY,CAAC;iFAG9F;AAUD;IADC,sBAAsB,CAAC,eAAe,yCAAiC,YAAY,CAAC;6EAGpF;AAQD;IADC,sBAAsB,CAAC,mBAAmB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;iFAG5G;AAQD;IADC,sBAAsB,CAAC,oBAAoB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;kFAG5G;AAQD;IADC,sBAAsB,CAAC,qBAAqB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;mFAG7G;AAuFL,aAAa,CAAC,mDAAmD,EAAE,yCAAyC,CAAC,CAAC","sourcesContent":["import type { Scene, NodeRenderGraphBuildState, FrameGraph, FrameGraphTextureHandle, NodeRenderGraphConnectionPoint, FrameGraphObjectRendererTask } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointDirection } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphSelectionOutlineLayerTask } from \"core/FrameGraph/Tasks/Layers/selectionOutlineTask\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"../Rendering/baseObjectRendererBlock\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\n\r\n/**\r\n * Block that implements the selection outline layer\r\n */\r\nexport class NodeRenderGraphSelectionOutlineLayerBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphSelectionOutlineLayerTask;\r\n\r\n public override _additionalConstructionParameters: [number, number | undefined, number];\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 NodeRenderGraphSelectionOutlineLayerBlock\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 * @param layerTextureRatio multiplication factor applied to the main texture size to compute the size of the layer render target texture (default: 1.0)\r\n * @param layerTextureFixedSize defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided (default: undefined)\r\n * @param layerTextureType defines the type of the layer texture (default: Constants.TEXTURETYPE_HALF_FLOAT)\r\n */\r\n public constructor(\r\n name: string,\r\n frameGraph: FrameGraph,\r\n scene: Scene,\r\n layerTextureRatio = 1.0,\r\n layerTextureFixedSize?: number,\r\n layerTextureType = Constants.TEXTURETYPE_HALF_FLOAT\r\n ) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, layerTextureType];\r\n\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"layer\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n this.registerInput(\r\n \"objectRenderer\",\r\n NodeRenderGraphBlockConnectionPointTypes.Object,\r\n false,\r\n new NodeRenderGraphConnectionPointCustomObject(\r\n \"objectRenderer\",\r\n this,\r\n NodeRenderGraphConnectionPointDirection.Input,\r\n NodeRenderGraphBaseObjectRendererBlock,\r\n \"NodeRenderGraphBaseObjectRendererBlock\"\r\n )\r\n );\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n\r\n this.depth.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth | NodeRenderGraphBlockConnectionPointTypes.TextureNormalizedViewDepth\r\n );\r\n\r\n this._addDependenciesInput();\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.layer.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n\r\n this.output._typeConnectionSource = this.target;\r\n\r\n this._frameGraphTask = new FrameGraphSelectionOutlineLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n }\r\n\r\n private _createTask(layerTextureRatio: number, layerTextureFixedSize: number, layerTextureType: number) {\r\n const outlineColor = this.outlineColor;\r\n const outlineThickness = this.outlineThickness;\r\n const occlusionStrength = this.occlusionStrength;\r\n const occlusionThreshold = this.occlusionThreshold;\r\n\r\n this._frameGraphTask?.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphSelectionOutlineLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n\r\n this.outlineColor = outlineColor;\r\n this.outlineThickness = outlineThickness;\r\n this.occlusionStrength = occlusionStrength;\r\n this.occlusionThreshold = occlusionThreshold;\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, layerTextureType];\r\n }\r\n\r\n /** Multiplication factor applied to the main texture size to compute the size of the layer render target texture */\r\n @editableInPropertyPage(\"Layer texture ratio\", PropertyTypeForEdition.Float, \"PROPERTIES\")\r\n public get layerTextureRatio() {\r\n return this._frameGraphTask.layer._options.mainTextureRatio;\r\n }\r\n\r\n public set layerTextureRatio(value: number) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(value, options.mainTextureFixedSize, options.mainTextureType);\r\n }\r\n\r\n /** Defines the fixed size of the layer render target texture. Takes precedence over layerTextureRatio if provided */\r\n @editableInPropertyPage(\"Layer texture fixed size\", PropertyTypeForEdition.Float, \"PROPERTIES\")\r\n public get layerTextureFixedSize() {\r\n return this._frameGraphTask.layer._options.mainTextureFixedSize;\r\n }\r\n\r\n public set layerTextureFixedSize(value: number) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, value, options.mainTextureType);\r\n }\r\n\r\n /** Defines the type of the layer texture */\r\n @editableInPropertyPage(\"Layer texture type\", PropertyTypeForEdition.TextureType, \"PROPERTIES\")\r\n public get layerTextureType() {\r\n return this._frameGraphTask.layer._options.mainTextureType;\r\n }\r\n\r\n public set layerTextureType(value: number) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, value);\r\n }\r\n\r\n /** The outline color */\r\n @editableInPropertyPage(\"Outline color\", PropertyTypeForEdition.Color3, \"PROPERTIES\")\r\n public get outlineColor() {\r\n return this._frameGraphTask.layer.outlineColor;\r\n }\r\n\r\n public set outlineColor(value: Color3) {\r\n this._frameGraphTask.layer.outlineColor = value;\r\n }\r\n\r\n /** The thickness of the edges */\r\n @editableInPropertyPage(\"Outline thickness\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 30 })\r\n public get outlineThickness() {\r\n return this._frameGraphTask.layer.outlineThickness;\r\n }\r\n\r\n public set outlineThickness(value: number) {\r\n this._frameGraphTask.layer.outlineThickness = value;\r\n }\r\n\r\n /** The strength of the occlusion effect */\r\n @editableInPropertyPage(\"Occlusion strength\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get occlusionStrength() {\r\n return this._frameGraphTask.layer.occlusionStrength;\r\n }\r\n\r\n public set occlusionStrength(value: number) {\r\n this._frameGraphTask.layer.occlusionStrength = value;\r\n }\r\n\r\n /** The occlusion threshold */\r\n @editableInPropertyPage(\"Occlusion threshold\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get occlusionThreshold() {\r\n return this._frameGraphTask.layer.occlusionThreshold;\r\n }\r\n\r\n public set occlusionThreshold(value: number) {\r\n this._frameGraphTask.layer.occlusionThreshold = 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 \"NodeRenderGraphSelectionOutlineLayerBlock\";\r\n }\r\n\r\n /**\r\n * Gets the target texture input component\r\n */\r\n public get target(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the layer texture input component\r\n */\r\n public get layer(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the objectRenderer input component\r\n */\r\n public get objectRenderer(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the depth input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\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 protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture;\r\n\r\n this._frameGraphTask.targetTexture = this.target.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.layerTexture = this.layer.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.objectRendererTask = this.objectRenderer.connectedPoint?.value as FrameGraphObjectRendererTask;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.outlineColor = new BABYLON.Color3(${this.outlineColor.r}, ${this.outlineColor.g}, ${this.outlineColor.b});`);\r\n codes.push(`${this._codeVariableName}.outlineThickness = ${this.outlineThickness};`);\r\n codes.push(`${this._codeVariableName}.occlusionStrength = ${this.occlusionStrength};`);\r\n codes.push(`${this._codeVariableName}.occlusionThreshold = ${this.occlusionThreshold};`);\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.outlineColor = this.outlineColor.asArray();\r\n serializationObject.outlineThickness = this.outlineThickness;\r\n serializationObject.occlusionStrength = this.occlusionStrength;\r\n serializationObject.occlusionThreshold = this.occlusionThreshold;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.outlineColor = Color3.FromArray(serializationObject.outlineColor);\r\n this.outlineThickness = serializationObject.outlineThickness;\r\n this.occlusionStrength = serializationObject.occlusionStrength;\r\n this.occlusionThreshold = serializationObject.occlusionThreshold;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphSelectionOutlineLayerBlock\", NodeRenderGraphSelectionOutlineLayerBlock);\r\n"]}
|
|
@@ -2,6 +2,8 @@ import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState,
|
|
|
2
2
|
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
3
|
interface IPostProcessLike {
|
|
4
4
|
sourceSamplingMode: number;
|
|
5
|
+
get alphaMode(): number;
|
|
6
|
+
set alphaMode(mode: number);
|
|
5
7
|
sourceTexture?: FrameGraphTextureHandle;
|
|
6
8
|
targetTexture?: FrameGraphTextureHandle;
|
|
7
9
|
outputTexture: FrameGraphTextureHandle;
|
|
@@ -22,6 +24,9 @@ export declare class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraph
|
|
|
22
24
|
/** Sampling mode used to sample from the source texture */
|
|
23
25
|
get sourceSamplingMode(): number;
|
|
24
26
|
set sourceSamplingMode(value: number);
|
|
27
|
+
/** The alpha mode to use when applying the post process. */
|
|
28
|
+
get alphaMode(): number;
|
|
29
|
+
set alphaMode(value: number);
|
|
25
30
|
/**
|
|
26
31
|
* Gets the current class name
|
|
27
32
|
* @returns the class name
|
|
@@ -2,6 +2,7 @@ import { __decorate } from "../../../../tslib.es6.js";
|
|
|
2
2
|
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
3
|
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
4
4
|
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Base class for post process like blocks.
|
|
7
8
|
*/
|
|
@@ -33,6 +34,13 @@ export class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {
|
|
|
33
34
|
set sourceSamplingMode(value) {
|
|
34
35
|
this._frameGraphTask.sourceSamplingMode = value;
|
|
35
36
|
}
|
|
37
|
+
/** The alpha mode to use when applying the post process. */
|
|
38
|
+
get alphaMode() {
|
|
39
|
+
return this._frameGraphTask.alphaMode;
|
|
40
|
+
}
|
|
41
|
+
set alphaMode(value) {
|
|
42
|
+
this._frameGraphTask.alphaMode = value;
|
|
43
|
+
}
|
|
36
44
|
/**
|
|
37
45
|
* Gets the current class name
|
|
38
46
|
* @returns the class name
|
|
@@ -67,19 +75,45 @@ export class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {
|
|
|
67
75
|
_dumpPropertiesCode() {
|
|
68
76
|
const codes = [];
|
|
69
77
|
codes.push(`${this._codeVariableName}.sourceSamplingMode = ${this.sourceSamplingMode};`);
|
|
78
|
+
codes.push(`${this._codeVariableName}.alphaMode = ${this.alphaMode};`);
|
|
70
79
|
return super._dumpPropertiesCode() + codes.join("\n");
|
|
71
80
|
}
|
|
72
81
|
serialize() {
|
|
73
82
|
const serializationObject = super.serialize();
|
|
74
83
|
serializationObject.sourceSamplingMode = this.sourceSamplingMode;
|
|
84
|
+
serializationObject.alphaMode = this.alphaMode;
|
|
75
85
|
return serializationObject;
|
|
76
86
|
}
|
|
77
87
|
_deserialize(serializationObject) {
|
|
78
88
|
super._deserialize(serializationObject);
|
|
79
89
|
this.sourceSamplingMode = serializationObject.sourceSamplingMode;
|
|
90
|
+
this.alphaMode = serializationObject.alphaMode ?? 0;
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
__decorate([
|
|
83
94
|
editableInPropertyPage("Source sampling mode", 8 /* PropertyTypeForEdition.SamplingMode */, "BASE PROPERTIES")
|
|
84
95
|
], NodeRenderGraphBasePostProcessBlock.prototype, "sourceSamplingMode", null);
|
|
96
|
+
__decorate([
|
|
97
|
+
editableInPropertyPage("Alpha Mode", 5 /* PropertyTypeForEdition.List */, "BASE PROPERTIES", {
|
|
98
|
+
options: [
|
|
99
|
+
{ label: "Disabled", value: 0 },
|
|
100
|
+
{ label: "Combine", value: 2 },
|
|
101
|
+
{ label: "One One", value: 6 },
|
|
102
|
+
{ label: "Add", value: 1 },
|
|
103
|
+
{ label: "Subtract", value: 3 },
|
|
104
|
+
{ label: "Multiply", value: 4 },
|
|
105
|
+
{ label: "Maximized", value: 5 },
|
|
106
|
+
{ label: "Pre-multiplied", value: 7 },
|
|
107
|
+
{ label: "Pre-multiplied Porter Duff", value: 8 },
|
|
108
|
+
{ label: "Screen Mode", value: 10 },
|
|
109
|
+
{ label: "OneOne OneOne", value: 11 },
|
|
110
|
+
{ label: "Alpha to Color", value: 12 },
|
|
111
|
+
{ label: "Reverse One Minus", value: 13 },
|
|
112
|
+
{ label: "Source+Dest * (1 - SourceAlpha)", value: 14 },
|
|
113
|
+
{ label: "OneOne OneZero", value: 15 },
|
|
114
|
+
{ label: "Exclusion", value: 16 },
|
|
115
|
+
{ label: "Layer Accumulate", value: 17 },
|
|
116
|
+
],
|
|
117
|
+
})
|
|
118
|
+
], NodeRenderGraphBasePostProcessBlock.prototype, "alphaMode", null);
|
|
85
119
|
//# sourceMappingURL=basePostProcessBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basePostProcessBlock.js","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AAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;IACrE,CAAC;CACJ;AA9DG;IADC,sBAAsB,CAAC,sBAAsB,+CAAuC,iBAAiB,CAAC;6EAGtG","sourcesContent":["import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraphTextureHandle, FrameGraph, FrameGraphTask } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\n\r\ninterface IPostProcessLike {\r\n sourceSamplingMode: number;\r\n sourceTexture?: FrameGraphTextureHandle;\r\n targetTexture?: FrameGraphTextureHandle;\r\n outputTexture: FrameGraphTextureHandle;\r\n}\r\n\r\n/**\r\n * Base class for post process like blocks.\r\n */\r\nexport class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: IPostProcessLike & FrameGraphTask;\r\n\r\n /**\r\n * Create a new NodeRenderGraphBasePostProcessBlock\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(\"source\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n\r\n this.source.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\r\n }\r\n\r\n protected _finalizeInputOutputRegistering() {\r\n this._addDependenciesInput();\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.output._typeConnectionSource = () => {\r\n return this.target.isConnected ? this.target : this.source;\r\n };\r\n }\r\n\r\n /** Sampling mode used to sample from the source texture */\r\n @editableInPropertyPage(\"Source sampling mode\", PropertyTypeForEdition.SamplingMode, \"BASE PROPERTIES\")\r\n public get sourceSamplingMode() {\r\n return this._frameGraphTask.sourceSamplingMode;\r\n }\r\n\r\n public set sourceSamplingMode(value: number) {\r\n this._frameGraphTask.sourceSamplingMode = 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 \"NodeRenderGraphBasePostProcessBlock\";\r\n }\r\n\r\n /**\r\n * Gets the source input component\r\n */\r\n public get source(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the target input component\r\n */\r\n public get target(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\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 protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture;\r\n\r\n this._frameGraphTask.sourceTexture = this.source.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.targetTexture = this.target.connectedPoint?.value as FrameGraphTextureHandle;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.sourceSamplingMode = ${this.sourceSamplingMode};`);\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.sourceSamplingMode = this.sourceSamplingMode;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.sourceSamplingMode = serializationObject.sourceSamplingMode;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"basePostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,yCAA+B;AAWnD;;GAEG;AACH,MAAM,OAAO,mCAAoC,SAAQ,oBAAoB;IAGzE;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,UAAU,CAAC,CAAC;QAClF,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAExF,IAAI,CAAC,MAAM,CAAC,0CAA0C,CAAC,wCAAwC,CAAC,uBAAuB,CAAC,CAAC;QACzH,IAAI,CAAC,MAAM,CAAC,0CAA0C,CAAC,wCAAwC,CAAC,UAAU,CAAC,CAAC;IAChH,CAAC;IAES,+BAA+B;QACrC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,wCAAwC,CAAC,YAAY,CAAC,CAAC;QAErF,IAAI,CAAC,MAAM,CAAC,qBAAqB,GAAG,GAAG,EAAE;YACrC,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QAC/D,CAAC,CAAC;IACN,CAAC;IAED,2DAA2D;IAE3D,IAAW,kBAAkB;QAC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AAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE;YACxD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,mBAAmB,EAAE;YACjE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,SAAS,CAAC,8BAA8B,EAAE;YACxF,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,gBAAgB,EAAE;YAC3D,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,CAAC,mBAAmB,EAAE;YAChE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,kBAAkB,EAAE;YAChE,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,CAAC,qBAAqB,EAAE;YACtE,EAAE,KAAK,EAAE,iCAAiC,EAAE,KAAK,EAAE,SAAS,CAAC,6BAA6B,EAAE;YAC5F,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,oBAAoB,EAAE;YAClE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE;YACxD,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,sBAAsB,EAAE;SACzE;KACJ,CAAC;oEAGD","sourcesContent":["import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraphTextureHandle, FrameGraph, FrameGraphTask } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { Constants } from \"core/Engines/constants\";\r\n\r\ninterface IPostProcessLike {\r\n sourceSamplingMode: number;\r\n get alphaMode(): number;\r\n set alphaMode(mode: number);\r\n sourceTexture?: FrameGraphTextureHandle;\r\n targetTexture?: FrameGraphTextureHandle;\r\n outputTexture: FrameGraphTextureHandle;\r\n}\r\n\r\n/**\r\n * Base class for post process like blocks.\r\n */\r\nexport class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: IPostProcessLike & FrameGraphTask;\r\n\r\n /**\r\n * Create a new NodeRenderGraphBasePostProcessBlock\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(\"source\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n\r\n this.source.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\r\n }\r\n\r\n protected _finalizeInputOutputRegistering() {\r\n this._addDependenciesInput();\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.output._typeConnectionSource = () => {\r\n return this.target.isConnected ? this.target : this.source;\r\n };\r\n }\r\n\r\n /** Sampling mode used to sample from the source texture */\r\n @editableInPropertyPage(\"Source sampling mode\", PropertyTypeForEdition.SamplingMode, \"BASE PROPERTIES\")\r\n public get sourceSamplingMode() {\r\n return this._frameGraphTask.sourceSamplingMode;\r\n }\r\n\r\n public set sourceSamplingMode(value: number) {\r\n this._frameGraphTask.sourceSamplingMode = value;\r\n }\r\n\r\n /** The alpha mode to use when applying the post process. */\r\n @editableInPropertyPage(\"Alpha Mode\", PropertyTypeForEdition.List, \"BASE PROPERTIES\", {\r\n options: [\r\n { label: \"Disabled\", value: Constants.ALPHA_DISABLE },\r\n { label: \"Combine\", value: Constants.ALPHA_COMBINE },\r\n { label: \"One One\", value: Constants.ALPHA_ONEONE },\r\n { label: \"Add\", value: Constants.ALPHA_ADD },\r\n { label: \"Subtract\", value: Constants.ALPHA_SUBTRACT },\r\n { label: \"Multiply\", value: Constants.ALPHA_MULTIPLY },\r\n { label: \"Maximized\", value: Constants.ALPHA_MAXIMIZED },\r\n { label: \"Pre-multiplied\", value: Constants.ALPHA_PREMULTIPLIED },\r\n { label: \"Pre-multiplied Porter Duff\", value: Constants.ALPHA_PREMULTIPLIED_PORTERDUFF },\r\n { label: \"Screen Mode\", value: Constants.ALPHA_SCREENMODE },\r\n { label: \"OneOne OneOne\", value: Constants.ALPHA_ONEONE_ONEONE },\r\n { label: \"Alpha to Color\", value: Constants.ALPHA_ALPHATOCOLOR },\r\n { label: \"Reverse One Minus\", value: Constants.ALPHA_REVERSEONEMINUS },\r\n { label: \"Source+Dest * (1 - SourceAlpha)\", value: Constants.ALPHA_SRC_DSTONEMINUSSRCALPHA },\r\n { label: \"OneOne OneZero\", value: Constants.ALPHA_ONEONE_ONEZERO },\r\n { label: \"Exclusion\", value: Constants.ALPHA_EXCLUSION },\r\n { label: \"Layer Accumulate\", value: Constants.ALPHA_LAYER_ACCUMULATE },\r\n ],\r\n })\r\n public get alphaMode(): number {\r\n return this._frameGraphTask.alphaMode;\r\n }\r\n\r\n public set alphaMode(value: number) {\r\n this._frameGraphTask.alphaMode = 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 \"NodeRenderGraphBasePostProcessBlock\";\r\n }\r\n\r\n /**\r\n * Gets the source input component\r\n */\r\n public get source(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the target input component\r\n */\r\n public get target(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\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 protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture;\r\n\r\n this._frameGraphTask.sourceTexture = this.source.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.targetTexture = this.target.connectedPoint?.value as FrameGraphTextureHandle;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.sourceSamplingMode = ${this.sourceSamplingMode};`);\r\n codes.push(`${this._codeVariableName}.alphaMode = ${this.alphaMode};`);\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.sourceSamplingMode = this.sourceSamplingMode;\r\n serializationObject.alphaMode = this.alphaMode;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.sourceSamplingMode = serializationObject.sourceSamplingMode;\r\n this.alphaMode = serializationObject.alphaMode ?? Constants.ALPHA_DISABLE;\r\n }\r\n}\r\n"]}
|
|
@@ -110,7 +110,7 @@ __decorate([
|
|
|
110
110
|
editableInPropertyPage("Threshold", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
111
111
|
], NodeRenderGraphBloomPostProcessBlock.prototype, "threshold", null);
|
|
112
112
|
__decorate([
|
|
113
|
-
editableInPropertyPage("Weight", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max:
|
|
113
|
+
editableInPropertyPage("Weight", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 10 })
|
|
114
114
|
], NodeRenderGraphBloomPostProcessBlock.prototype, "weight", null);
|
|
115
115
|
__decorate([
|
|
116
116
|
editableInPropertyPage("Kernel", 2 /* PropertyTypeForEdition.Int */, "PROPERTIES", { min: 1, max: 128 })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bloomPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,oCAAqC,SAAQ,mCAAmC;IAKzF;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY,EAAE,GAAG,GAAG,KAAK,EAAE,UAAU,GAAG,GAAG;QAChG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,iCAAiC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAE3D,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC1G,CAAC;IAEO,WAAW,CAAC,UAAkB,EAAE,GAAY;QAChD,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC;QACnE,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC;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AM,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC7C,CAAC;CACJ;AA9EG;IADC,sBAAsB,CAAC,aAAa,wCAAgC,YAAY,CAAC;sEAGjF;AAQD;IADC,sBAAsB,CAAC,KAAK,0CAAkC,YAAY,CAAC;+DAG3E;AAQD;IADC,sBAAsB,CAAC,WAAW,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;qEAGnG;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"bloomPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,oCAAqC,SAAQ,mCAAmC;IAKzF;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY,EAAE,GAAG,GAAG,KAAK,EAAE,UAAU,GAAG,GAAG;QAChG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,iCAAiC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAE3D,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,UAA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AAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzC,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzC,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,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC7C,CAAC;CACJ;AA9EG;IADC,sBAAsB,CAAC,aAAa,wCAAgC,YAAY,CAAC;sEAGjF;AAQD;IADC,sBAAsB,CAAC,KAAK,0CAAkC,YAAY,CAAC;+DAG3E;AAQD;IADC,sBAAsB,CAAC,WAAW,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;qEAGnG;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;kEAGjG;AAQD;IADC,sBAAsB,CAAC,QAAQ,sCAA8B,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;kEAGhG;AAsCL,aAAa,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAC","sourcesContent":["import type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphBloomTask } from \"../../../Tasks/PostProcesses/bloomTask\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the bloom post process\r\n */\r\nexport class NodeRenderGraphBloomPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphBloomTask;\r\n\r\n public override _additionalConstructionParameters: [boolean, number];\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 NodeRenderGraphBloomPostProcessBlock\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 * @param hdr If high dynamic range textures should be used (default: false)\r\n * @param bloomScale The scale of the bloom effect (default: 0.5)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, hdr = false, bloomScale = 0.5) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [hdr, bloomScale];\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphBloomTask(this.name, frameGraph, 0.75, 64, 0.2, hdr, bloomScale);\r\n }\r\n\r\n private _createTask(bloomScale: number, hdr: boolean) {\r\n const sourceSamplingMode = this._frameGraphTask.sourceSamplingMode;\r\n const threshold = this._frameGraphTask.bloom.threshold;\r\n const weight = this._frameGraphTask.bloom.weight;\r\n const kernel = this._frameGraphTask.bloom.kernel;\r\n\r\n this._frameGraphTask.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphBloomTask(this.name, this._frameGraph, weight, kernel, threshold, hdr, bloomScale);\r\n this._frameGraphTask.sourceSamplingMode = sourceSamplingMode;\r\n\r\n this._additionalConstructionParameters = [hdr, bloomScale];\r\n }\r\n\r\n /** The quality of the blur effect */\r\n @editableInPropertyPage(\"Bloom scale\", PropertyTypeForEdition.Float, \"PROPERTIES\")\r\n public get bloomScale() {\r\n return this._frameGraphTask.bloom.scale;\r\n }\r\n\r\n public set bloomScale(value: number) {\r\n this._createTask(value, this._frameGraphTask.hdr);\r\n }\r\n\r\n /** If high dynamic range textures should be used */\r\n @editableInPropertyPage(\"HDR\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get hdr(): boolean {\r\n return this._frameGraphTask.hdr;\r\n }\r\n\r\n public set hdr(value: boolean) {\r\n this._createTask(this._frameGraphTask.bloom.scale, value);\r\n }\r\n\r\n /** The luminance threshold to find bright areas of the image to bloom. */\r\n @editableInPropertyPage(\"Threshold\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get threshold(): number {\r\n return this._frameGraphTask.bloom.threshold;\r\n }\r\n\r\n public set threshold(value: number) {\r\n this._frameGraphTask.bloom.threshold = value;\r\n }\r\n\r\n /** The strength of the bloom. */\r\n @editableInPropertyPage(\"Weight\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 10 })\r\n public get weight(): number {\r\n return this._frameGraphTask.bloom.weight;\r\n }\r\n\r\n public set weight(value: number) {\r\n this._frameGraphTask.bloom.weight = value;\r\n }\r\n\r\n /** Specifies the size of the bloom blur kernel, relative to the final output size */\r\n @editableInPropertyPage(\"Kernel\", PropertyTypeForEdition.Int, \"PROPERTIES\", { min: 1, max: 128 })\r\n public get kernel(): number {\r\n return this._frameGraphTask.bloom.kernel;\r\n }\r\n\r\n public set kernel(value: number) {\r\n this._frameGraphTask.bloom.kernel = 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 \"NodeRenderGraphBloomPostProcessBlock\";\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.threshold = ${this.threshold};`);\r\n codes.push(`${this._codeVariableName}.weight = ${this.weight};`);\r\n codes.push(`${this._codeVariableName}.kernel = ${this.kernel};`);\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.threshold = this.threshold;\r\n serializationObject.weight = this.weight;\r\n serializationObject.kernel = this.kernel;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.threshold = serializationObject.threshold;\r\n this.weight = serializationObject.weight;\r\n this.kernel = serializationObject.kernel;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphBloomPostProcessBlock\", NodeRenderGraphBloomPostProcessBlock);\r\n"]}
|
|
@@ -8,6 +8,7 @@ export * from "./outputBlock.js";
|
|
|
8
8
|
export * from "./resourceContainerBlock.js";
|
|
9
9
|
export * from "./Layers/glowLayerBlock.js";
|
|
10
10
|
export * from "./Layers/highlightLayerBlock.js";
|
|
11
|
+
export * from "./Layers/selectionOutlineLayerBlock.js";
|
|
11
12
|
export * from "./PostProcesses/anaglyphPostProcessBlock.js";
|
|
12
13
|
export * from "./PostProcesses/basePostProcessBlock.js";
|
|
13
14
|
export * from "./PostProcesses/baseWithPropertiesPostProcessBlock.js";
|
|
@@ -8,6 +8,7 @@ export * from "./outputBlock.js";
|
|
|
8
8
|
export * from "./resourceContainerBlock.js";
|
|
9
9
|
export * from "./Layers/glowLayerBlock.js";
|
|
10
10
|
export * from "./Layers/highlightLayerBlock.js";
|
|
11
|
+
export * from "./Layers/selectionOutlineLayerBlock.js";
|
|
11
12
|
export * from "./PostProcesses/anaglyphPostProcessBlock.js";
|
|
12
13
|
export * from "./PostProcesses/basePostProcessBlock.js";
|
|
13
14
|
export * from "./PostProcesses/baseWithPropertiesPostProcessBlock.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AAEpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAExD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./computeShaderBlock\";\r\nexport * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./lightingVolumeBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\nexport * from \"./Layers/selectionOutlineLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/baseWithPropertiesPostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/colorCorrectionPostProcessBlock\";\r\nexport * from \"./PostProcesses/convolutionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/filterPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/sharpenPostProcessBlock\";\r\nexport * from \"./PostProcesses/screenSpaceCurvaturePostProcessBlock\";\r\nexport * from \"./PostProcesses/ssao2PostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\nexport * from \"./PostProcesses/taaPostProcessBlock\";\r\nexport * from \"./PostProcesses/tonemapPostProcessBlock\";\r\nexport * from \"./PostProcesses/volumetricLightingBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type { FrameGraph, FrameGraphTextureHandle, Scene, AbstractEngine, ThinEffectLayer, FrameGraphRenderPass, FrameGraphRenderContext } from "../../../index.js";
|
|
1
|
+
import type { FrameGraph, FrameGraphTextureHandle, Scene, Effect, AbstractEngine, ThinEffectLayer, FrameGraphRenderPass, FrameGraphRenderContext } from "../../../index.js";
|
|
2
2
|
import { FrameGraphTask } from "../../frameGraphTask.js";
|
|
3
3
|
import { FrameGraphObjectRendererTask } from "../Rendering/objectRendererTask.js";
|
|
4
4
|
import { FrameGraphClearTextureTask } from "../Texture/clearTextureTask.js";
|
|
5
5
|
import { FrameGraphBlurTask } from "../PostProcesses/blurTask.js";
|
|
6
6
|
import { FrameGraphPostProcessTask } from "../PostProcesses/postProcessTask.js";
|
|
7
7
|
import { ThinGlowBlurPostProcess } from "../../../Layers/thinEffectLayer.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare enum FrameGraphBaseLayerBlurType {
|
|
10
|
+
None = "none",
|
|
11
|
+
Standard = "standard",
|
|
12
|
+
Glow = "glow"
|
|
13
|
+
}
|
|
8
14
|
declare class FrameGraphGlowBlurTask extends FrameGraphPostProcessTask {
|
|
9
15
|
readonly postProcess: ThinGlowBlurPostProcess;
|
|
10
16
|
/**
|
|
@@ -21,8 +27,10 @@ declare class FrameGraphGlowBlurTask extends FrameGraphPostProcessTask {
|
|
|
21
27
|
* @internal
|
|
22
28
|
*/
|
|
23
29
|
export declare class FrameGraphBaseLayerTask extends FrameGraphTask {
|
|
30
|
+
private _blurType;
|
|
24
31
|
private _setRenderTargetDepth;
|
|
25
32
|
private _notifyBlurObservable;
|
|
33
|
+
private _setObjectList;
|
|
26
34
|
/**
|
|
27
35
|
* The target texture to apply the effect layer to.
|
|
28
36
|
* The effect will be blended with the contents of this texture.
|
|
@@ -57,13 +65,18 @@ export declare class FrameGraphBaseLayerTask extends FrameGraphTask {
|
|
|
57
65
|
get objectRendererForLayer(): FrameGraphObjectRendererTask;
|
|
58
66
|
protected readonly _scene: Scene;
|
|
59
67
|
protected readonly _engine: AbstractEngine;
|
|
60
|
-
protected readonly
|
|
61
|
-
protected readonly
|
|
68
|
+
protected readonly _clearLayerTextureTask: FrameGraphClearTextureTask;
|
|
69
|
+
protected readonly _objectRendererForLayerTask: FrameGraphObjectRendererTask;
|
|
62
70
|
protected readonly _blurX: Array<FrameGraphBlurTask | FrameGraphGlowBlurTask>;
|
|
63
71
|
protected readonly _blurY: Array<FrameGraphBlurTask | FrameGraphGlowBlurTask>;
|
|
72
|
+
protected _layerTextureDimensions: {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
64
76
|
private readonly _onBeforeBlurTask;
|
|
65
77
|
private readonly _onAfterBlurTask;
|
|
66
78
|
private _onBeforeObservableObserver;
|
|
79
|
+
private _onBeforeObservableObserver2;
|
|
67
80
|
private _onAfterObservableObserver;
|
|
68
81
|
private _onAfterRenderingGroupObserver;
|
|
69
82
|
/**
|
|
@@ -73,14 +86,15 @@ export declare class FrameGraphBaseLayerTask extends FrameGraphTask {
|
|
|
73
86
|
* @param scene The scene to render the layer in.
|
|
74
87
|
* @param layer The layer.
|
|
75
88
|
* @param numBlurPasses The number of blur passes applied by the layer.
|
|
76
|
-
* @param
|
|
89
|
+
* @param _blurType The type of blur to use for the layer.
|
|
77
90
|
* @param _setRenderTargetDepth If true, the task will set the render target depth.
|
|
78
91
|
* @param _notifyBlurObservable If true, the task will notify before and after blurring occurs.
|
|
92
|
+
* @param _setObjectList If true, the object list of the object renderer for the layer will be set to the object list of the object renderer task.
|
|
79
93
|
*/
|
|
80
|
-
constructor(name: string, frameGraph: FrameGraph, scene: Scene, layer: ThinEffectLayer, numBlurPasses: number,
|
|
94
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene, layer: ThinEffectLayer, numBlurPasses: number, _blurType?: FrameGraphBaseLayerBlurType, _setRenderTargetDepth?: boolean, _notifyBlurObservable?: boolean, _setObjectList?: boolean);
|
|
81
95
|
isReady(): boolean;
|
|
82
96
|
getClassName(): string;
|
|
83
|
-
record(): void;
|
|
97
|
+
record(_skipCreationOfDisabledPasses?: boolean, additionalComposeBindings?: (context: FrameGraphRenderContext, effect: Effect) => void): void;
|
|
84
98
|
private _clearAfterRenderingGroupObserver;
|
|
85
99
|
dispose(): void;
|
|
86
100
|
}
|