@onerjs/core 8.30.8 → 8.30.9

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.
Files changed (98) hide show
  1. package/Cameras/camera.js +1 -0
  2. package/Cameras/camera.js.map +1 -1
  3. package/Cameras/targetCamera.js +0 -4
  4. package/Cameras/targetCamera.js.map +1 -1
  5. package/Culling/ray.core.js +1 -1
  6. package/Culling/ray.core.js.map +1 -1
  7. package/Decorators/nodeDecorator.d.ts +9 -7
  8. package/Decorators/nodeDecorator.js +9 -7
  9. package/Decorators/nodeDecorator.js.map +1 -1
  10. package/Engines/WebGPU/webgpuTextureManager.js +2 -2
  11. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  12. package/Engines/abstractEngine.js +2 -2
  13. package/Engines/abstractEngine.js.map +1 -1
  14. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +1 -1
  15. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js.map +1 -1
  16. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +1 -1
  17. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js.map +1 -1
  18. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +1 -1
  19. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +1 -1
  20. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +1 -1
  21. package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.js +1 -1
  22. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +1 -1
  23. package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.js +1 -1
  24. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.js +1 -1
  25. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.js +1 -1
  26. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.js.map +1 -1
  27. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js +1 -1
  28. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js.map +1 -1
  29. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +6 -0
  30. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +26 -0
  31. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  32. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +6 -0
  33. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +48 -22
  34. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  35. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +3 -3
  36. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
  37. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +1 -1
  38. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +1 -1
  39. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -1
  40. package/FrameGraph/Node/nodeRenderGraph.js +2 -1
  41. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  42. package/FrameGraph/Passes/{cullPass.d.ts → objectListPass.d.ts} +8 -8
  43. package/FrameGraph/Passes/{cullPass.js → objectListPass.js} +9 -9
  44. package/FrameGraph/Passes/objectListPass.js.map +1 -0
  45. package/FrameGraph/Passes/renderPass.d.ts +6 -2
  46. package/FrameGraph/Passes/renderPass.js +14 -2
  47. package/FrameGraph/Passes/renderPass.js.map +1 -1
  48. package/FrameGraph/Tasks/Misc/cullObjectsTask.js +2 -2
  49. package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
  50. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +8 -0
  51. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +10 -0
  52. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  53. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +8 -0
  54. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +13 -0
  55. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  56. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +1 -1
  57. package/FrameGraph/Tasks/Texture/clearTextureTask.js +7 -5
  58. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  59. package/FrameGraph/frameGraph.d.ts +10 -4
  60. package/FrameGraph/frameGraph.js +22 -9
  61. package/FrameGraph/frameGraph.js.map +1 -1
  62. package/FrameGraph/frameGraphTask.js +3 -3
  63. package/FrameGraph/frameGraphTask.js.map +1 -1
  64. package/FrameGraph/index.d.ts +1 -1
  65. package/FrameGraph/index.js +1 -1
  66. package/FrameGraph/index.js.map +1 -1
  67. package/Materials/floatingOriginMatrixOverrides.js +19 -0
  68. package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
  69. package/Materials/shaderMaterial.d.ts +9 -0
  70. package/Materials/shaderMaterial.js +35 -0
  71. package/Materials/shaderMaterial.js.map +1 -1
  72. package/Particles/EmitterTypes/coneParticleEmitter.d.ts +6 -4
  73. package/Particles/EmitterTypes/coneParticleEmitter.js +18 -12
  74. package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
  75. package/Particles/EmitterTypes/customParticleEmitter.d.ts +5 -3
  76. package/Particles/EmitterTypes/customParticleEmitter.js +8 -6
  77. package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
  78. package/Particles/Node/Blocks/Emitters/coneShapeBlock.d.ts +15 -4
  79. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js +66 -36
  80. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js.map +1 -1
  81. package/Particles/Node/Blocks/Emitters/customShapeBlock.d.ts +13 -9
  82. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +36 -23
  83. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
  84. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.d.ts +6 -0
  85. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +22 -1
  86. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
  87. package/Particles/Node/Blocks/systemBlock.d.ts +4 -4
  88. package/Particles/Node/Blocks/systemBlock.js +8 -12
  89. package/Particles/Node/Blocks/systemBlock.js.map +1 -1
  90. package/Particles/Node/nodeParticleSystemSet.helper.js +153 -19
  91. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  92. package/Particles/thinParticleSystem.js +1 -1
  93. package/Particles/thinParticleSystem.js.map +1 -1
  94. package/package.json +1 -1
  95. package/scene.d.ts +1 -3
  96. package/scene.js +8 -7
  97. package/scene.js.map +1 -1
  98. package/FrameGraph/Passes/cullPass.js.map +0 -1
@@ -171,7 +171,7 @@ __decorate([
171
171
  editableInPropertyPage("Layer texture fixed size", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
172
172
  ], NodeRenderGraphGlowLayerBlock.prototype, "layerTextureFixedSize", null);
173
173
  __decorate([
174
- editableInPropertyPage("Layer texture type", 9 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
174
+ editableInPropertyPage("Layer texture type", 10 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
175
175
  ], NodeRenderGraphGlowLayerBlock.prototype, "layerTextureType", null);
176
176
  __decorate([
177
177
  editableInPropertyPage("Blur kernel size", 2 /* PropertyTypeForEdition.Int */, "PROPERTIES", { min: 1, max: 256 })
@@ -1 +1 @@
1
- {"version":3,"file":"glowLayerBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Layers/glowLayerBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAA2C,MAAM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E,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;mEAG1G;AAQD;IADC,sBAAsB,CAAC,WAAW,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;8DAGnG;AAyEL,aAAa,CAAC,uCAAuC,EAAE,6BAA6B,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 { FrameGraphGlowLayerTask } from \"core/FrameGraph/Tasks/Layers/glowLayerTask\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"../Rendering/baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that implements the glow layer\r\n */\r\nexport class NodeRenderGraphGlowLayerBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphGlowLayerTask;\r\n\r\n public override _additionalConstructionParameters: [boolean, 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 NodeRenderGraphGlowLayerBlock\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 ldrMerge Forces the merge step to be done in ldr (clamp values > 1). Default: false\r\n * @param layerTextureRatio multiplication factor applied to the main texture size to compute the size of the layer render target texture (default: 0.5)\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_UNSIGNED_BYTE)\r\n */\r\n public constructor(\r\n name: string,\r\n frameGraph: FrameGraph,\r\n scene: Scene,\r\n ldrMerge = false,\r\n layerTextureRatio = 0.5,\r\n layerTextureFixedSize?: number,\r\n layerTextureType = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n ) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [ldrMerge, 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._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 FrameGraphGlowLayerTask(this.name, this._frameGraph, this._scene, {\r\n ldrMerge,\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n }\r\n\r\n private _createTask(ldrMerge: boolean, layerTextureRatio: number, layerTextureFixedSize: number, layerTextureType: number) {\r\n const blurKernelSize = this.blurKernelSize;\r\n const intensity = this.intensity;\r\n\r\n this._frameGraphTask?.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphGlowLayerTask(this.name, this._frameGraph, this._scene, {\r\n ldrMerge,\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n\r\n this.blurKernelSize = blurKernelSize;\r\n this.intensity = intensity;\r\n\r\n this._additionalConstructionParameters = [ldrMerge, layerTextureRatio, layerTextureFixedSize, layerTextureType];\r\n }\r\n\r\n /** Forces the merge step to be done in ldr (clamp values > 1). Default: false */\r\n @editableInPropertyPage(\"LDR merge\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get ldrMerge() {\r\n return this._frameGraphTask.layer.ldrMerge;\r\n }\r\n\r\n public set ldrMerge(value: boolean) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(value, options.mainTextureRatio, options.mainTextureFixedSize, options.mainTextureType);\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(options.ldrMerge, 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.ldrMerge, 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.ldrMerge, options.mainTextureRatio, options.mainTextureFixedSize, value);\r\n }\r\n\r\n /** How big is the kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur kernel size\", PropertyTypeForEdition.Int, \"PROPERTIES\", { min: 1, max: 256 })\r\n public get blurKernelSize() {\r\n return this._frameGraphTask.layer.blurKernelSize;\r\n }\r\n\r\n public set blurKernelSize(value: number) {\r\n this._frameGraphTask.layer.blurKernelSize = value;\r\n }\r\n\r\n /** The intensity of the glow */\r\n @editableInPropertyPage(\"Intensity\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 5 })\r\n public get intensity() {\r\n return this._frameGraphTask.layer.intensity;\r\n }\r\n\r\n public set intensity(value: number) {\r\n this._frameGraphTask.layer.intensity = 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 \"NodeRenderGraphGlowLayerBlock\";\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 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 }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.blurKernelSize = ${this.blurKernelSize};`);\r\n codes.push(`${this._codeVariableName}.intensity = ${this.intensity};`);\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.blurKernelSize = this.blurKernelSize;\r\n serializationObject.intensity = this.intensity;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.blurKernelSize = serializationObject.blurKernelSize;\r\n this.intensity = serializationObject.intensity;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphGlowLayerBlock\", NodeRenderGraphGlowLayerBlock);\r\n"]}
1
+ {"version":3,"file":"glowLayerBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Layers/glowLayerBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,+CAAmD;AACrF,OAAO,EAAE,SAAS,EAAE,yCAA+B;AACnD,OAAO,EAAE,0CAA0C,EAAE,MAAM,kDAAkD,CAAC;AAC9G,OAAO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AuC,EAAE,6BAA6B,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 { FrameGraphGlowLayerTask } from \"core/FrameGraph/Tasks/Layers/glowLayerTask\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"../Rendering/baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that implements the glow layer\r\n */\r\nexport class NodeRenderGraphGlowLayerBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphGlowLayerTask;\r\n\r\n public override _additionalConstructionParameters: [boolean, 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 NodeRenderGraphGlowLayerBlock\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 ldrMerge Forces the merge step to be done in ldr (clamp values > 1). Default: false\r\n * @param layerTextureRatio multiplication factor applied to the main texture size to compute the size of the layer render target texture (default: 0.5)\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_UNSIGNED_BYTE)\r\n */\r\n public constructor(\r\n name: string,\r\n frameGraph: FrameGraph,\r\n scene: Scene,\r\n ldrMerge = false,\r\n layerTextureRatio = 0.5,\r\n layerTextureFixedSize?: number,\r\n layerTextureType = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n ) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [ldrMerge, 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._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 FrameGraphGlowLayerTask(this.name, this._frameGraph, this._scene, {\r\n ldrMerge,\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n }\r\n\r\n private _createTask(ldrMerge: boolean, layerTextureRatio: number, layerTextureFixedSize: number, layerTextureType: number) {\r\n const blurKernelSize = this.blurKernelSize;\r\n const intensity = this.intensity;\r\n\r\n this._frameGraphTask?.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphGlowLayerTask(this.name, this._frameGraph, this._scene, {\r\n ldrMerge,\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n mainTextureType: layerTextureType,\r\n });\r\n\r\n this.blurKernelSize = blurKernelSize;\r\n this.intensity = intensity;\r\n\r\n this._additionalConstructionParameters = [ldrMerge, layerTextureRatio, layerTextureFixedSize, layerTextureType];\r\n }\r\n\r\n /** Forces the merge step to be done in ldr (clamp values > 1). Default: false */\r\n @editableInPropertyPage(\"LDR merge\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get ldrMerge() {\r\n return this._frameGraphTask.layer.ldrMerge;\r\n }\r\n\r\n public set ldrMerge(value: boolean) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(value, options.mainTextureRatio, options.mainTextureFixedSize, options.mainTextureType);\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(options.ldrMerge, 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.ldrMerge, 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.ldrMerge, options.mainTextureRatio, options.mainTextureFixedSize, value);\r\n }\r\n\r\n /** How big is the kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur kernel size\", PropertyTypeForEdition.Int, \"PROPERTIES\", { min: 1, max: 256 })\r\n public get blurKernelSize() {\r\n return this._frameGraphTask.layer.blurKernelSize;\r\n }\r\n\r\n public set blurKernelSize(value: number) {\r\n this._frameGraphTask.layer.blurKernelSize = value;\r\n }\r\n\r\n /** The intensity of the glow */\r\n @editableInPropertyPage(\"Intensity\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 5 })\r\n public get intensity() {\r\n return this._frameGraphTask.layer.intensity;\r\n }\r\n\r\n public set intensity(value: number) {\r\n this._frameGraphTask.layer.intensity = 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 \"NodeRenderGraphGlowLayerBlock\";\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 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 }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.blurKernelSize = ${this.blurKernelSize};`);\r\n codes.push(`${this._codeVariableName}.intensity = ${this.intensity};`);\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.blurKernelSize = this.blurKernelSize;\r\n serializationObject.intensity = this.intensity;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.blurKernelSize = serializationObject.blurKernelSize;\r\n this.intensity = serializationObject.intensity;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphGlowLayerBlock\", NodeRenderGraphGlowLayerBlock);\r\n"]}
@@ -185,7 +185,7 @@ __decorate([
185
185
  editableInPropertyPage("Is stroke", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
186
186
  ], NodeRenderGraphHighlightLayerBlock.prototype, "isStroke", null);
187
187
  __decorate([
188
- editableInPropertyPage("Layer texture type", 9 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
188
+ editableInPropertyPage("Layer texture type", 10 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
189
189
  ], NodeRenderGraphHighlightLayerBlock.prototype, "layerTextureType", null);
190
190
  __decorate([
191
191
  editableInPropertyPage("Blur horizontal size", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 4 })
@@ -1 +1 @@
1
- {"version":3,"file":"highlightLayerBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC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AAE,CAAC;QAC9C,mBAAmB,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACjE,mBAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC7D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;QACjE,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;IACjE,CAAC;CACJ;AA/IG;IADC,sBAAsB,CAAC,qBAAqB,wCAAgC,YAAY,CAAC;2EAGzF;AAUD;IADC,sBAAsB,CAAC,0BAA0B,wCAAgC,YAAY,CAAC;+EAG9F;AAUD;IADC,sBAAsB,CAAC,yBAAyB,wCAAgC,YAAY,CAAC;8EAG7F;AAUD;IADC,sBAAsB,CAAC,WAAW,0CAAkC,YAAY,CAAC;kEAGjF;AAUD;IADC,sBAAsB,CAAC,oBAAoB,8CAAsC,YAAY,CAAC;0EAG9F;AAUD;IADC,sBAAsB,CAAC,sBAAsB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;4EAG9G;AAQD;IADC,sBAAsB,CAAC,oBAAoB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;0EAG5G;AAyEL,aAAa,CAAC,4CAA4C,EAAE,kCAAkC,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 { FrameGraphHighlightLayerTask } from \"core/FrameGraph/Tasks/Layers/highlightLayerTask\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"../Rendering/baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that implements the highlight layer\r\n */\r\nexport class NodeRenderGraphHighlightLayerBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphHighlightLayerTask;\r\n\r\n public override _additionalConstructionParameters: [number, number | undefined, number, 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 NodeRenderGraphHighlightLayerBlock\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: 0.5)\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 blurTextureSizeRatio defines the factor to apply to the layer texture size to create the blur textures (default: 0.5)\r\n * @param isStroke should we display highlight as a solid stroke? (default: false)\r\n * @param layerTextureType defines the type of the layer texture (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)\r\n */\r\n public constructor(\r\n name: string,\r\n frameGraph: FrameGraph,\r\n scene: Scene,\r\n layerTextureRatio = 0.5,\r\n layerTextureFixedSize?: number,\r\n blurTextureSizeRatio = 0.5,\r\n isStroke = false,\r\n layerTextureType = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n ) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, blurTextureSizeRatio, isStroke, 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 true,\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._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 FrameGraphHighlightLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n blurTextureSizeRatio,\r\n isStroke,\r\n mainTextureType: layerTextureType,\r\n });\r\n }\r\n\r\n private _createTask(layerTextureRatio: number, layerTextureFixedSize: number, blurTextureSizeRatio: number, isStroke: boolean, layerTextureType: number) {\r\n const blurHorizontalSize = this.blurHorizontalSize;\r\n const blurVerticalSize = this.blurVerticalSize;\r\n\r\n this._frameGraphTask?.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphHighlightLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n blurTextureSizeRatio,\r\n isStroke,\r\n mainTextureType: layerTextureType,\r\n });\r\n\r\n this.blurHorizontalSize = blurHorizontalSize;\r\n this.blurVerticalSize = blurVerticalSize;\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, blurTextureSizeRatio, isStroke, 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.blurTextureSizeRatio, options.isStroke, 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.blurTextureSizeRatio, options.isStroke, options.mainTextureType);\r\n }\r\n\r\n /** Defines the factor to apply to the layer texture size to create the blur textures */\r\n @editableInPropertyPage(\"Blur texture size ratio\", PropertyTypeForEdition.Float, \"PROPERTIES\")\r\n public get blurTextureSizeRatio() {\r\n return this._frameGraphTask.layer._options.blurTextureSizeRatio;\r\n }\r\n\r\n public set blurTextureSizeRatio(value: number) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, value, options.isStroke, options.mainTextureType);\r\n }\r\n\r\n /** Should we display highlight as a solid stroke? */\r\n @editableInPropertyPage(\"Is stroke\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get isStroke() {\r\n return this._frameGraphTask.layer._options.isStroke;\r\n }\r\n\r\n public set isStroke(value: boolean) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, options.blurTextureSizeRatio, 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, options.blurTextureSizeRatio, options.isStroke, value);\r\n }\r\n\r\n /** How big is the horizontal kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur horizontal size\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 4 })\r\n public get blurHorizontalSize() {\r\n return this._frameGraphTask.layer.blurHorizontalSize;\r\n }\r\n\r\n public set blurHorizontalSize(value: number) {\r\n this._frameGraphTask.layer.blurHorizontalSize = value;\r\n }\r\n\r\n /** How big is the vertical kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur vertical size\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 4 })\r\n public get blurVerticalSize() {\r\n return this._frameGraphTask.layer.blurVerticalSize;\r\n }\r\n\r\n public set blurVerticalSize(value: number) {\r\n this._frameGraphTask.layer.blurVerticalSize = 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 \"NodeRenderGraphHighlightLayerBlock\";\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 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 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 }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.blurHorizontalSize = ${this.blurHorizontalSize};`);\r\n codes.push(`${this._codeVariableName}.blurVerticalSize = ${this.blurVerticalSize};`);\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.blurHorizontalSize = this.blurHorizontalSize;\r\n serializationObject.blurVerticalSize = this.blurVerticalSize;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.blurHorizontalSize = serializationObject.blurHorizontalSize;\r\n this.blurVerticalSize = serializationObject.blurVerticalSize;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphHighlightLayerBlock\", NodeRenderGraphHighlightLayerBlock);\r\n"]}
1
+ {"version":3,"file":"highlightLayerBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0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BAAkB,CAAC;QACjE,mBAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC7D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;QACjE,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;IACjE,CAAC;CACJ;AA/IG;IADC,sBAAsB,CAAC,qBAAqB,wCAAgC,YAAY,CAAC;2EAGzF;AAUD;IADC,sBAAsB,CAAC,0BAA0B,wCAAgC,YAAY,CAAC;+EAG9F;AAUD;IADC,sBAAsB,CAAC,yBAAyB,wCAAgC,YAAY,CAAC;8EAG7F;AAUD;IADC,sBAAsB,CAAC,WAAW,0CAAkC,YAAY,CAAC;kEAGjF;AAUD;IADC,sBAAsB,CAAC,oBAAoB,+CAAsC,YAAY,CAAC;0EAG9F;AAUD;IADC,sBAAsB,CAAC,sBAAsB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;4EAG9G;AAQD;IADC,sBAAsB,CAAC,oBAAoB,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;0EAG5G;AAyEL,aAAa,CAAC,4CAA4C,EAAE,kCAAkC,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 { FrameGraphHighlightLayerTask } from \"core/FrameGraph/Tasks/Layers/highlightLayerTask\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"../Rendering/baseObjectRendererBlock\";\r\n\r\n/**\r\n * Block that implements the highlight layer\r\n */\r\nexport class NodeRenderGraphHighlightLayerBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphHighlightLayerTask;\r\n\r\n public override _additionalConstructionParameters: [number, number | undefined, number, 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 NodeRenderGraphHighlightLayerBlock\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: 0.5)\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 blurTextureSizeRatio defines the factor to apply to the layer texture size to create the blur textures (default: 0.5)\r\n * @param isStroke should we display highlight as a solid stroke? (default: false)\r\n * @param layerTextureType defines the type of the layer texture (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)\r\n */\r\n public constructor(\r\n name: string,\r\n frameGraph: FrameGraph,\r\n scene: Scene,\r\n layerTextureRatio = 0.5,\r\n layerTextureFixedSize?: number,\r\n blurTextureSizeRatio = 0.5,\r\n isStroke = false,\r\n layerTextureType = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n ) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, blurTextureSizeRatio, isStroke, 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 true,\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._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 FrameGraphHighlightLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n blurTextureSizeRatio,\r\n isStroke,\r\n mainTextureType: layerTextureType,\r\n });\r\n }\r\n\r\n private _createTask(layerTextureRatio: number, layerTextureFixedSize: number, blurTextureSizeRatio: number, isStroke: boolean, layerTextureType: number) {\r\n const blurHorizontalSize = this.blurHorizontalSize;\r\n const blurVerticalSize = this.blurVerticalSize;\r\n\r\n this._frameGraphTask?.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphHighlightLayerTask(this.name, this._frameGraph, this._scene, {\r\n mainTextureRatio: layerTextureRatio,\r\n mainTextureFixedSize: layerTextureFixedSize,\r\n blurTextureSizeRatio,\r\n isStroke,\r\n mainTextureType: layerTextureType,\r\n });\r\n\r\n this.blurHorizontalSize = blurHorizontalSize;\r\n this.blurVerticalSize = blurVerticalSize;\r\n\r\n this._additionalConstructionParameters = [layerTextureRatio, layerTextureFixedSize, blurTextureSizeRatio, isStroke, 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.blurTextureSizeRatio, options.isStroke, 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.blurTextureSizeRatio, options.isStroke, options.mainTextureType);\r\n }\r\n\r\n /** Defines the factor to apply to the layer texture size to create the blur textures */\r\n @editableInPropertyPage(\"Blur texture size ratio\", PropertyTypeForEdition.Float, \"PROPERTIES\")\r\n public get blurTextureSizeRatio() {\r\n return this._frameGraphTask.layer._options.blurTextureSizeRatio;\r\n }\r\n\r\n public set blurTextureSizeRatio(value: number) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, value, options.isStroke, options.mainTextureType);\r\n }\r\n\r\n /** Should we display highlight as a solid stroke? */\r\n @editableInPropertyPage(\"Is stroke\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get isStroke() {\r\n return this._frameGraphTask.layer._options.isStroke;\r\n }\r\n\r\n public set isStroke(value: boolean) {\r\n const options = this._frameGraphTask.layer._options;\r\n\r\n this._createTask(options.mainTextureRatio, options.mainTextureFixedSize, options.blurTextureSizeRatio, 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, options.blurTextureSizeRatio, options.isStroke, value);\r\n }\r\n\r\n /** How big is the horizontal kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur horizontal size\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 4 })\r\n public get blurHorizontalSize() {\r\n return this._frameGraphTask.layer.blurHorizontalSize;\r\n }\r\n\r\n public set blurHorizontalSize(value: number) {\r\n this._frameGraphTask.layer.blurHorizontalSize = value;\r\n }\r\n\r\n /** How big is the vertical kernel of the blur texture */\r\n @editableInPropertyPage(\"Blur vertical size\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 4 })\r\n public get blurVerticalSize() {\r\n return this._frameGraphTask.layer.blurVerticalSize;\r\n }\r\n\r\n public set blurVerticalSize(value: number) {\r\n this._frameGraphTask.layer.blurVerticalSize = 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 \"NodeRenderGraphHighlightLayerBlock\";\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 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 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 }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.blurHorizontalSize = ${this.blurHorizontalSize};`);\r\n codes.push(`${this._codeVariableName}.blurVerticalSize = ${this.blurVerticalSize};`);\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.blurHorizontalSize = this.blurHorizontalSize;\r\n serializationObject.blurVerticalSize = this.blurVerticalSize;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.blurHorizontalSize = serializationObject.blurHorizontalSize;\r\n this.blurVerticalSize = serializationObject.blurVerticalSize;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphHighlightLayerBlock\", NodeRenderGraphHighlightLayerBlock);\r\n"]}
@@ -80,6 +80,6 @@ export class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {
80
80
  }
81
81
  }
82
82
  __decorate([
83
- editableInPropertyPage("Source sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "BASE PROPERTIES")
83
+ editableInPropertyPage("Source sampling mode", 8 /* PropertyTypeForEdition.SamplingMode */, "BASE PROPERTIES")
84
84
  ], NodeRenderGraphBasePostProcessBlock.prototype, "sourceSamplingMode", null);
85
85
  //# sourceMappingURL=basePostProcessBlock.js.map
@@ -147,6 +147,6 @@ __decorate([
147
147
  editableInPropertyPage("Use full screen viewport", 0 /* PropertyTypeForEdition.Boolean */, "BASE PROPERTIES")
148
148
  ], NodeRenderGraphBaseWithPropertiesPostProcessBlock.prototype, "useFullScreenViewport", null);
149
149
  __decorate([
150
- editableInPropertyPage("Viewport", 12 /* PropertyTypeForEdition.Viewport */, "BASE PROPERTIES")
150
+ editableInPropertyPage("Viewport", 13 /* PropertyTypeForEdition.Viewport */, "BASE PROPERTIES")
151
151
  ], NodeRenderGraphBaseWithPropertiesPostProcessBlock.prototype, "viewport", null);
152
152
  //# sourceMappingURL=baseWithPropertiesPostProcessBlock.js.map
@@ -115,7 +115,7 @@ export class NodeRenderGraphCircleOfConfusionPostProcessBlock extends NodeRender
115
115
  }
116
116
  }
117
117
  __decorate([
118
- editableInPropertyPage("Depth sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
118
+ editableInPropertyPage("Depth sampling mode", 8 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
119
119
  ], NodeRenderGraphCircleOfConfusionPostProcessBlock.prototype, "depthSamplingMode", null);
120
120
  __decorate([
121
121
  editableInPropertyPage("Lens size", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
@@ -50,7 +50,7 @@ export class NodeRenderGraphColorCorrectionPostProcessBlock extends NodeRenderGr
50
50
  }
51
51
  }
52
52
  __decorate([
53
- editableInPropertyPage("Color Table URL", 10 /* PropertyTypeForEdition.String */, "PROPERTIES")
53
+ editableInPropertyPage("Color Table URL", 11 /* PropertyTypeForEdition.String */, "PROPERTIES")
54
54
  ], NodeRenderGraphColorCorrectionPostProcessBlock.prototype, "colorTableUrl", null);
55
55
  RegisterClass("BABYLON.NodeRenderGraphColorCorrectionPostProcessBlock", NodeRenderGraphColorCorrectionPostProcessBlock);
56
56
  //# sourceMappingURL=colorCorrectionPostProcessBlock.js.map
@@ -161,7 +161,7 @@ __decorate([
161
161
  editableInPropertyPage("HDR", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
162
162
  ], NodeRenderGraphDepthOfFieldPostProcessBlock.prototype, "hdr", null);
163
163
  __decorate([
164
- editableInPropertyPage("Depth sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
164
+ editableInPropertyPage("Depth sampling mode", 8 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
165
165
  ], NodeRenderGraphDepthOfFieldPostProcessBlock.prototype, "depthSamplingMode", null);
166
166
  __decorate([
167
167
  editableInPropertyPage("Focal length", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
@@ -56,7 +56,7 @@ export class NodeRenderGraphFilterPostProcessBlock extends NodeRenderGraphBaseWi
56
56
  }
57
57
  }
58
58
  __decorate([
59
- editableInPropertyPage("Matrix", 11 /* PropertyTypeForEdition.Matrix */, "PROPERTIES")
59
+ editableInPropertyPage("Matrix", 12 /* PropertyTypeForEdition.Matrix */, "PROPERTIES")
60
60
  ], NodeRenderGraphFilterPostProcessBlock.prototype, "kernelMatrix", null);
61
61
  RegisterClass("BABYLON.NodeRenderGraphFilterPostProcessBlock", NodeRenderGraphFilterPostProcessBlock);
62
62
  //# sourceMappingURL=filterPostProcessBlock.js.map
@@ -226,7 +226,7 @@ __decorate([
226
226
  editableInPropertyPage("Center Y", 1 /* PropertyTypeForEdition.Float */, "VIGNETTE", { min: 0, max: 1 })
227
227
  ], NodeRenderGraphImageProcessingPostProcessBlock.prototype, "vignetteCenterY", null);
228
228
  __decorate([
229
- editableInPropertyPage("Color", 6 /* PropertyTypeForEdition.Color4 */, "VIGNETTE")
229
+ editableInPropertyPage("Color", 7 /* PropertyTypeForEdition.Color4 */, "VIGNETTE")
230
230
  ], NodeRenderGraphImageProcessingPostProcessBlock.prototype, "vignetteColor", null);
231
231
  __decorate([
232
232
  editableInPropertyPage("Blend mode", 5 /* PropertyTypeForEdition.List */, "VIGNETTE", {
@@ -261,7 +261,7 @@ export class NodeRenderGraphSSAO2PostProcessBlock extends NodeRenderGraphBasePos
261
261
  }
262
262
  }
263
263
  __decorate([
264
- editableInPropertyPage("Texture type", 9 /* PropertyTypeForEdition.TextureType */, "TEXTURE")
264
+ editableInPropertyPage("Texture type", 10 /* PropertyTypeForEdition.TextureType */, "TEXTURE")
265
265
  ], NodeRenderGraphSSAO2PostProcessBlock.prototype, "textureType", null);
266
266
  __decorate([
267
267
  editableInPropertyPage("SSAO texture ratio", 1 /* PropertyTypeForEdition.Float */, "TEXTURE", { min: 0.1, max: 1 })
@@ -1 +1 @@
1
- {"version":3,"file":"ssao2PostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,yCAA+B;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,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;;;;;;;;OAQG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY,EAAE,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,yBAAyB;QAClJ,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,iCAAiC,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QAE7E,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,MAAM,CAAC,CAAC;QAC9E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EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;8EAG7F;AAiGL,aAAa,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAC","sourcesContent":["import type { Scene, FrameGraph, NodeRenderGraphConnectionPoint, NodeRenderGraphBuildState, FrameGraphTextureHandle, Camera } from \"core/index\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphSSAO2RenderingPipelineTask } from \"../../../Tasks/PostProcesses/ssao2RenderingPipelineTask\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the SSAO2 post process\r\n */\r\nexport class NodeRenderGraphSSAO2PostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphSSAO2RenderingPipelineTask;\r\n\r\n public override _additionalConstructionParameters: [number, number, 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 NodeRenderGraphSSAO2PostProcessBlock\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 ratioSSAO The ratio between the SSAO texture size and the source texture size (default: 1)\r\n * @param ratioBlur The ratio between the SSAO blur texture size and the source texture size (default: 1)\r\n * @param textureType The texture type used by the different post processes created by SSAO2 (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, ratioSSAO = 1, ratioBlur = 1, textureType = Constants.TEXTURETYPE_UNSIGNED_BYTE) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [ratioSSAO, ratioBlur, textureType];\r\n\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"geomDepth\", NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth);\r\n this.registerInput(\"geomNormal\", NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphSSAO2RenderingPipelineTask(this.name, frameGraph, ratioSSAO, ratioBlur, textureType);\r\n }\r\n\r\n private _createTask(ratioSSAO: number, ratioBlur: number, textureType: number) {\r\n const sourceSamplingMode = this.sourceSamplingMode;\r\n const samples = this.samples;\r\n const totalStrength = this.totalStrength;\r\n const base = this.base;\r\n const maxZ = this.maxZ;\r\n const minZAspect = this.minZAspect;\r\n const radius = this.radius;\r\n const epsilon = this.epsilon;\r\n const useViewportInCombineStage = this.useViewportInCombineStage;\r\n const bypassBlur = this.bypassBlur;\r\n const expensiveBlur = this.expensiveBlur;\r\n const bilateralSoften = this.bilateralSoften;\r\n const bilateralSamples = this.bilateralSamples;\r\n const bilateralTolerance = this.bilateralTolerance;\r\n\r\n this._frameGraphTask.dispose();\r\n this._frameGraphTask = new FrameGraphSSAO2RenderingPipelineTask(this.name, this._frameGraph, ratioSSAO, ratioBlur, textureType);\r\n\r\n this.sourceSamplingMode = sourceSamplingMode;\r\n this.samples = samples;\r\n this.totalStrength = totalStrength;\r\n this.base = base;\r\n this.maxZ = maxZ;\r\n this.minZAspect = minZAspect;\r\n this.radius = radius;\r\n this.epsilon = epsilon;\r\n this.useViewportInCombineStage = useViewportInCombineStage;\r\n this.bypassBlur = bypassBlur;\r\n this.expensiveBlur = expensiveBlur;\r\n this.bilateralSoften = bilateralSoften;\r\n this.bilateralSamples = bilateralSamples;\r\n this.bilateralTolerance = bilateralTolerance;\r\n\r\n this._additionalConstructionParameters = [ratioSSAO, ratioBlur, textureType];\r\n }\r\n\r\n /** The texture type used by the different post processes created by SSAO2 */\r\n @editableInPropertyPage(\"Texture type\", PropertyTypeForEdition.TextureType, \"TEXTURE\")\r\n public get textureType() {\r\n return this._frameGraphTask.textureType;\r\n }\r\n\r\n public set textureType(value: number) {\r\n this._createTask(this._frameGraphTask.ratioSSAO, this._frameGraphTask.ratioBlur, value);\r\n }\r\n\r\n /** The ratio between the SSAO texture size and the source texture size */\r\n @editableInPropertyPage(\"SSAO texture ratio\", PropertyTypeForEdition.Float, \"TEXTURE\", { min: 0.1, max: 1 })\r\n public get ratioSSAO() {\r\n return this._frameGraphTask.ratioSSAO;\r\n }\r\n\r\n public set ratioSSAO(value: number) {\r\n this._createTask(value, this._frameGraphTask.ratioBlur, this._frameGraphTask.textureType);\r\n }\r\n\r\n /** The ratio between the SSAO blur texture size and the source texture size */\r\n @editableInPropertyPage(\"SSAO blur texture ratio\", PropertyTypeForEdition.Float, \"TEXTURE\", { min: 0.1, max: 1 })\r\n public get ratioBlur() {\r\n return this._frameGraphTask.ratioBlur;\r\n }\r\n\r\n public set ratioBlur(value: number) {\r\n this._createTask(this._frameGraphTask.ratioSSAO, value, this._frameGraphTask.textureType);\r\n }\r\n\r\n /** Number of samples used for the SSAO calculations. Default value is 8. */\r\n @editableInPropertyPage(\"Samples\", PropertyTypeForEdition.Int, \"SSAO\", { min: 1, max: 128 })\r\n public get samples() {\r\n return this._frameGraphTask.ssao.samples;\r\n }\r\n\r\n public set samples(value: number) {\r\n this._frameGraphTask.ssao.samples = value;\r\n }\r\n\r\n /** The strength of the SSAO post-process. Default value is 1.0. */\r\n @editableInPropertyPage(\"Strength\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 3 })\r\n public get totalStrength() {\r\n return this._frameGraphTask.ssao.totalStrength;\r\n }\r\n\r\n public set totalStrength(value: number) {\r\n this._frameGraphTask.ssao.totalStrength = value;\r\n }\r\n\r\n /** The base color of the SSAO post-process. The final result is \"base + ssao\" between [0, 1] */\r\n @editableInPropertyPage(\"Base\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 1 })\r\n public get base() {\r\n return this._frameGraphTask.ssao.base;\r\n }\r\n\r\n public set base(value: number) {\r\n this._frameGraphTask.ssao.base = value;\r\n }\r\n\r\n /** Maximum depth value to still render AO. A smooth falloff makes the dimming more natural, so there will be no abrupt shading change. */\r\n @editableInPropertyPage(\"Max Z\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 10000 })\r\n public get maxZ() {\r\n return this._frameGraphTask.ssao.maxZ;\r\n }\r\n\r\n public set maxZ(value: number) {\r\n this._frameGraphTask.ssao.maxZ = value;\r\n }\r\n\r\n /** In order to save performances, SSAO radius is clamped on close geometry. This ratio changes by how much. */\r\n @editableInPropertyPage(\"Min Z aspect\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 0.5 })\r\n public get minZAspect() {\r\n return this._frameGraphTask.ssao.minZAspect;\r\n }\r\n\r\n public set minZAspect(value: number) {\r\n this._frameGraphTask.ssao.minZAspect = value;\r\n }\r\n\r\n /** The radius around the analyzed pixel used by the SSAO post-process. */\r\n @editableInPropertyPage(\"Radius\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 10 })\r\n public get radius() {\r\n return this._frameGraphTask.ssao.radius;\r\n }\r\n\r\n public set radius(value: number) {\r\n this._frameGraphTask.ssao.radius = value;\r\n }\r\n\r\n /** Used in SSAO calculations to compensate for accuracy issues with depth values. */\r\n @editableInPropertyPage(\"Epsilon\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 1 })\r\n public get epsilon() {\r\n return this._frameGraphTask.ssao.epsilon;\r\n }\r\n\r\n public set epsilon(value: number) {\r\n this._frameGraphTask.ssao.epsilon = value;\r\n }\r\n\r\n /** Indicates that the combine stage should use the current camera viewport to render the SSAO result on only a portion of the output texture. */\r\n @editableInPropertyPage(\"Use viewport in combine stage\", PropertyTypeForEdition.Boolean, \"SSAO\")\r\n public get useViewportInCombineStage() {\r\n return this._frameGraphTask.ssao.useViewportInCombineStage;\r\n }\r\n\r\n public set useViewportInCombineStage(value: boolean) {\r\n this._frameGraphTask.ssao.useViewportInCombineStage = value;\r\n }\r\n\r\n /** Skips the denoising (blur) stage of the SSAO calculations. */\r\n @editableInPropertyPage(\"Bypass blur\", PropertyTypeForEdition.Boolean, \"Blur\")\r\n public get bypassBlur() {\r\n return this._frameGraphTask.ssao.bypassBlur;\r\n }\r\n\r\n public set bypassBlur(value: boolean) {\r\n this._frameGraphTask.ssao.bypassBlur = value;\r\n }\r\n\r\n /** Enables the configurable bilateral denoising (blurring) filter. */\r\n @editableInPropertyPage(\"Expensive blur\", PropertyTypeForEdition.Boolean, \"Blur\")\r\n public get expensiveBlur() {\r\n return this._frameGraphTask.ssao.expensiveBlur;\r\n }\r\n\r\n public set expensiveBlur(value: boolean) {\r\n this._frameGraphTask.ssao.expensiveBlur = value;\r\n }\r\n\r\n /** The number of samples the bilateral filter uses in both dimensions when denoising the SSAO calculations. */\r\n @editableInPropertyPage(\"Samples\", PropertyTypeForEdition.Int, \"Blur\", { min: 1, max: 128 })\r\n public get bilateralSamples() {\r\n return this._frameGraphTask.ssao.bilateralSamples;\r\n }\r\n\r\n public set bilateralSamples(value: number) {\r\n this._frameGraphTask.ssao.bilateralSamples = value;\r\n }\r\n\r\n /** Controls the shape of the denoising kernel used by the bilateral filter. */\r\n @editableInPropertyPage(\"Soften\", PropertyTypeForEdition.Float, \"Blur\", { min: 0, max: 1 })\r\n public get bilateralSoften() {\r\n return this._frameGraphTask.ssao.bilateralSoften;\r\n }\r\n\r\n public set bilateralSoften(value: number) {\r\n this._frameGraphTask.ssao.bilateralSoften = value;\r\n }\r\n\r\n /** How forgiving the bilateral denoiser should be when rejecting samples. */\r\n @editableInPropertyPage(\"Tolerance\", PropertyTypeForEdition.Float, \"Blur\", { min: 0, max: 1 })\r\n public get bilateralTolerance() {\r\n return this._frameGraphTask.ssao.bilateralTolerance;\r\n }\r\n\r\n public set bilateralTolerance(value: number) {\r\n this._frameGraphTask.ssao.bilateralTolerance = 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 \"NodeRenderGraphSSAO2PostProcessBlock\";\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 geometry depth input component\r\n */\r\n public get geomDepth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry normal input component\r\n */\r\n public get geomNormal(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.normalTexture = this.geomNormal.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.geomDepth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\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}.totalStrength = ${this.totalStrength};`);\r\n codes.push(`${this._codeVariableName}.base = ${this.base};`);\r\n codes.push(`${this._codeVariableName}.maxZ = ${this.maxZ};`);\r\n codes.push(`${this._codeVariableName}.minZAspect = ${this.minZAspect};`);\r\n codes.push(`${this._codeVariableName}.radius = ${this.radius};`);\r\n codes.push(`${this._codeVariableName}.epsilon = ${this.epsilon};`);\r\n codes.push(`${this._codeVariableName}.useViewportInCombineStage = ${this.useViewportInCombineStage};`);\r\n codes.push(`${this._codeVariableName}.bypassBlur = ${this.bypassBlur};`);\r\n codes.push(`${this._codeVariableName}.expensiveBlur = ${this.expensiveBlur};`);\r\n codes.push(`${this._codeVariableName}.bilateralSamples = ${this.bilateralSamples};`);\r\n codes.push(`${this._codeVariableName}.bilateralSoften = ${this.bilateralSoften};`);\r\n codes.push(`${this._codeVariableName}.bilateralTolerance = ${this.bilateralTolerance};`);\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.totalStrength = this.totalStrength;\r\n serializationObject.base = this.base;\r\n serializationObject.maxZ = this.maxZ;\r\n serializationObject.minZAspect = this.minZAspect;\r\n serializationObject.radius = this.radius;\r\n serializationObject.epsilon = this.epsilon;\r\n serializationObject.useViewportInCombineStage = this.useViewportInCombineStage;\r\n serializationObject.bypassBlur = this.bypassBlur;\r\n serializationObject.expensiveBlur = this.expensiveBlur;\r\n serializationObject.bilateralSoften = this.bilateralSoften;\r\n serializationObject.bilateralSamples = this.bilateralSamples;\r\n serializationObject.bilateralTolerance = this.bilateralTolerance;\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.totalStrength = serializationObject.totalStrength;\r\n this.base = serializationObject.base;\r\n this.maxZ = serializationObject.maxZ;\r\n this.minZAspect = serializationObject.minZAspect;\r\n this.radius = serializationObject.radius;\r\n this.epsilon = serializationObject.epsilon;\r\n this.useViewportInCombineStage = serializationObject.useViewportInCombineStage;\r\n this.bypassBlur = serializationObject.bypassBlur;\r\n this.expensiveBlur = serializationObject.expensiveBlur;\r\n this.bilateralSoften = serializationObject.bilateralSoften;\r\n this.bilateralSamples = serializationObject.bilateralSamples;\r\n this.bilateralTolerance = serializationObject.bilateralTolerance;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphSSAO2PostProcessBlock\", NodeRenderGraphSSAO2PostProcessBlock);\r\n"]}
1
+ {"version":3,"file":"ssao2PostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,yCAA+B;AACnD,OAAO,E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EAAE,GAAG,EAAE,CAAC;sEAGlG;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;kEAG3F;AAQD;IADC,sBAAsB,CAAC,SAAS,wCAAgC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;mEAG3F;AAQD;IADC,sBAAsB,CAAC,+BAA+B,0CAAkC,MAAM,CAAC;qFAG/F;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,MAAM,CAAC;sEAG7E;AAQD;IADC,sBAAsB,CAAC,gBAAgB,0CAAkC,MAAM,CAAC;yEAGhF;AAQD;IADC,sBAAsB,CAAC,SAAS,sCAA8B,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;4EAG3F;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;2EAG1F;AAQD;IADC,sBAAsB,CAAC,WAAW,wCAAgC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;8EAG7F;AAiGL,aAAa,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAC","sourcesContent":["import type { Scene, FrameGraph, NodeRenderGraphConnectionPoint, NodeRenderGraphBuildState, FrameGraphTextureHandle, Camera } from \"core/index\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphSSAO2RenderingPipelineTask } from \"../../../Tasks/PostProcesses/ssao2RenderingPipelineTask\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the SSAO2 post process\r\n */\r\nexport class NodeRenderGraphSSAO2PostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphSSAO2RenderingPipelineTask;\r\n\r\n public override _additionalConstructionParameters: [number, number, 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 NodeRenderGraphSSAO2PostProcessBlock\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 ratioSSAO The ratio between the SSAO texture size and the source texture size (default: 1)\r\n * @param ratioBlur The ratio between the SSAO blur texture size and the source texture size (default: 1)\r\n * @param textureType The texture type used by the different post processes created by SSAO2 (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, ratioSSAO = 1, ratioBlur = 1, textureType = Constants.TEXTURETYPE_UNSIGNED_BYTE) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [ratioSSAO, ratioBlur, textureType];\r\n\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"geomDepth\", NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth);\r\n this.registerInput(\"geomNormal\", NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphSSAO2RenderingPipelineTask(this.name, frameGraph, ratioSSAO, ratioBlur, textureType);\r\n }\r\n\r\n private _createTask(ratioSSAO: number, ratioBlur: number, textureType: number) {\r\n const sourceSamplingMode = this.sourceSamplingMode;\r\n const samples = this.samples;\r\n const totalStrength = this.totalStrength;\r\n const base = this.base;\r\n const maxZ = this.maxZ;\r\n const minZAspect = this.minZAspect;\r\n const radius = this.radius;\r\n const epsilon = this.epsilon;\r\n const useViewportInCombineStage = this.useViewportInCombineStage;\r\n const bypassBlur = this.bypassBlur;\r\n const expensiveBlur = this.expensiveBlur;\r\n const bilateralSoften = this.bilateralSoften;\r\n const bilateralSamples = this.bilateralSamples;\r\n const bilateralTolerance = this.bilateralTolerance;\r\n\r\n this._frameGraphTask.dispose();\r\n this._frameGraphTask = new FrameGraphSSAO2RenderingPipelineTask(this.name, this._frameGraph, ratioSSAO, ratioBlur, textureType);\r\n\r\n this.sourceSamplingMode = sourceSamplingMode;\r\n this.samples = samples;\r\n this.totalStrength = totalStrength;\r\n this.base = base;\r\n this.maxZ = maxZ;\r\n this.minZAspect = minZAspect;\r\n this.radius = radius;\r\n this.epsilon = epsilon;\r\n this.useViewportInCombineStage = useViewportInCombineStage;\r\n this.bypassBlur = bypassBlur;\r\n this.expensiveBlur = expensiveBlur;\r\n this.bilateralSoften = bilateralSoften;\r\n this.bilateralSamples = bilateralSamples;\r\n this.bilateralTolerance = bilateralTolerance;\r\n\r\n this._additionalConstructionParameters = [ratioSSAO, ratioBlur, textureType];\r\n }\r\n\r\n /** The texture type used by the different post processes created by SSAO2 */\r\n @editableInPropertyPage(\"Texture type\", PropertyTypeForEdition.TextureType, \"TEXTURE\")\r\n public get textureType() {\r\n return this._frameGraphTask.textureType;\r\n }\r\n\r\n public set textureType(value: number) {\r\n this._createTask(this._frameGraphTask.ratioSSAO, this._frameGraphTask.ratioBlur, value);\r\n }\r\n\r\n /** The ratio between the SSAO texture size and the source texture size */\r\n @editableInPropertyPage(\"SSAO texture ratio\", PropertyTypeForEdition.Float, \"TEXTURE\", { min: 0.1, max: 1 })\r\n public get ratioSSAO() {\r\n return this._frameGraphTask.ratioSSAO;\r\n }\r\n\r\n public set ratioSSAO(value: number) {\r\n this._createTask(value, this._frameGraphTask.ratioBlur, this._frameGraphTask.textureType);\r\n }\r\n\r\n /** The ratio between the SSAO blur texture size and the source texture size */\r\n @editableInPropertyPage(\"SSAO blur texture ratio\", PropertyTypeForEdition.Float, \"TEXTURE\", { min: 0.1, max: 1 })\r\n public get ratioBlur() {\r\n return this._frameGraphTask.ratioBlur;\r\n }\r\n\r\n public set ratioBlur(value: number) {\r\n this._createTask(this._frameGraphTask.ratioSSAO, value, this._frameGraphTask.textureType);\r\n }\r\n\r\n /** Number of samples used for the SSAO calculations. Default value is 8. */\r\n @editableInPropertyPage(\"Samples\", PropertyTypeForEdition.Int, \"SSAO\", { min: 1, max: 128 })\r\n public get samples() {\r\n return this._frameGraphTask.ssao.samples;\r\n }\r\n\r\n public set samples(value: number) {\r\n this._frameGraphTask.ssao.samples = value;\r\n }\r\n\r\n /** The strength of the SSAO post-process. Default value is 1.0. */\r\n @editableInPropertyPage(\"Strength\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 3 })\r\n public get totalStrength() {\r\n return this._frameGraphTask.ssao.totalStrength;\r\n }\r\n\r\n public set totalStrength(value: number) {\r\n this._frameGraphTask.ssao.totalStrength = value;\r\n }\r\n\r\n /** The base color of the SSAO post-process. The final result is \"base + ssao\" between [0, 1] */\r\n @editableInPropertyPage(\"Base\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 1 })\r\n public get base() {\r\n return this._frameGraphTask.ssao.base;\r\n }\r\n\r\n public set base(value: number) {\r\n this._frameGraphTask.ssao.base = value;\r\n }\r\n\r\n /** Maximum depth value to still render AO. A smooth falloff makes the dimming more natural, so there will be no abrupt shading change. */\r\n @editableInPropertyPage(\"Max Z\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 10000 })\r\n public get maxZ() {\r\n return this._frameGraphTask.ssao.maxZ;\r\n }\r\n\r\n public set maxZ(value: number) {\r\n this._frameGraphTask.ssao.maxZ = value;\r\n }\r\n\r\n /** In order to save performances, SSAO radius is clamped on close geometry. This ratio changes by how much. */\r\n @editableInPropertyPage(\"Min Z aspect\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 0.5 })\r\n public get minZAspect() {\r\n return this._frameGraphTask.ssao.minZAspect;\r\n }\r\n\r\n public set minZAspect(value: number) {\r\n this._frameGraphTask.ssao.minZAspect = value;\r\n }\r\n\r\n /** The radius around the analyzed pixel used by the SSAO post-process. */\r\n @editableInPropertyPage(\"Radius\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 10 })\r\n public get radius() {\r\n return this._frameGraphTask.ssao.radius;\r\n }\r\n\r\n public set radius(value: number) {\r\n this._frameGraphTask.ssao.radius = value;\r\n }\r\n\r\n /** Used in SSAO calculations to compensate for accuracy issues with depth values. */\r\n @editableInPropertyPage(\"Epsilon\", PropertyTypeForEdition.Float, \"SSAO\", { min: 0, max: 1 })\r\n public get epsilon() {\r\n return this._frameGraphTask.ssao.epsilon;\r\n }\r\n\r\n public set epsilon(value: number) {\r\n this._frameGraphTask.ssao.epsilon = value;\r\n }\r\n\r\n /** Indicates that the combine stage should use the current camera viewport to render the SSAO result on only a portion of the output texture. */\r\n @editableInPropertyPage(\"Use viewport in combine stage\", PropertyTypeForEdition.Boolean, \"SSAO\")\r\n public get useViewportInCombineStage() {\r\n return this._frameGraphTask.ssao.useViewportInCombineStage;\r\n }\r\n\r\n public set useViewportInCombineStage(value: boolean) {\r\n this._frameGraphTask.ssao.useViewportInCombineStage = value;\r\n }\r\n\r\n /** Skips the denoising (blur) stage of the SSAO calculations. */\r\n @editableInPropertyPage(\"Bypass blur\", PropertyTypeForEdition.Boolean, \"Blur\")\r\n public get bypassBlur() {\r\n return this._frameGraphTask.ssao.bypassBlur;\r\n }\r\n\r\n public set bypassBlur(value: boolean) {\r\n this._frameGraphTask.ssao.bypassBlur = value;\r\n }\r\n\r\n /** Enables the configurable bilateral denoising (blurring) filter. */\r\n @editableInPropertyPage(\"Expensive blur\", PropertyTypeForEdition.Boolean, \"Blur\")\r\n public get expensiveBlur() {\r\n return this._frameGraphTask.ssao.expensiveBlur;\r\n }\r\n\r\n public set expensiveBlur(value: boolean) {\r\n this._frameGraphTask.ssao.expensiveBlur = value;\r\n }\r\n\r\n /** The number of samples the bilateral filter uses in both dimensions when denoising the SSAO calculations. */\r\n @editableInPropertyPage(\"Samples\", PropertyTypeForEdition.Int, \"Blur\", { min: 1, max: 128 })\r\n public get bilateralSamples() {\r\n return this._frameGraphTask.ssao.bilateralSamples;\r\n }\r\n\r\n public set bilateralSamples(value: number) {\r\n this._frameGraphTask.ssao.bilateralSamples = value;\r\n }\r\n\r\n /** Controls the shape of the denoising kernel used by the bilateral filter. */\r\n @editableInPropertyPage(\"Soften\", PropertyTypeForEdition.Float, \"Blur\", { min: 0, max: 1 })\r\n public get bilateralSoften() {\r\n return this._frameGraphTask.ssao.bilateralSoften;\r\n }\r\n\r\n public set bilateralSoften(value: number) {\r\n this._frameGraphTask.ssao.bilateralSoften = value;\r\n }\r\n\r\n /** How forgiving the bilateral denoiser should be when rejecting samples. */\r\n @editableInPropertyPage(\"Tolerance\", PropertyTypeForEdition.Float, \"Blur\", { min: 0, max: 1 })\r\n public get bilateralTolerance() {\r\n return this._frameGraphTask.ssao.bilateralTolerance;\r\n }\r\n\r\n public set bilateralTolerance(value: number) {\r\n this._frameGraphTask.ssao.bilateralTolerance = 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 \"NodeRenderGraphSSAO2PostProcessBlock\";\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 geometry depth input component\r\n */\r\n public get geomDepth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry normal input component\r\n */\r\n public get geomNormal(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.normalTexture = this.geomNormal.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.geomDepth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\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}.totalStrength = ${this.totalStrength};`);\r\n codes.push(`${this._codeVariableName}.base = ${this.base};`);\r\n codes.push(`${this._codeVariableName}.maxZ = ${this.maxZ};`);\r\n codes.push(`${this._codeVariableName}.minZAspect = ${this.minZAspect};`);\r\n codes.push(`${this._codeVariableName}.radius = ${this.radius};`);\r\n codes.push(`${this._codeVariableName}.epsilon = ${this.epsilon};`);\r\n codes.push(`${this._codeVariableName}.useViewportInCombineStage = ${this.useViewportInCombineStage};`);\r\n codes.push(`${this._codeVariableName}.bypassBlur = ${this.bypassBlur};`);\r\n codes.push(`${this._codeVariableName}.expensiveBlur = ${this.expensiveBlur};`);\r\n codes.push(`${this._codeVariableName}.bilateralSamples = ${this.bilateralSamples};`);\r\n codes.push(`${this._codeVariableName}.bilateralSoften = ${this.bilateralSoften};`);\r\n codes.push(`${this._codeVariableName}.bilateralTolerance = ${this.bilateralTolerance};`);\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.totalStrength = this.totalStrength;\r\n serializationObject.base = this.base;\r\n serializationObject.maxZ = this.maxZ;\r\n serializationObject.minZAspect = this.minZAspect;\r\n serializationObject.radius = this.radius;\r\n serializationObject.epsilon = this.epsilon;\r\n serializationObject.useViewportInCombineStage = this.useViewportInCombineStage;\r\n serializationObject.bypassBlur = this.bypassBlur;\r\n serializationObject.expensiveBlur = this.expensiveBlur;\r\n serializationObject.bilateralSoften = this.bilateralSoften;\r\n serializationObject.bilateralSamples = this.bilateralSamples;\r\n serializationObject.bilateralTolerance = this.bilateralTolerance;\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.totalStrength = serializationObject.totalStrength;\r\n this.base = serializationObject.base;\r\n this.maxZ = serializationObject.maxZ;\r\n this.minZAspect = serializationObject.minZAspect;\r\n this.radius = serializationObject.radius;\r\n this.epsilon = serializationObject.epsilon;\r\n this.useViewportInCombineStage = serializationObject.useViewportInCombineStage;\r\n this.bypassBlur = serializationObject.bypassBlur;\r\n this.expensiveBlur = serializationObject.expensiveBlur;\r\n this.bilateralSoften = serializationObject.bilateralSoften;\r\n this.bilateralSamples = serializationObject.bilateralSamples;\r\n this.bilateralTolerance = serializationObject.bilateralTolerance;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphSSAO2PostProcessBlock\", NodeRenderGraphSSAO2PostProcessBlock);\r\n"]}
@@ -429,7 +429,7 @@ export class NodeRenderGraphSSRPostProcessBlock extends NodeRenderGraphBasePostP
429
429
  }
430
430
  }
431
431
  __decorate([
432
- editableInPropertyPage("Texture type", 9 /* PropertyTypeForEdition.TextureType */, "SSR")
432
+ editableInPropertyPage("Texture type", 10 /* PropertyTypeForEdition.TextureType */, "SSR")
433
433
  ], NodeRenderGraphSSRPostProcessBlock.prototype, "textureType", null);
434
434
  __decorate([
435
435
  editableInPropertyPage("Debug", 0 /* PropertyTypeForEdition.Boolean */, "SSR")