@onerjs/core 8.28.4 → 8.28.6

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 (90) hide show
  1. package/Engines/abstractEngine.js +2 -2
  2. package/Engines/abstractEngine.js.map +1 -1
  3. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.d.ts +1 -0
  4. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js.map +1 -1
  5. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.d.ts +1 -0
  6. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js.map +1 -1
  7. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +1 -0
  8. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
  9. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.d.ts +1 -0
  10. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.js.map +1 -1
  11. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.d.ts +94 -0
  12. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.js +312 -0
  13. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.js.map +1 -0
  14. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.d.ts +1 -0
  15. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js.map +1 -1
  16. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.d.ts +1 -0
  17. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.js.map +1 -1
  18. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +1 -0
  19. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  20. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +1 -0
  21. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  22. package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js +1 -1
  23. package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js.map +1 -1
  24. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  25. package/FrameGraph/Node/Blocks/index.js +1 -0
  26. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  27. package/FrameGraph/Node/nodeRenderGraph.js +1 -1
  28. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  29. package/FrameGraph/Tasks/Layers/baseLayerTask.js +1 -7
  30. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
  31. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +0 -6
  32. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
  33. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +3 -4
  34. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -1
  35. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +3 -4
  36. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -1
  37. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +3 -4
  38. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
  39. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +0 -8
  40. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
  41. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +3 -5
  42. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
  43. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.d.ts +13 -0
  44. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js +25 -0
  45. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js.map +1 -0
  46. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.d.ts +76 -0
  47. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js +147 -0
  48. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js.map +1 -0
  49. package/FrameGraph/Tasks/PostProcesses/ssao2Task.d.ts +14 -0
  50. package/FrameGraph/Tasks/PostProcesses/ssao2Task.js +29 -0
  51. package/FrameGraph/Tasks/PostProcesses/ssao2Task.js.map +1 -0
  52. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +2 -11
  53. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -1
  54. package/FrameGraph/Tasks/PostProcesses/ssrTask.js +8 -9
  55. package/FrameGraph/Tasks/PostProcesses/ssrTask.js.map +1 -1
  56. package/FrameGraph/index.d.ts +1 -0
  57. package/FrameGraph/index.js +1 -0
  58. package/FrameGraph/index.js.map +1 -1
  59. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +4 -0
  60. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +6 -0
  61. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  62. package/Materials/Node/nodeMaterial.js +1 -1
  63. package/Materials/Node/nodeMaterial.js.map +1 -1
  64. package/Materials/PBR/openPbrMaterial.js +5 -5
  65. package/Materials/PBR/openPbrMaterial.js.map +1 -1
  66. package/Meshes/Node/nodeGeometry.js +1 -1
  67. package/Meshes/Node/nodeGeometry.js.map +1 -1
  68. package/Particles/Node/nodeParticleSystemSet.d.ts +14 -6
  69. package/Particles/Node/nodeParticleSystemSet.js +38 -7
  70. package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
  71. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +21 -30
  72. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +163 -256
  73. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  74. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +1 -3
  75. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  76. package/PostProcesses/RenderPipeline/Pipelines/thinSSAO2RenderingPipeline.d.ts +130 -0
  77. package/PostProcesses/RenderPipeline/Pipelines/thinSSAO2RenderingPipeline.js +193 -0
  78. package/PostProcesses/RenderPipeline/Pipelines/thinSSAO2RenderingPipeline.js.map +1 -0
  79. package/PostProcesses/thinSSAO2BlurPostProcess.d.ts +26 -0
  80. package/PostProcesses/thinSSAO2BlurPostProcess.js +81 -0
  81. package/PostProcesses/thinSSAO2BlurPostProcess.js.map +1 -0
  82. package/PostProcesses/thinSSAO2CombinePostProcess.d.ts +15 -0
  83. package/PostProcesses/thinSSAO2CombinePostProcess.js +48 -0
  84. package/PostProcesses/thinSSAO2CombinePostProcess.js.map +1 -0
  85. package/PostProcesses/thinSSAO2PostProcess.d.ts +45 -0
  86. package/PostProcesses/thinSSAO2PostProcess.js +208 -0
  87. package/PostProcesses/thinSSAO2PostProcess.js.map +1 -0
  88. package/Shaders/ShadersInclude/shadowsFragmentFunctions.js +29 -4
  89. package/Shaders/ShadersInclude/shadowsFragmentFunctions.js.map +1 -1
  90. package/package.json +1 -1
@@ -6,6 +6,7 @@ import { FrameGraphGlowLayerTask } from "../../../Tasks/Layers/glowLayerTask.js"
6
6
  */
7
7
  export declare class NodeRenderGraphGlowLayerBlock extends NodeRenderGraphBlock {
8
8
  protected _frameGraphTask: FrameGraphGlowLayerTask;
9
+ _additionalConstructionParameters: [boolean, number, number | undefined, number];
9
10
  /**
10
11
  * Gets the frame graph task associated with this block
11
12
  */
@@ -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;AAC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AsB,CAAC,kBAAkB,sCAA8B,YAAY,EAAE,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 /**\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 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 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,EAAE,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AAE,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 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 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"]}
@@ -6,6 +6,7 @@ import { FrameGraphHighlightLayerTask } from "../../../Tasks/Layers/highlightLay
6
6
  */
7
7
  export declare class NodeRenderGraphHighlightLayerBlock extends NodeRenderGraphBlock {
8
8
  protected _frameGraphTask: FrameGraphHighlightLayerTask;
9
+ _additionalConstructionParameters: [number, number | undefined, number, boolean, number];
9
10
  /**
10
11
  * Gets the frame graph task associated with this block
11
12
  */
@@ -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,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,oDAAwD;AAC/F,OAAO,EAAE,SAAS,EAAE,yCAA+B;AACnD,OAAO,EAAE,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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 /**\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,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,oDAAwD;AAC/F,OAAO,EAAE,SAAS,EAAE,yCAA+B;AACnD,OAAO,EAAE,0CAA0C,EAAE,MAAM,kDAAkD,CAAC;AAC9G,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAE9F;;GAEG;AACH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AmB,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"]}
@@ -6,6 +6,7 @@ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
6
6
  */
7
7
  export declare class NodeRenderGraphBloomPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
8
8
  protected _frameGraphTask: FrameGraphBloomTask;
9
+ _additionalConstructionParameters: [boolean, number];
9
10
  /**
10
11
  * Gets the frame graph task associated with this block
11
12
  */
@@ -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;A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AAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;kEAGhG;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 /**\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: 2 })\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: 3 })\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"]}
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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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: 2 })\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: 3 })\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"]}
@@ -6,6 +6,7 @@ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
6
6
  */
7
7
  export declare class NodeRenderGraphConvolutionPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
8
8
  protected _frameGraphTask: FrameGraphConvolutionTask;
9
+ _additionalConstructionParameters: [number[]];
9
10
  /**
10
11
  * Gets the frame graph task associated with this block
11
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"convolutionPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAs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AAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,0BAA0B,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC3F,OAAO,CAAC,CAAC;QACb,CAAC;QACD,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,0BAA0B,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7F,OAAO,CAAC,CAAC;QACb,CAAC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAW,MAAM,CAAC,KAAa;QAC3B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,4CAA4C,CAAC;IACxD,CAAC;CACJ;AApCG;IAVC,sBAAsB,CAAC,QAAQ,uCAA+B,YAAY,EAAE;QACzE,OAAO,EAAE;YACL,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;YAClC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;YAClC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;YAClC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE;YAC9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;YAC7B,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE;SAClC;KACJ,CAAC;wEAwBD;AAeL,aAAa,CAAC,oDAAoD,EAAE,0CAA0C,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 { FrameGraphConvolutionTask } from \"../../../Tasks/PostProcesses/convolutionTask\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\nimport { ThinConvolutionPostProcess } from \"../../../../PostProcesses/thinConvolutionPostProcess\";\r\n\r\n/**\r\n * Block that implements the convolution post process\r\n */\r\nexport class NodeRenderGraphConvolutionPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphConvolutionTask;\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 NodeRenderGraphConvolutionPostProcessBlock\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 kernel Array of 9 values corresponding to the 3x3 kernel to be applied\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, kernel: number[] = ThinConvolutionPostProcess.EmbossKernel) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [kernel];\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphConvolutionTask(this.name, frameGraph, new ThinConvolutionPostProcess(name, frameGraph.engine, kernel));\r\n }\r\n\r\n private _createTask(kernelIndex: number) {\r\n const sourceSamplingMode = this._frameGraphTask.sourceSamplingMode;\r\n\r\n this._frameGraphTask.dispose();\r\n\r\n let kernel = ThinConvolutionPostProcess.EmbossKernel;\r\n switch (kernelIndex) {\r\n case 0:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect0Kernel;\r\n break;\r\n case 1:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect1Kernel;\r\n break;\r\n case 2:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect2Kernel;\r\n break;\r\n case 3:\r\n kernel = ThinConvolutionPostProcess.SharpenKernel;\r\n break;\r\n case 4:\r\n kernel = ThinConvolutionPostProcess.EmbossKernel;\r\n break;\r\n case 5:\r\n kernel = ThinConvolutionPostProcess.GaussianKernel;\r\n break;\r\n }\r\n\r\n this._frameGraphTask = new FrameGraphConvolutionTask(this.name, this._frameGraph, new ThinConvolutionPostProcess(this.name, this._frameGraph.engine, kernel));\r\n this._frameGraphTask.sourceSamplingMode = sourceSamplingMode;\r\n\r\n this._additionalConstructionParameters = [kernel];\r\n }\r\n\r\n /** The quality of the blur effect */\r\n @editableInPropertyPage(\"Kernel\", PropertyTypeForEdition.List, \"PROPERTIES\", {\r\n options: [\r\n { label: \"EdgeDetect0\", value: 0 },\r\n { label: \"EdgeDetect1\", value: 1 },\r\n { label: \"EdgeDetect2\", value: 2 },\r\n { label: \"Sharpen\", value: 3 },\r\n { label: \"Emboss\", value: 4 },\r\n { label: \"Gaussian\", value: 5 },\r\n ],\r\n })\r\n public get kernel(): number {\r\n const kernel = this._frameGraphTask.postProcess.kernel;\r\n\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect0Kernel[index])) {\r\n return 0;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect1Kernel[index])) {\r\n return 1;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect2Kernel[index])) {\r\n return 2;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.SharpenKernel[index])) {\r\n return 3;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EmbossKernel[index])) {\r\n return 4;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.GaussianKernel[index])) {\r\n return 5;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set kernel(value: number) {\r\n this._createTask(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 \"NodeRenderGraphConvolutionPostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphConvolutionPostProcessBlock\", NodeRenderGraphConvolutionPostProcessBlock);\r\n"]}
1
+ {"version":3,"file":"convolutionPostProcess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,KAAK,EAAE,CAAC,EAAE;YAC7B,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE;SAClC;KACJ,CAAC;wEAwBD;AAeL,aAAa,CAAC,oDAAoD,EAAE,0CAA0C,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 { FrameGraphConvolutionTask } from \"../../../Tasks/PostProcesses/convolutionTask\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\nimport { ThinConvolutionPostProcess } from \"../../../../PostProcesses/thinConvolutionPostProcess\";\r\n\r\n/**\r\n * Block that implements the convolution post process\r\n */\r\nexport class NodeRenderGraphConvolutionPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphConvolutionTask;\r\n\r\n public override _additionalConstructionParameters: [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 NodeRenderGraphConvolutionPostProcessBlock\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 kernel Array of 9 values corresponding to the 3x3 kernel to be applied\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, kernel: number[] = ThinConvolutionPostProcess.EmbossKernel) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [kernel];\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphConvolutionTask(this.name, frameGraph, new ThinConvolutionPostProcess(name, frameGraph.engine, kernel));\r\n }\r\n\r\n private _createTask(kernelIndex: number) {\r\n const sourceSamplingMode = this._frameGraphTask.sourceSamplingMode;\r\n\r\n this._frameGraphTask.dispose();\r\n\r\n let kernel = ThinConvolutionPostProcess.EmbossKernel;\r\n switch (kernelIndex) {\r\n case 0:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect0Kernel;\r\n break;\r\n case 1:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect1Kernel;\r\n break;\r\n case 2:\r\n kernel = ThinConvolutionPostProcess.EdgeDetect2Kernel;\r\n break;\r\n case 3:\r\n kernel = ThinConvolutionPostProcess.SharpenKernel;\r\n break;\r\n case 4:\r\n kernel = ThinConvolutionPostProcess.EmbossKernel;\r\n break;\r\n case 5:\r\n kernel = ThinConvolutionPostProcess.GaussianKernel;\r\n break;\r\n }\r\n\r\n this._frameGraphTask = new FrameGraphConvolutionTask(this.name, this._frameGraph, new ThinConvolutionPostProcess(this.name, this._frameGraph.engine, kernel));\r\n this._frameGraphTask.sourceSamplingMode = sourceSamplingMode;\r\n\r\n this._additionalConstructionParameters = [kernel];\r\n }\r\n\r\n /** The quality of the blur effect */\r\n @editableInPropertyPage(\"Kernel\", PropertyTypeForEdition.List, \"PROPERTIES\", {\r\n options: [\r\n { label: \"EdgeDetect0\", value: 0 },\r\n { label: \"EdgeDetect1\", value: 1 },\r\n { label: \"EdgeDetect2\", value: 2 },\r\n { label: \"Sharpen\", value: 3 },\r\n { label: \"Emboss\", value: 4 },\r\n { label: \"Gaussian\", value: 5 },\r\n ],\r\n })\r\n public get kernel(): number {\r\n const kernel = this._frameGraphTask.postProcess.kernel;\r\n\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect0Kernel[index])) {\r\n return 0;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect1Kernel[index])) {\r\n return 1;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EdgeDetect2Kernel[index])) {\r\n return 2;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.SharpenKernel[index])) {\r\n return 3;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.EmbossKernel[index])) {\r\n return 4;\r\n }\r\n if (kernel.every((value, index) => value === ThinConvolutionPostProcess.GaussianKernel[index])) {\r\n return 5;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set kernel(value: number) {\r\n this._createTask(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 \"NodeRenderGraphConvolutionPostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphConvolutionPostProcessBlock\", NodeRenderGraphConvolutionPostProcessBlock);\r\n"]}
@@ -0,0 +1,94 @@
1
+ import type { Scene, FrameGraph, NodeRenderGraphConnectionPoint, NodeRenderGraphBuildState } from "../../../../index.js";
2
+ import { FrameGraphSSAO2RenderingPipelineTask } from "../../../Tasks/PostProcesses/ssao2RenderingPipelineTask.js";
3
+ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
4
+ /**
5
+ * Block that implements the SSAO2 post process
6
+ */
7
+ export declare class NodeRenderGraphSSAO2PostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
8
+ protected _frameGraphTask: FrameGraphSSAO2RenderingPipelineTask;
9
+ _additionalConstructionParameters: [number, number, number];
10
+ /**
11
+ * Gets the frame graph task associated with this block
12
+ */
13
+ get task(): FrameGraphSSAO2RenderingPipelineTask;
14
+ /**
15
+ * Create a new NodeRenderGraphSSAO2PostProcessBlock
16
+ * @param name defines the block name
17
+ * @param frameGraph defines the hosting frame graph
18
+ * @param scene defines the hosting scene
19
+ * @param ratioSSAO The ratio between the SSAO texture size and the source texture size (default: 1)
20
+ * @param ratioBlur The ratio between the SSAO blur texture size and the source texture size (default: 1)
21
+ * @param textureType The texture type used by the different post processes created by SSAO2 (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)
22
+ */
23
+ constructor(name: string, frameGraph: FrameGraph, scene: Scene, ratioSSAO?: number, ratioBlur?: number, textureType?: number);
24
+ private _createTask;
25
+ /** The texture type used by the different post processes created by SSAO2 */
26
+ get textureType(): number;
27
+ set textureType(value: number);
28
+ /** The ratio between the SSAO texture size and the source texture size */
29
+ get ratioSSAO(): number;
30
+ set ratioSSAO(value: number);
31
+ /** The ratio between the SSAO blur texture size and the source texture size */
32
+ get ratioBlur(): number;
33
+ set ratioBlur(value: number);
34
+ /** Number of samples used for the SSAO calculations. Default value is 8. */
35
+ get samples(): number;
36
+ set samples(value: number);
37
+ /** The strength of the SSAO post-process. Default value is 1.0. */
38
+ get totalStrength(): number;
39
+ set totalStrength(value: number);
40
+ /** The base color of the SSAO post-process. The final result is "base + ssao" between [0, 1] */
41
+ get base(): number;
42
+ set base(value: number);
43
+ /** Maximum depth value to still render AO. A smooth falloff makes the dimming more natural, so there will be no abrupt shading change. */
44
+ get maxZ(): number;
45
+ set maxZ(value: number);
46
+ /** In order to save performances, SSAO radius is clamped on close geometry. This ratio changes by how much. */
47
+ get minZAspect(): number;
48
+ set minZAspect(value: number);
49
+ /** The radius around the analyzed pixel used by the SSAO post-process. */
50
+ get radius(): number;
51
+ set radius(value: number);
52
+ /** Used in SSAO calculations to compensate for accuracy issues with depth values. */
53
+ get epsilon(): number;
54
+ set epsilon(value: number);
55
+ /** Indicates that the combine stage should use the current camera viewport to render the SSAO result on only a portion of the output texture. */
56
+ get useViewportInCombineStage(): boolean;
57
+ set useViewportInCombineStage(value: boolean);
58
+ /** Skips the denoising (blur) stage of the SSAO calculations. */
59
+ get bypassBlur(): boolean;
60
+ set bypassBlur(value: boolean);
61
+ /** Enables the configurable bilateral denoising (blurring) filter. */
62
+ get expensiveBlur(): boolean;
63
+ set expensiveBlur(value: boolean);
64
+ /** The number of samples the bilateral filter uses in both dimensions when denoising the SSAO calculations. */
65
+ get bilateralSamples(): number;
66
+ set bilateralSamples(value: number);
67
+ /** Controls the shape of the denoising kernel used by the bilateral filter. */
68
+ get bilateralSoften(): number;
69
+ set bilateralSoften(value: number);
70
+ /** How forgiving the bilateral denoiser should be when rejecting samples. */
71
+ get bilateralTolerance(): number;
72
+ set bilateralTolerance(value: number);
73
+ /**
74
+ * Gets the current class name
75
+ * @returns the class name
76
+ */
77
+ getClassName(): string;
78
+ /**
79
+ * Gets the camera input component
80
+ */
81
+ get camera(): NodeRenderGraphConnectionPoint;
82
+ /**
83
+ * Gets the geometry depth input component
84
+ */
85
+ get geomDepth(): NodeRenderGraphConnectionPoint;
86
+ /**
87
+ * Gets the geometry normal input component
88
+ */
89
+ get geomNormal(): NodeRenderGraphConnectionPoint;
90
+ protected _buildBlock(state: NodeRenderGraphBuildState): void;
91
+ protected _dumpPropertiesCode(): string;
92
+ serialize(): any;
93
+ _deserialize(serializationObject: any): void;
94
+ }