@onerjs/core 8.27.2 → 8.27.4

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 (150) hide show
  1. package/Cameras/arcRotateCamera.js +7 -5
  2. package/Cameras/arcRotateCamera.js.map +1 -1
  3. package/Cameras/targetCamera.d.ts +12 -0
  4. package/Cameras/targetCamera.js +19 -5
  5. package/Cameras/targetCamera.js.map +1 -1
  6. package/Decorators/nodeDecorator.d.ts +7 -5
  7. package/Decorators/nodeDecorator.js +7 -5
  8. package/Decorators/nodeDecorator.js.map +1 -1
  9. package/Engines/abstractEngine.js +2 -2
  10. package/Engines/abstractEngine.js.map +1 -1
  11. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +1 -1
  12. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +1 -1
  13. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +1 -1
  14. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +1 -1
  15. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +2 -2
  16. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.js +3 -3
  17. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js +1 -1
  18. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +3 -3
  19. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +1 -1
  20. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +22 -22
  21. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +1 -1
  22. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  23. package/FrameGraph/Node/Blocks/index.js +1 -0
  24. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  25. package/FrameGraph/Node/Blocks/inputBlock.js +1 -1
  26. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
  27. package/FrameGraph/Node/nodeRenderGraph.d.ts +2 -1
  28. package/FrameGraph/Node/nodeRenderGraph.js +8 -8
  29. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  30. package/FrameGraph/Passes/renderPass.js +3 -3
  31. package/FrameGraph/Passes/renderPass.js.map +1 -1
  32. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +7 -7
  33. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  34. package/FrameGraph/Tasks/Texture/clearTextureTask.js +1 -1
  35. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  36. package/FrameGraph/frameGraph.d.ts +4 -0
  37. package/FrameGraph/frameGraph.js +8 -0
  38. package/FrameGraph/frameGraph.js.map +1 -1
  39. package/FrameGraph/frameGraphRenderContext.d.ts +2 -1
  40. package/FrameGraph/frameGraphRenderContext.js +10 -3
  41. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  42. package/FrameGraph/frameGraphTextureManager.d.ts +32 -2
  43. package/FrameGraph/frameGraphTextureManager.js +139 -9
  44. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  45. package/Materials/Background/backgroundMaterial.js +1 -1
  46. package/Materials/Background/backgroundMaterial.js.map +1 -1
  47. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
  48. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +4 -4
  49. package/Materials/Node/Blocks/conditionalBlock.js +1 -1
  50. package/Materials/Node/Blocks/curveBlock.js +1 -1
  51. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +1 -1
  52. package/Materials/Node/Blocks/trigonometryBlock.js +1 -1
  53. package/Materials/Node/Blocks/waveBlock.js +1 -1
  54. package/Materials/PBR/openPbrMaterial.d.ts +2 -0
  55. package/Materials/PBR/openPbrMaterial.js +3 -1
  56. package/Materials/PBR/openPbrMaterial.js.map +1 -1
  57. package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
  58. package/Materials/PBR/pbrBaseMaterial.js +3 -1
  59. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  60. package/Materials/Textures/texture.js +13 -3
  61. package/Materials/Textures/texture.js.map +1 -1
  62. package/Materials/floatingOriginMatrixOverrides.js +11 -6
  63. package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
  64. package/Materials/materialHelper.functions.d.ts +3 -3
  65. package/Materials/materialHelper.functions.js +3 -3
  66. package/Materials/materialHelper.functions.js.map +1 -1
  67. package/Materials/standardMaterial.d.ts +2 -0
  68. package/Materials/standardMaterial.js +3 -1
  69. package/Materials/standardMaterial.js.map +1 -1
  70. package/Maths/math.vector.functions.d.ts +17 -0
  71. package/Maths/math.vector.functions.js +27 -0
  72. package/Maths/math.vector.functions.js.map +1 -1
  73. package/Meshes/Node/Blocks/Set/aggregatorBlock.js +1 -1
  74. package/Meshes/Node/Blocks/Set/setUVsBlock.js +1 -1
  75. package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -1
  76. package/Meshes/Node/Blocks/conditionBlock.js +1 -1
  77. package/Meshes/Node/Blocks/geometryCurveBlock.js +1 -1
  78. package/Meshes/Node/Blocks/geometryEaseBlock.js +1 -1
  79. package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +1 -1
  80. package/Meshes/Node/Blocks/mappingBlock.js +1 -1
  81. package/Meshes/Node/Blocks/mathBlock.js +1 -1
  82. package/Meshes/Node/Blocks/randomBlock.js +1 -1
  83. package/Meshes/abstractMesh.d.ts +4 -0
  84. package/Meshes/abstractMesh.js +7 -0
  85. package/Meshes/abstractMesh.js.map +1 -1
  86. package/Meshes/mesh.js +1 -1
  87. package/Meshes/mesh.js.map +1 -1
  88. package/Misc/screenshotTools.d.ts +63 -1
  89. package/Misc/screenshotTools.js +207 -4
  90. package/Misc/screenshotTools.js.map +1 -1
  91. package/Misc/textureTools.d.ts +6 -0
  92. package/Misc/textureTools.js +6 -1
  93. package/Misc/textureTools.js.map +1 -1
  94. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +1 -1
  95. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +1 -0
  96. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -1
  97. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +1 -0
  98. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
  99. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +1 -0
  100. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -1
  101. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +1 -0
  102. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
  103. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +1 -0
  104. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -1
  105. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +1 -0
  106. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
  107. package/Particles/Node/Blocks/index.d.ts +1 -0
  108. package/Particles/Node/Blocks/index.js +1 -0
  109. package/Particles/Node/Blocks/index.js.map +1 -1
  110. package/Particles/Node/Blocks/particleFresnelBlock.d.ts +34 -0
  111. package/Particles/Node/Blocks/particleFresnelBlock.js +74 -0
  112. package/Particles/Node/Blocks/particleFresnelBlock.js.map +1 -0
  113. package/Particles/Node/Blocks/particleInputBlock.js +2 -0
  114. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
  115. package/Particles/Node/Blocks/particleLerpBlock.d.ts +1 -1
  116. package/Particles/Node/Blocks/particleLerpBlock.js +1 -1
  117. package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -1
  118. package/Particles/Node/Blocks/particleLocalVariableBlock.js +1 -1
  119. package/Particles/Node/Blocks/particleMathBlock.js +1 -1
  120. package/Particles/Node/Blocks/particleRandomBlock.js +1 -1
  121. package/Particles/Node/Blocks/particleTrigonometryBlock.js +1 -1
  122. package/Particles/Node/Blocks/systemBlock.js +1 -1
  123. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +3 -1
  124. package/Particles/Node/Enums/nodeParticleContextualSources.js +2 -0
  125. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -1
  126. package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +3 -1
  127. package/Particles/Node/Enums/nodeParticleSystemSources.js +2 -0
  128. package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -1
  129. package/Particles/Node/nodeParticleBuildState.d.ts +1 -1
  130. package/Particles/Node/nodeParticleBuildState.js +4 -0
  131. package/Particles/Node/nodeParticleBuildState.js.map +1 -1
  132. package/Particles/gpuParticleSystem.js +1 -0
  133. package/Particles/gpuParticleSystem.js.map +1 -1
  134. package/Shaders/ShadersInclude/lightFragment.js +1 -1
  135. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  136. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +1 -1
  137. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  138. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  139. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  140. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js +1 -1
  141. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
  142. package/ShadersWGSL/default.fragment.js +1 -1
  143. package/ShadersWGSL/default.fragment.js.map +1 -1
  144. package/ShadersWGSL/default.vertex.js +2 -2
  145. package/ShadersWGSL/default.vertex.js.map +1 -1
  146. package/ShadersWGSL/pbr.vertex.js +2 -2
  147. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  148. package/node.js +4 -1
  149. package/node.js.map +1 -1
  150. package/package.json +1 -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", 8 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
174
+ editableInPropertyPage("Layer texture type", 9 /* 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 })
@@ -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", 8 /* PropertyTypeForEdition.TextureType */, "PROPERTIES")
188
+ editableInPropertyPage("Layer texture type", 9 /* 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 })
@@ -80,6 +80,6 @@ export class NodeRenderGraphBasePostProcessBlock extends NodeRenderGraphBlock {
80
80
  }
81
81
  }
82
82
  __decorate([
83
- editableInPropertyPage("Source sampling mode", 6 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
83
+ editableInPropertyPage("Source sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
84
84
  ], NodeRenderGraphBasePostProcessBlock.prototype, "sourceSamplingMode", null);
85
85
  //# sourceMappingURL=basePostProcessBlock.js.map
@@ -115,7 +115,7 @@ export class NodeRenderGraphCircleOfConfusionPostProcessBlock extends NodeRender
115
115
  }
116
116
  }
117
117
  __decorate([
118
- editableInPropertyPage("Depth sampling mode", 6 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
118
+ editableInPropertyPage("Depth sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
119
119
  ], NodeRenderGraphCircleOfConfusionPostProcessBlock.prototype, "depthSamplingMode", null);
120
120
  __decorate([
121
121
  editableInPropertyPage("Lens size", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
@@ -149,7 +149,7 @@ export class NodeRenderGraphDepthOfFieldPostProcessBlock extends NodeRenderGraph
149
149
  }
150
150
  }
151
151
  __decorate([
152
- editableInPropertyPage("Blur level", 4 /* PropertyTypeForEdition.List */, "PROPERTIES", {
152
+ editableInPropertyPage("Blur level", 5 /* PropertyTypeForEdition.List */, "PROPERTIES", {
153
153
  options: [
154
154
  { label: "Low", value: 0 /* ThinDepthOfFieldEffectBlurLevel.Low */ },
155
155
  { label: "Medium", value: 1 /* ThinDepthOfFieldEffectBlurLevel.Medium */ },
@@ -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", 6 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
164
+ editableInPropertyPage("Depth sampling mode", 7 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
165
165
  ], NodeRenderGraphDepthOfFieldPostProcessBlock.prototype, "depthSamplingMode", null);
166
166
  __decorate([
167
167
  editableInPropertyPage("Focal length", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES")
@@ -199,7 +199,7 @@ __decorate([
199
199
  editableInPropertyPage("Enabled", 0 /* PropertyTypeForEdition.Boolean */, "TONE MAPPING")
200
200
  ], NodeRenderGraphImageProcessingPostProcessBlock.prototype, "toneMappingEnabled", null);
201
201
  __decorate([
202
- editableInPropertyPage("Type", 4 /* PropertyTypeForEdition.List */, "TONE MAPPING", {
202
+ editableInPropertyPage("Type", 5 /* PropertyTypeForEdition.List */, "TONE MAPPING", {
203
203
  options: [
204
204
  { value: ImageProcessingConfiguration.TONEMAPPING_STANDARD, label: "Standard" },
205
205
  { value: ImageProcessingConfiguration.TONEMAPPING_ACES, label: "ACES" },
@@ -226,10 +226,10 @@ __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", 5 /* PropertyTypeForEdition.Color4 */, "VIGNETTE")
229
+ editableInPropertyPage("Color", 6 /* PropertyTypeForEdition.Color4 */, "VIGNETTE")
230
230
  ], NodeRenderGraphImageProcessingPostProcessBlock.prototype, "vignetteColor", null);
231
231
  __decorate([
232
- editableInPropertyPage("Blend mode", 4 /* PropertyTypeForEdition.List */, "VIGNETTE", {
232
+ editableInPropertyPage("Blend mode", 5 /* PropertyTypeForEdition.List */, "VIGNETTE", {
233
233
  options: [
234
234
  { value: ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY, label: "Multiply" },
235
235
  { value: ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE, label: "Opaque" },
@@ -429,7 +429,7 @@ export class NodeRenderGraphSSRPostProcessBlock extends NodeRenderGraphBasePostP
429
429
  }
430
430
  }
431
431
  __decorate([
432
- editableInPropertyPage("Texture type", 8 /* PropertyTypeForEdition.TextureType */, "SSR")
432
+ editableInPropertyPage("Texture type", 9 /* PropertyTypeForEdition.TextureType */, "SSR")
433
433
  ], NodeRenderGraphSSRPostProcessBlock.prototype, "textureType", null);
434
434
  __decorate([
435
435
  editableInPropertyPage("Debug", 0 /* PropertyTypeForEdition.Boolean */, "SSR")
@@ -199,7 +199,7 @@ export class NodeRenderGraphBaseShadowGeneratorBlock extends NodeRenderGraphBloc
199
199
  }
200
200
  }
201
201
  __decorate([
202
- editableInPropertyPage("Map size", 4 /* PropertyTypeForEdition.List */, "PROPERTIES", {
202
+ editableInPropertyPage("Map size", 5 /* PropertyTypeForEdition.List */, "PROPERTIES", {
203
203
  options: [
204
204
  { label: "128", value: 128 },
205
205
  { label: "256", value: 256 },
@@ -227,7 +227,7 @@ __decorate([
227
227
  editableInPropertyPage("Darkness", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
228
228
  ], NodeRenderGraphBaseShadowGeneratorBlock.prototype, "darkness", null);
229
229
  __decorate([
230
- editableInPropertyPage("Filter", 4 /* PropertyTypeForEdition.List */, "PROPERTIES", {
230
+ editableInPropertyPage("Filter", 5 /* PropertyTypeForEdition.List */, "PROPERTIES", {
231
231
  options: [
232
232
  { label: "None", value: ShadowGenerator.FILTER_NONE },
233
233
  { label: "Exponential", value: ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP },
@@ -241,7 +241,7 @@ __decorate([
241
241
  })
242
242
  ], NodeRenderGraphBaseShadowGeneratorBlock.prototype, "filter", null);
243
243
  __decorate([
244
- editableInPropertyPage("Filter quality", 4 /* PropertyTypeForEdition.List */, "PROPERTIES", {
244
+ editableInPropertyPage("Filter quality", 5 /* PropertyTypeForEdition.List */, "PROPERTIES", {
245
245
  options: [
246
246
  { label: "Low", value: ShadowGenerator.QUALITY_LOW },
247
247
  { label: "Medium", value: ShadowGenerator.QUALITY_MEDIUM },
@@ -162,7 +162,7 @@ export class NodeRenderGraphCascadedShadowGeneratorBlock extends NodeRenderGraph
162
162
  }
163
163
  }
164
164
  __decorate([
165
- editableInPropertyPage("Number of cascades", 4 /* PropertyTypeForEdition.List */, "CSM PROPERTIES", {
165
+ editableInPropertyPage("Number of cascades", 5 /* PropertyTypeForEdition.List */, "CSM PROPERTIES", {
166
166
  options: [
167
167
  { label: "2", value: 2 },
168
168
  { label: "3", value: 3 },
@@ -491,70 +491,70 @@ __decorate([
491
491
  editableInPropertyPage("Don't render if material depth write is disabled", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
492
492
  ], NodeRenderGraphGeometryRendererBlock.prototype, "dontRenderWhenMaterialDepthWriteIsDisabled", null);
493
493
  __decorate([
494
- editableInPropertyPage("View depth format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
494
+ editableInPropertyPage("View depth format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
495
495
  ], NodeRenderGraphGeometryRendererBlock.prototype, "viewDepthFormat", void 0);
496
496
  __decorate([
497
- editableInPropertyPage("View depth type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
497
+ editableInPropertyPage("View depth type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
498
498
  ], NodeRenderGraphGeometryRendererBlock.prototype, "viewDepthType", void 0);
499
499
  __decorate([
500
- editableInPropertyPage("Normalized view depth format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
500
+ editableInPropertyPage("Normalized view depth format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
501
501
  ], NodeRenderGraphGeometryRendererBlock.prototype, "normalizedViewDepthFormat", void 0);
502
502
  __decorate([
503
- editableInPropertyPage("Normalized view depth type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
503
+ editableInPropertyPage("Normalized view depth type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
504
504
  ], NodeRenderGraphGeometryRendererBlock.prototype, "normalizedViewDepthType", void 0);
505
505
  __decorate([
506
- editableInPropertyPage("Screen depth format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
506
+ editableInPropertyPage("Screen depth format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
507
507
  ], NodeRenderGraphGeometryRendererBlock.prototype, "screenDepthFormat", void 0);
508
508
  __decorate([
509
- editableInPropertyPage("Screen depth type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
509
+ editableInPropertyPage("Screen depth type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
510
510
  ], NodeRenderGraphGeometryRendererBlock.prototype, "screenDepthType", void 0);
511
511
  __decorate([
512
- editableInPropertyPage("View normal format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
512
+ editableInPropertyPage("View normal format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
513
513
  ], NodeRenderGraphGeometryRendererBlock.prototype, "viewNormalFormat", void 0);
514
514
  __decorate([
515
- editableInPropertyPage("View normal type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
515
+ editableInPropertyPage("View normal type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
516
516
  ], NodeRenderGraphGeometryRendererBlock.prototype, "viewNormalType", void 0);
517
517
  __decorate([
518
- editableInPropertyPage("World normal format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
518
+ editableInPropertyPage("World normal format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
519
519
  ], NodeRenderGraphGeometryRendererBlock.prototype, "worldNormalFormat", void 0);
520
520
  __decorate([
521
- editableInPropertyPage("World normal type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
521
+ editableInPropertyPage("World normal type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
522
522
  ], NodeRenderGraphGeometryRendererBlock.prototype, "worldNormalType", void 0);
523
523
  __decorate([
524
- editableInPropertyPage("Local position format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
524
+ editableInPropertyPage("Local position format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
525
525
  ], NodeRenderGraphGeometryRendererBlock.prototype, "localPositionFormat", void 0);
526
526
  __decorate([
527
- editableInPropertyPage("Local position type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
527
+ editableInPropertyPage("Local position type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
528
528
  ], NodeRenderGraphGeometryRendererBlock.prototype, "localPositionType", void 0);
529
529
  __decorate([
530
- editableInPropertyPage("World position format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
530
+ editableInPropertyPage("World position format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
531
531
  ], NodeRenderGraphGeometryRendererBlock.prototype, "worldPositionFormat", void 0);
532
532
  __decorate([
533
- editableInPropertyPage("World position type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
533
+ editableInPropertyPage("World position type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
534
534
  ], NodeRenderGraphGeometryRendererBlock.prototype, "worldPositionType", void 0);
535
535
  __decorate([
536
- editableInPropertyPage("Albedo format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
536
+ editableInPropertyPage("Albedo format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
537
537
  ], NodeRenderGraphGeometryRendererBlock.prototype, "albedoFormat", void 0);
538
538
  __decorate([
539
- editableInPropertyPage("Albedo type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
539
+ editableInPropertyPage("Albedo type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
540
540
  ], NodeRenderGraphGeometryRendererBlock.prototype, "albedoType", void 0);
541
541
  __decorate([
542
- editableInPropertyPage("Reflectivity format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
542
+ editableInPropertyPage("Reflectivity format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
543
543
  ], NodeRenderGraphGeometryRendererBlock.prototype, "reflectivityFormat", void 0);
544
544
  __decorate([
545
- editableInPropertyPage("Reflectivity type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
545
+ editableInPropertyPage("Reflectivity type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
546
546
  ], NodeRenderGraphGeometryRendererBlock.prototype, "reflectivityType", void 0);
547
547
  __decorate([
548
- editableInPropertyPage("Velocity format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
548
+ editableInPropertyPage("Velocity format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
549
549
  ], NodeRenderGraphGeometryRendererBlock.prototype, "velocityFormat", void 0);
550
550
  __decorate([
551
- editableInPropertyPage("Velocity type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
551
+ editableInPropertyPage("Velocity type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
552
552
  ], NodeRenderGraphGeometryRendererBlock.prototype, "velocityType", void 0);
553
553
  __decorate([
554
- editableInPropertyPage("Linear velocity format", 7 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
554
+ editableInPropertyPage("Linear velocity format", 8 /* PropertyTypeForEdition.TextureFormat */, "GEOMETRY BUFFERS")
555
555
  ], NodeRenderGraphGeometryRendererBlock.prototype, "linearVelocityFormat", void 0);
556
556
  __decorate([
557
- editableInPropertyPage("Linear velocity type", 8 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
557
+ editableInPropertyPage("Linear velocity type", 9 /* PropertyTypeForEdition.TextureType */, "GEOMETRY BUFFERS")
558
558
  ], NodeRenderGraphGeometryRendererBlock.prototype, "linearVelocityType", void 0);
559
559
  RegisterClass("BABYLON.NodeRenderGraphGeometryRendererBlock", NodeRenderGraphGeometryRendererBlock);
560
560
  //# sourceMappingURL=geometryRendererBlock.js.map
@@ -135,7 +135,7 @@ export class NodeRenderGraphClearBlock extends NodeRenderGraphBlock {
135
135
  }
136
136
  }
137
137
  __decorate([
138
- editableInPropertyPage("Color", 5 /* PropertyTypeForEdition.Color4 */)
138
+ editableInPropertyPage("Color", 6 /* PropertyTypeForEdition.Color4 */)
139
139
  ], NodeRenderGraphClearBlock.prototype, "color", null);
140
140
  __decorate([
141
141
  editableInPropertyPage("Clear color", 0 /* PropertyTypeForEdition.Boolean */, undefined, { embedded: true })
@@ -7,6 +7,7 @@ export * from "./resourceContainerBlock.js";
7
7
  export * from "./Layers/glowLayerBlock.js";
8
8
  export * from "./Layers/highlightLayerBlock.js";
9
9
  export * from "./PostProcesses/anaglyphPostProcessBlock.js";
10
+ export * from "./PostProcesses/basePostProcessBlock.js";
10
11
  export * from "./PostProcesses/blackAndWhitePostProcessBlock.js";
11
12
  export * from "./PostProcesses/bloomPostProcessBlock.js";
12
13
  export * from "./PostProcesses/blurPostProcessBlock.js";
@@ -7,6 +7,7 @@ export * from "./resourceContainerBlock.js";
7
7
  export * from "./Layers/glowLayerBlock.js";
8
8
  export * from "./Layers/highlightLayerBlock.js";
9
9
  export * from "./PostProcesses/anaglyphPostProcessBlock.js";
10
+ export * from "./PostProcesses/basePostProcessBlock.js";
10
11
  export * from "./PostProcesses/blackAndWhitePostProcessBlock.js";
11
12
  export * from "./PostProcesses/bloomPostProcessBlock.js";
12
13
  export * from "./PostProcesses/blurPostProcessBlock.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
@@ -88,7 +88,7 @@ export class NodeRenderGraphInputBlock extends NodeRenderGraphBlock {
88
88
  break;
89
89
  }
90
90
  case NodeRenderGraphBlockConnectionPointTypes.ObjectList:
91
- this.value = { meshes: [], particleSystems: [] };
91
+ this.value = { meshes: null, particleSystems: null };
92
92
  this.isExternal = true;
93
93
  break;
94
94
  case NodeRenderGraphBlockConnectionPointTypes.Camera:
@@ -1 +1 @@
1
- {"version":3,"file":"inputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/inputBlock.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAA0B,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAMvD;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IAc/D;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY,EAAE,OAAiD,wCAAwC,CAAC,SAAS;QACtK,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QA5B3B,iBAAY,GAAuC,IAAI,CAAC;QACxD,UAAK,GAA6C,wCAAwC,CAAC,SAAS,CAAC;QAE7G,0DA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AC;gBAC/E,0DAA0D;gBAC1D,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAC3H,CAAC;YACD,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;QAC/D,CAAC;IACL,CAAC;CACJ;AAhRU;IADN,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;6DAC1D;AAkR9B,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import type {\r\n NodeRenderGraphConnectionPoint,\r\n Scene,\r\n FrameGraph,\r\n NodeRenderGraphBuildState,\r\n Camera,\r\n InternalTexture,\r\n Nullable,\r\n FrameGraphTextureCreationOptions,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n IShadowLight,\r\n} from \"core/index\";\r\nimport { Observable } from \"../../../Misc/observable\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes\";\r\nimport { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { backbufferColorTextureHandle, backbufferDepthStencilTextureHandle } from \"../../../FrameGraph/frameGraphTypes\";\r\nimport { Constants } from \"../../../Engines/constants\";\r\n\r\nexport type NodeRenderGraphValueType = InternalTexture | Camera | FrameGraphObjectList | IShadowLight;\r\n\r\nexport type NodeRenderGraphInputCreationOptions = FrameGraphTextureCreationOptions;\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class NodeRenderGraphInputBlock extends NodeRenderGraphBlock {\r\n private _storedValue: Nullable<NodeRenderGraphValueType> = null;\r\n private _type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined;\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<NodeRenderGraphInputBlock>();\r\n\r\n /** Indicates that the input is externally managed */\r\n @editableInPropertyPage(\"Is external\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public isExternal = false;\r\n\r\n /** Gets or sets the options to create the input value */\r\n public creationOptions: NodeRenderGraphInputCreationOptions;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is Undefined)\r\n */\r\n public get type(): NodeRenderGraphBlockConnectionPointTypes {\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new NodeRenderGraphInputBlock\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 type defines the type of the input (can be set to NodeRenderGraphBlockConnectionPointTypes.Undefined)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined) {\r\n super(name, frameGraph, scene);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n this.registerOutput(\"output\", type);\r\n this.setDefaultValue();\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n switch (this.type) {\r\n case NodeRenderGraphBlockConnectionPointTypes.Texture:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureNormalizedViewDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedo:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureReflectivity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLocalPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLinearVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureIrradiance:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedoSqrt: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n types: [Constants.TEXTURETYPE_UNSIGNED_BYTE],\r\n formats: [Constants.TEXTUREFORMAT_RGBA],\r\n samples: 1,\r\n useSRGBBuffers: [false],\r\n },\r\n sizeIsPercentage: true,\r\n isHistoryTexture: false,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n types: [Constants.TEXTURETYPE_UNSIGNED_BYTE],\r\n formats: [Constants.TEXTUREFORMAT_DEPTH24_STENCIL8],\r\n useSRGBBuffers: [false],\r\n labels: [this.name],\r\n samples: 1,\r\n },\r\n sizeIsPercentage: true,\r\n isHistoryTexture: false,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.ObjectList:\r\n this.value = { meshes: [], particleSystems: [] };\r\n this.isExternal = true;\r\n break;\r\n case NodeRenderGraphBlockConnectionPointTypes.Camera:\r\n this.value = this._scene.cameras[0];\r\n this.isExternal = true;\r\n break;\r\n default:\r\n this.isExternal = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n */\r\n public get value(): Nullable<NodeRenderGraphValueType> {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: Nullable<NodeRenderGraphValueType>) {\r\n this._storedValue = value;\r\n this.output.value = undefined;\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the value as a specific type\r\n * @returns the value as a specific type\r\n */\r\n public getTypedValue<T extends NodeRenderGraphValueType>(): T {\r\n return this._storedValue as T;\r\n }\r\n\r\n /**\r\n * Gets the value as an internal texture\r\n * @returns The internal texture stored in value if value is an internal texture, otherwise null\r\n */\r\n public getInternalTextureFromValue(): Nullable<InternalTexture> {\r\n if ((this._storedValue as InternalTexture)._swapAndDie) {\r\n return this._storedValue as InternalTexture;\r\n }\r\n return null;\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 \"NodeRenderGraphInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Check if the block is a texture of any type\r\n * @returns true if the block is a texture\r\n */\r\n public isAnyTexture(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAll) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is the back buffer texture\r\n * @returns true if the connection point is the back buffer texture\r\n */\r\n public isBackBuffer() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBuffer) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is a depth/stencil attachment texture\r\n * @returns true if the connection point is a depth/stencil attachment texture\r\n */\r\n public isBackBufferDepthStencilAttachment() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is a camera\r\n * @returns true if the block is a camera\r\n */\r\n public isCamera(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.Camera) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is an object list\r\n * @returns true if the block is an object list\r\n */\r\n public isObjectList(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.ObjectList) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is a shadow light\r\n * @returns true if the block is a shadow light\r\n */\r\n public isShadowLight(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.ShadowLight) !== 0;\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isExternal) {\r\n if (this.isBackBuffer()) {\r\n this.output.value = backbufferColorTextureHandle;\r\n } else if (this.isBackBufferDepthStencilAttachment()) {\r\n this.output.value = backbufferDepthStencilTextureHandle;\r\n } else if (this.isCamera()) {\r\n this.output.value = this.getTypedValue<Camera>();\r\n } else if (this.isObjectList()) {\r\n this.output.value = this.getTypedValue<FrameGraphObjectList>();\r\n } else if (this.isShadowLight()) {\r\n this.output.value = this.getTypedValue<IShadowLight>();\r\n } else {\r\n if (this._storedValue === undefined || this._storedValue === null) {\r\n throw new Error(`NodeRenderGraphInputBlock: External input \"${this.name}\" is not set`);\r\n }\r\n const texture = this.getInternalTextureFromValue();\r\n if (texture) {\r\n this.output.value = this._frameGraph.textureManager.importTexture(this.name, texture, this.output.value as FrameGraphTextureHandle);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n if ((this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0) {\r\n const textureCreateOptions = this.creationOptions;\r\n\r\n if (!textureCreateOptions) {\r\n throw new Error(`NodeRenderGraphInputBlock: Creation options are missing for texture \"${this.name}\"`);\r\n }\r\n\r\n this.output.value = this._frameGraph.textureManager.createRenderTargetTexture(this.name, textureCreateOptions);\r\n }\r\n }\r\n\r\n public override dispose() {\r\n this._storedValue = null;\r\n this.onValueChangedObservable.clear();\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.isExternal = ${this.isExternal};`);\r\n if (this.isAnyTexture()) {\r\n if (!this.isExternal) {\r\n codes.push(`${this._codeVariableName}.creationOptions = ${JSON.stringify(this.creationOptions)};`);\r\n } else {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_TEXTURE; // TODO: set the external texture`);\r\n }\r\n } else if (this.isCamera()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_CAMERA; // TODO: set the external camera`);\r\n } else if (this.isObjectList()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_OBJECT_LIST; // TODO: set the external object list`);\r\n } else if (this.isShadowLight()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_SHADOW_LIGHT; // TODO: set the external shadow light`);\r\n }\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.type = this.type;\r\n serializationObject.isExternal = this.isExternal;\r\n if (this.creationOptions) {\r\n serializationObject.creationOptions = this.creationOptions;\r\n }\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this._type = serializationObject.type;\r\n this.output.type = this._type;\r\n this.isExternal = serializationObject.isExternal;\r\n if (serializationObject.creationOptions) {\r\n if (serializationObject.creationOptions.options.depthTextureFormat !== undefined) {\r\n // Backward compatibility - remove this code in the future\r\n serializationObject.creationOptions.options.formats = [serializationObject.creationOptions.options.depthTextureFormat];\r\n }\r\n this.creationOptions = serializationObject.creationOptions;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphInputBlock\", NodeRenderGraphInputBlock);\r\n"]}
1
+ {"version":3,"file":"inputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/inputBlock.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAA0B,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,4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B,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC/D,CAAC;QACD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;QACjD,IAAI,mBAAmB,CAAC,eAAe,EAAE,CAAC;YACtC,IAAI,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;gBAC/E,0DAA0D;gBAC1D,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAC3H,CAAC;YACD,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;QAC/D,CAAC;IACL,CAAC;CACJ;AAhRU;IADN,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;6DAC1D;AAkR9B,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import type {\r\n NodeRenderGraphConnectionPoint,\r\n Scene,\r\n FrameGraph,\r\n NodeRenderGraphBuildState,\r\n Camera,\r\n InternalTexture,\r\n Nullable,\r\n FrameGraphTextureCreationOptions,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n IShadowLight,\r\n} from \"core/index\";\r\nimport { Observable } from \"../../../Misc/observable\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes\";\r\nimport { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { backbufferColorTextureHandle, backbufferDepthStencilTextureHandle } from \"../../../FrameGraph/frameGraphTypes\";\r\nimport { Constants } from \"../../../Engines/constants\";\r\n\r\nexport type NodeRenderGraphValueType = InternalTexture | Camera | FrameGraphObjectList | IShadowLight;\r\n\r\nexport type NodeRenderGraphInputCreationOptions = FrameGraphTextureCreationOptions;\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class NodeRenderGraphInputBlock extends NodeRenderGraphBlock {\r\n private _storedValue: Nullable<NodeRenderGraphValueType> = null;\r\n private _type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined;\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<NodeRenderGraphInputBlock>();\r\n\r\n /** Indicates that the input is externally managed */\r\n @editableInPropertyPage(\"Is external\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public isExternal = false;\r\n\r\n /** Gets or sets the options to create the input value */\r\n public creationOptions: NodeRenderGraphInputCreationOptions;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is Undefined)\r\n */\r\n public get type(): NodeRenderGraphBlockConnectionPointTypes {\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new NodeRenderGraphInputBlock\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 type defines the type of the input (can be set to NodeRenderGraphBlockConnectionPointTypes.Undefined)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined) {\r\n super(name, frameGraph, scene);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n this.registerOutput(\"output\", type);\r\n this.setDefaultValue();\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n switch (this.type) {\r\n case NodeRenderGraphBlockConnectionPointTypes.Texture:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureNormalizedViewDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedo:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureReflectivity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLocalPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLinearVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureIrradiance:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedoSqrt: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n types: [Constants.TEXTURETYPE_UNSIGNED_BYTE],\r\n formats: [Constants.TEXTUREFORMAT_RGBA],\r\n samples: 1,\r\n useSRGBBuffers: [false],\r\n },\r\n sizeIsPercentage: true,\r\n isHistoryTexture: false,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n types: [Constants.TEXTURETYPE_UNSIGNED_BYTE],\r\n formats: [Constants.TEXTUREFORMAT_DEPTH24_STENCIL8],\r\n useSRGBBuffers: [false],\r\n labels: [this.name],\r\n samples: 1,\r\n },\r\n sizeIsPercentage: true,\r\n isHistoryTexture: false,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.ObjectList:\r\n this.value = { meshes: null, particleSystems: null };\r\n this.isExternal = true;\r\n break;\r\n case NodeRenderGraphBlockConnectionPointTypes.Camera:\r\n this.value = this._scene.cameras[0];\r\n this.isExternal = true;\r\n break;\r\n default:\r\n this.isExternal = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n */\r\n public get value(): Nullable<NodeRenderGraphValueType> {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: Nullable<NodeRenderGraphValueType>) {\r\n this._storedValue = value;\r\n this.output.value = undefined;\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the value as a specific type\r\n * @returns the value as a specific type\r\n */\r\n public getTypedValue<T extends NodeRenderGraphValueType>(): T {\r\n return this._storedValue as T;\r\n }\r\n\r\n /**\r\n * Gets the value as an internal texture\r\n * @returns The internal texture stored in value if value is an internal texture, otherwise null\r\n */\r\n public getInternalTextureFromValue(): Nullable<InternalTexture> {\r\n if ((this._storedValue as InternalTexture)._swapAndDie) {\r\n return this._storedValue as InternalTexture;\r\n }\r\n return null;\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 \"NodeRenderGraphInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Check if the block is a texture of any type\r\n * @returns true if the block is a texture\r\n */\r\n public isAnyTexture(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAll) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is the back buffer texture\r\n * @returns true if the connection point is the back buffer texture\r\n */\r\n public isBackBuffer() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBuffer) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is a depth/stencil attachment texture\r\n * @returns true if the connection point is a depth/stencil attachment texture\r\n */\r\n public isBackBufferDepthStencilAttachment() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is a camera\r\n * @returns true if the block is a camera\r\n */\r\n public isCamera(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.Camera) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is an object list\r\n * @returns true if the block is an object list\r\n */\r\n public isObjectList(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.ObjectList) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is a shadow light\r\n * @returns true if the block is a shadow light\r\n */\r\n public isShadowLight(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.ShadowLight) !== 0;\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isExternal) {\r\n if (this.isBackBuffer()) {\r\n this.output.value = backbufferColorTextureHandle;\r\n } else if (this.isBackBufferDepthStencilAttachment()) {\r\n this.output.value = backbufferDepthStencilTextureHandle;\r\n } else if (this.isCamera()) {\r\n this.output.value = this.getTypedValue<Camera>();\r\n } else if (this.isObjectList()) {\r\n this.output.value = this.getTypedValue<FrameGraphObjectList>();\r\n } else if (this.isShadowLight()) {\r\n this.output.value = this.getTypedValue<IShadowLight>();\r\n } else {\r\n if (this._storedValue === undefined || this._storedValue === null) {\r\n throw new Error(`NodeRenderGraphInputBlock: External input \"${this.name}\" is not set`);\r\n }\r\n const texture = this.getInternalTextureFromValue();\r\n if (texture) {\r\n this.output.value = this._frameGraph.textureManager.importTexture(this.name, texture, this.output.value as FrameGraphTextureHandle);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n if ((this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0) {\r\n const textureCreateOptions = this.creationOptions;\r\n\r\n if (!textureCreateOptions) {\r\n throw new Error(`NodeRenderGraphInputBlock: Creation options are missing for texture \"${this.name}\"`);\r\n }\r\n\r\n this.output.value = this._frameGraph.textureManager.createRenderTargetTexture(this.name, textureCreateOptions);\r\n }\r\n }\r\n\r\n public override dispose() {\r\n this._storedValue = null;\r\n this.onValueChangedObservable.clear();\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.isExternal = ${this.isExternal};`);\r\n if (this.isAnyTexture()) {\r\n if (!this.isExternal) {\r\n codes.push(`${this._codeVariableName}.creationOptions = ${JSON.stringify(this.creationOptions)};`);\r\n } else {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_TEXTURE; // TODO: set the external texture`);\r\n }\r\n } else if (this.isCamera()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_CAMERA; // TODO: set the external camera`);\r\n } else if (this.isObjectList()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_OBJECT_LIST; // TODO: set the external object list`);\r\n } else if (this.isShadowLight()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_SHADOW_LIGHT; // TODO: set the external shadow light`);\r\n }\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.type = this.type;\r\n serializationObject.isExternal = this.isExternal;\r\n if (this.creationOptions) {\r\n serializationObject.creationOptions = this.creationOptions;\r\n }\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this._type = serializationObject.type;\r\n this.output.type = this._type;\r\n this.isExternal = serializationObject.isExternal;\r\n if (serializationObject.creationOptions) {\r\n if (serializationObject.creationOptions.options.depthTextureFormat !== undefined) {\r\n // Backward compatibility - remove this code in the future\r\n serializationObject.creationOptions.options.formats = [serializationObject.creationOptions.options.depthTextureFormat];\r\n }\r\n this.creationOptions = serializationObject.creationOptions;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphInputBlock\", NodeRenderGraphInputBlock);\r\n"]}
@@ -27,8 +27,9 @@ export declare class NodeRenderGraph {
27
27
  attachedBlocks: NodeRenderGraphBlock[];
28
28
  /**
29
29
  * Observable raised when the node render graph is built
30
+ * Note that this is the same observable as the one in the underlying FrameGraph!
30
31
  */
31
- onBuildObservable: Observable<NodeRenderGraph>;
32
+ get onBuildObservable(): Observable<FrameGraph>;
32
33
  /**
33
34
  * Observable raised when an error is detected
34
35
  */
@@ -32,6 +32,13 @@ export class NodeRenderGraph {
32
32
  }
33
33
  return undefined;
34
34
  }
35
+ /**
36
+ * Observable raised when the node render graph is built
37
+ * Note that this is the same observable as the one in the underlying FrameGraph!
38
+ */
39
+ get onBuildObservable() {
40
+ return this._frameGraph.onBuildObservable;
41
+ }
35
42
  /**
36
43
  * Gets the frame graph used by this node render graph
37
44
  */
@@ -64,10 +71,6 @@ export class NodeRenderGraph {
64
71
  * Gets an array of blocks that needs to be serialized even if they are not yet connected
65
72
  */
66
73
  this.attachedBlocks = [];
67
- /**
68
- * Observable raised when the node render graph is built
69
- */
70
- this.onBuildObservable = new Observable();
71
74
  /**
72
75
  * Observable raised when an error is detected
73
76
  */
@@ -224,9 +227,7 @@ export class NodeRenderGraph {
224
227
  }
225
228
  finally {
226
229
  this._buildId = NodeRenderGraph._BuildIdGenerator++;
227
- if (state.emitErrors(this.onBuildErrorObservable)) {
228
- this.onBuildObservable.notifyObservers(this);
229
- }
230
+ state.emitErrors(this.onBuildErrorObservable);
230
231
  }
231
232
  }
232
233
  _autoFillExternalInputs() {
@@ -570,7 +571,6 @@ export class NodeRenderGraph {
570
571
  this._engine.onResizeObservable.remove(this._resizeObserver);
571
572
  this._resizeObserver = null;
572
573
  this.attachedBlocks.length = 0;
573
- this.onBuildObservable.clear();
574
574
  this.onBuildErrorObservable.clear();
575
575
  }
576
576
  /**