@babylonjs/core 7.43.0 → 7.44.1

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 (341) hide show
  1. package/Actions/actionEvent.d.ts +4 -4
  2. package/Buffers/bufferUtils.d.ts +8 -1
  3. package/Buffers/bufferUtils.js +15 -0
  4. package/Buffers/bufferUtils.js.map +1 -1
  5. package/Culling/Helper/boundingInfoHelper.d.ts +2 -9
  6. package/Culling/Helper/boundingInfoHelper.js +2 -9
  7. package/Culling/Helper/boundingInfoHelper.js.map +1 -1
  8. package/Debug/debugLayer.d.ts +4 -0
  9. package/Debug/debugLayer.js +9 -0
  10. package/Debug/debugLayer.js.map +1 -1
  11. package/Engines/Extensions/engine.renderTarget.js +2 -4
  12. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  13. package/Engines/WebGPU/Extensions/engine.renderTarget.js +2 -4
  14. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  15. package/Engines/abstractEngine.d.ts +19 -1
  16. package/Engines/abstractEngine.js +48 -9
  17. package/Engines/abstractEngine.js.map +1 -1
  18. package/Engines/engine.d.ts +6 -3
  19. package/Engines/engine.js +2 -20
  20. package/Engines/engine.js.map +1 -1
  21. package/Engines/renderTargetWrapper.js +2 -2
  22. package/Engines/renderTargetWrapper.js.map +1 -1
  23. package/Engines/thinEngine.js +1 -5
  24. package/Engines/thinEngine.js.map +1 -1
  25. package/Engines/webgpuEngine.js +1 -0
  26. package/Engines/webgpuEngine.js.map +1 -1
  27. package/FlowGraph/flowGraphConnection.d.ts +1 -1
  28. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.d.ts +16 -12
  29. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +63 -27
  30. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js.map +1 -1
  31. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.d.ts +72 -0
  32. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +197 -0
  33. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js.map +1 -0
  34. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.d.ts +42 -0
  35. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +78 -0
  36. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -0
  37. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.d.ts +3 -19
  38. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +3 -49
  39. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -1
  40. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +3 -19
  41. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +3 -49
  42. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
  43. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.d.ts +3 -19
  44. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +3 -49
  45. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -1
  46. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.d.ts +2 -17
  47. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +3 -45
  48. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -1
  49. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.d.ts +2 -17
  50. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +3 -44
  51. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -1
  52. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.d.ts +3 -19
  53. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +3 -49
  54. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -1
  55. package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.d.ts +47 -0
  56. package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.js +65 -0
  57. package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.js.map +1 -0
  58. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +4 -0
  59. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +9 -0
  60. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  61. package/FrameGraph/Node/Blocks/index.d.ts +2 -0
  62. package/FrameGraph/Node/Blocks/index.js +2 -0
  63. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  64. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +4 -2
  65. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +2 -0
  66. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
  67. package/FrameGraph/Node/nodeRenderGraph.d.ts +3 -2
  68. package/FrameGraph/Node/nodeRenderGraph.js +4 -3
  69. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  70. package/FrameGraph/Node/nodeRenderGraphBlock.js +4 -4
  71. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
  72. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +8 -0
  73. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +10 -0
  74. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -1
  75. package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.d.ts +21 -0
  76. package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.js +31 -0
  77. package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.js.map +1 -0
  78. package/FrameGraph/Passes/pass.d.ts +1 -0
  79. package/FrameGraph/Passes/pass.js +4 -1
  80. package/FrameGraph/Passes/pass.js.map +1 -1
  81. package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +81 -0
  82. package/FrameGraph/Tasks/Layers/baseLayerTask.js +304 -0
  83. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -0
  84. package/FrameGraph/Tasks/Layers/glowLayerTask.d.ts +3 -40
  85. package/FrameGraph/Tasks/Layers/glowLayerTask.js +4 -158
  86. package/FrameGraph/Tasks/Layers/glowLayerTask.js.map +1 -1
  87. package/FrameGraph/Tasks/Layers/highlightLayerTask.d.ts +21 -0
  88. package/FrameGraph/Tasks/Layers/highlightLayerTask.js +32 -0
  89. package/FrameGraph/Tasks/Layers/highlightLayerTask.js.map +1 -0
  90. package/FrameGraph/Tasks/Misc/executeTask.d.ts +2 -2
  91. package/FrameGraph/Tasks/Misc/executeTask.js +1 -0
  92. package/FrameGraph/Tasks/Misc/executeTask.js.map +1 -1
  93. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +1 -1
  94. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -1
  95. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +1 -1
  96. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
  97. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +5 -4
  98. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -1
  99. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +5 -4
  100. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -1
  101. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +2 -4
  102. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
  103. package/FrameGraph/Tasks/PostProcesses/passTask.d.ts +29 -0
  104. package/FrameGraph/Tasks/PostProcesses/passTask.js +31 -0
  105. package/FrameGraph/Tasks/PostProcesses/passTask.js.map +1 -0
  106. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +4 -2
  107. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
  108. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +2 -2
  109. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +1 -0
  110. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  111. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.d.ts +2 -2
  112. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +1 -0
  113. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  114. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +2 -2
  115. package/FrameGraph/Tasks/Texture/clearTextureTask.js +1 -0
  116. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  117. package/FrameGraph/Tasks/Texture/copyToTextureTask.js +1 -1
  118. package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
  119. package/FrameGraph/frameGraph.d.ts +8 -2
  120. package/FrameGraph/frameGraph.js +31 -5
  121. package/FrameGraph/frameGraph.js.map +1 -1
  122. package/FrameGraph/frameGraphRenderContext.d.ts +10 -0
  123. package/FrameGraph/frameGraphRenderContext.js +14 -0
  124. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  125. package/FrameGraph/frameGraphTask.d.ts +3 -2
  126. package/FrameGraph/frameGraphTask.js +12 -2
  127. package/FrameGraph/frameGraphTask.js.map +1 -1
  128. package/FrameGraph/frameGraphTextureManager.d.ts +1 -1
  129. package/FrameGraph/frameGraphTypes.d.ts +4 -0
  130. package/FrameGraph/frameGraphTypes.js.map +1 -1
  131. package/FrameGraph/index.d.ts +2 -0
  132. package/FrameGraph/index.js +2 -0
  133. package/FrameGraph/index.js.map +1 -1
  134. package/Gizmos/planeRotationGizmo.js +10 -0
  135. package/Gizmos/planeRotationGizmo.js.map +1 -1
  136. package/Helpers/environmentHelper.js +7 -6
  137. package/Helpers/environmentHelper.js.map +1 -1
  138. package/Inputs/scene.inputManager.js +2 -2
  139. package/Inputs/scene.inputManager.js.map +1 -1
  140. package/Layers/effectLayer.d.ts +1 -1
  141. package/Layers/effectLayer.js.map +1 -1
  142. package/Layers/glowLayer.d.ts +2 -14
  143. package/Layers/glowLayer.js +34 -36
  144. package/Layers/glowLayer.js.map +1 -1
  145. package/Layers/highlightLayer.d.ts +13 -74
  146. package/Layers/highlightLayer.js +123 -309
  147. package/Layers/highlightLayer.js.map +1 -1
  148. package/Layers/index.d.ts +1 -0
  149. package/Layers/index.js +1 -0
  150. package/Layers/index.js.map +1 -1
  151. package/Layers/thinEffectLayer.d.ts +55 -2
  152. package/Layers/thinEffectLayer.js +66 -0
  153. package/Layers/thinEffectLayer.js.map +1 -1
  154. package/Layers/thinGlowLayer.d.ts +3 -6
  155. package/Layers/thinGlowLayer.js +4 -1
  156. package/Layers/thinGlowLayer.js.map +1 -1
  157. package/Layers/thinHighlightLayer.d.ts +197 -0
  158. package/Layers/thinHighlightLayer.js +417 -0
  159. package/Layers/thinHighlightLayer.js.map +1 -0
  160. package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +6 -2
  161. package/Materials/GreasedLine/greasedLinePluginMaterial.js +8 -2
  162. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  163. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js +11 -3
  164. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js.map +1 -1
  165. package/Materials/GreasedLine/greasedLineSimpleMaterial.d.ts +1 -0
  166. package/Materials/GreasedLine/greasedLineSimpleMaterial.js +1 -0
  167. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
  168. package/Materials/Node/Blocks/PBR/reflectionBlock.js +1 -3
  169. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  170. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +3 -3
  171. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  172. package/Materials/Node/nodeMaterial.d.ts +4 -2
  173. package/Materials/Node/nodeMaterial.js +9 -6
  174. package/Materials/Node/nodeMaterial.js.map +1 -1
  175. package/Materials/PBR/pbrBaseMaterial.js +1 -0
  176. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  177. package/Materials/Textures/Filtering/hdrFiltering.js +1 -0
  178. package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
  179. package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +69 -0
  180. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +187 -0
  181. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -0
  182. package/Materials/Textures/hdrCubeTexture.d.ts +5 -1
  183. package/Materials/Textures/hdrCubeTexture.js +29 -3
  184. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  185. package/Materials/Textures/index.d.ts +4 -0
  186. package/Materials/Textures/index.js +4 -0
  187. package/Materials/Textures/index.js.map +1 -1
  188. package/Materials/effect.d.ts +5 -0
  189. package/Materials/effect.js +15 -0
  190. package/Materials/effect.js.map +1 -1
  191. package/Materials/standardMaterial.d.ts +1 -2
  192. package/Materials/standardMaterial.js +0 -2
  193. package/Materials/standardMaterial.js.map +1 -1
  194. package/Meshes/Builders/planeBuilder.js +2 -2
  195. package/Meshes/Builders/planeBuilder.js.map +1 -1
  196. package/Meshes/Compression/dracoCodec.d.ts +4 -4
  197. package/Meshes/Compression/dracoCodec.js.map +1 -1
  198. package/Meshes/Compression/dracoCompression.d.ts +5 -3
  199. package/Meshes/Compression/dracoCompression.js +24 -11
  200. package/Meshes/Compression/dracoCompression.js.map +1 -1
  201. package/Meshes/Compression/dracoCompressionWorker.d.ts +16 -30
  202. package/Meshes/Compression/dracoCompressionWorker.js +128 -22
  203. package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
  204. package/Meshes/Compression/dracoDecoder.d.ts +4 -9
  205. package/Meshes/Compression/dracoDecoder.js +5 -5
  206. package/Meshes/Compression/dracoDecoder.js.map +1 -1
  207. package/Meshes/Compression/dracoDecoder.types.d.ts +52 -0
  208. package/Meshes/Compression/dracoDecoder.types.js +2 -0
  209. package/Meshes/Compression/dracoDecoder.types.js.map +1 -0
  210. package/Meshes/Compression/dracoEncoder.d.ts +95 -0
  211. package/Meshes/Compression/dracoEncoder.js +245 -0
  212. package/Meshes/Compression/dracoEncoder.js.map +1 -0
  213. package/Meshes/Compression/dracoEncoder.types.d.ts +82 -0
  214. package/Meshes/Compression/dracoEncoder.types.js +2 -0
  215. package/Meshes/Compression/dracoEncoder.types.js.map +1 -0
  216. package/Meshes/Compression/index.d.ts +1 -0
  217. package/Meshes/Compression/index.js +1 -0
  218. package/Meshes/Compression/index.js.map +1 -1
  219. package/Meshes/Compression/meshoptCompression.js +17 -2
  220. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  221. package/Meshes/Compression/test/integration/draco.test.d.ts +1 -0
  222. package/Meshes/Compression/test/integration/draco.test.js +30 -0
  223. package/Meshes/Compression/test/integration/draco.test.js.map +1 -0
  224. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +92 -2
  225. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +286 -10
  226. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  227. package/Meshes/GreasedLine/greasedLineBaseMesh.js +4 -2
  228. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  229. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +1 -1
  230. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
  231. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -1
  232. package/Meshes/csg.js +4 -0
  233. package/Meshes/csg.js.map +1 -1
  234. package/Meshes/mesh.d.ts +2 -2
  235. package/Meshes/transformNode.d.ts +4 -1
  236. package/Meshes/transformNode.js +6 -1
  237. package/Meshes/transformNode.js.map +1 -1
  238. package/Misc/copyTextureToTexture.js +1 -1
  239. package/Misc/copyTextureToTexture.js.map +1 -1
  240. package/Misc/decorators.serialization.js +2 -0
  241. package/Misc/decorators.serialization.js.map +1 -1
  242. package/Misc/greasedLineTools.d.ts +1 -1
  243. package/Misc/logger.d.ts +2 -1
  244. package/Misc/logger.js +2 -1
  245. package/Misc/logger.js.map +1 -1
  246. package/Misc/screenshotTools.js +58 -5
  247. package/Misc/screenshotTools.js.map +1 -1
  248. package/Misc/tools.d.ts +21 -1
  249. package/Misc/tools.js +33 -0
  250. package/Misc/tools.js.map +1 -1
  251. package/Morph/morphTargetManager.d.ts +1 -0
  252. package/Morph/morphTargetManager.js +6 -1
  253. package/Morph/morphTargetManager.js.map +1 -1
  254. package/Particles/particleHelper.js +2 -1
  255. package/Particles/particleHelper.js.map +1 -1
  256. package/Particles/particleSystemSet.d.ts +1 -0
  257. package/Particles/particleSystemSet.js +1 -0
  258. package/Particles/particleSystemSet.js.map +1 -1
  259. package/Particles/pointsCloudSystem.d.ts +3 -3
  260. package/Particles/webgl2ParticleSystem.d.ts +1 -1
  261. package/Particles/webgl2ParticleSystem.js +1 -2
  262. package/Particles/webgl2ParticleSystem.js.map +1 -1
  263. package/Physics/v2/Plugins/havokPlugin.d.ts +2 -2
  264. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -1
  265. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  266. package/PostProcesses/index.d.ts +1 -0
  267. package/PostProcesses/index.js +1 -0
  268. package/PostProcesses/index.js.map +1 -1
  269. package/PostProcesses/passPostProcess.d.ts +2 -3
  270. package/PostProcesses/passPostProcess.js +36 -48
  271. package/PostProcesses/passPostProcess.js.map +1 -1
  272. package/PostProcesses/thinPassPostProcess.d.ts +48 -0
  273. package/PostProcesses/thinPassPostProcess.js +113 -0
  274. package/PostProcesses/thinPassPostProcess.js.map +1 -0
  275. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +1 -1
  276. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
  277. package/Rendering/depthRenderer.js +1 -1
  278. package/Rendering/depthRenderer.js.map +1 -1
  279. package/Rendering/iblCdfGenerator.d.ts +13 -5
  280. package/Rendering/iblCdfGenerator.js +67 -10
  281. package/Rendering/iblCdfGenerator.js.map +1 -1
  282. package/Rendering/objectRenderer.d.ts +5 -3
  283. package/Rendering/objectRenderer.js +5 -3
  284. package/Rendering/objectRenderer.js.map +1 -1
  285. package/Rendering/renderingManager.d.ts +4 -0
  286. package/Rendering/renderingManager.js +1 -0
  287. package/Rendering/renderingManager.js.map +1 -1
  288. package/Shaders/ShadersInclude/gaussianSplatting.js +6 -6
  289. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  290. package/Shaders/ShadersInclude/intersectionFunctions.d.ts +5 -0
  291. package/Shaders/ShadersInclude/intersectionFunctions.js +14 -0
  292. package/Shaders/ShadersInclude/intersectionFunctions.js.map +1 -0
  293. package/Shaders/ShadersInclude/pbrBlockReflection.js +13 -8
  294. package/Shaders/ShadersInclude/pbrBlockReflection.js.map +1 -1
  295. package/Shaders/background.fragment.d.ts +1 -0
  296. package/Shaders/background.fragment.js +3 -5
  297. package/Shaders/background.fragment.js.map +1 -1
  298. package/Shaders/gaussianSplatting.vertex.js +2 -1
  299. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  300. package/Shaders/hdrIrradianceFiltering.fragment.d.ts +9 -0
  301. package/Shaders/hdrIrradianceFiltering.fragment.js +25 -0
  302. package/Shaders/hdrIrradianceFiltering.fragment.js.map +1 -0
  303. package/Shaders/hdrIrradianceFiltering.vertex.d.ts +5 -0
  304. package/Shaders/hdrIrradianceFiltering.vertex.js +15 -0
  305. package/Shaders/hdrIrradianceFiltering.vertex.js.map +1 -0
  306. package/Shaders/pbr.fragment.js +1 -3
  307. package/Shaders/pbr.fragment.js.map +1 -1
  308. package/ShadersWGSL/ShadersInclude/intersectionFunctions.d.ts +5 -0
  309. package/ShadersWGSL/ShadersInclude/intersectionFunctions.js +14 -0
  310. package/ShadersWGSL/ShadersInclude/intersectionFunctions.js.map +1 -0
  311. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js +13 -8
  312. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js.map +1 -1
  313. package/ShadersWGSL/background.fragment.d.ts +1 -0
  314. package/ShadersWGSL/background.fragment.js +3 -5
  315. package/ShadersWGSL/background.fragment.js.map +1 -1
  316. package/ShadersWGSL/greasedLine.fragment.js +9 -3
  317. package/ShadersWGSL/greasedLine.fragment.js.map +1 -1
  318. package/ShadersWGSL/greasedLine.vertex.js +12 -2
  319. package/ShadersWGSL/greasedLine.vertex.js.map +1 -1
  320. package/ShadersWGSL/hdrIrradianceFiltering.fragment.d.ts +9 -0
  321. package/ShadersWGSL/hdrIrradianceFiltering.fragment.js +26 -0
  322. package/ShadersWGSL/hdrIrradianceFiltering.fragment.js.map +1 -0
  323. package/ShadersWGSL/hdrIrradianceFiltering.vertex.d.ts +5 -0
  324. package/ShadersWGSL/hdrIrradianceFiltering.vertex.js +16 -0
  325. package/ShadersWGSL/hdrIrradianceFiltering.vertex.js.map +1 -0
  326. package/ShadersWGSL/outline.fragment.js +1 -1
  327. package/ShadersWGSL/outline.fragment.js.map +1 -1
  328. package/ShadersWGSL/passCube.fragment.js +1 -1
  329. package/ShadersWGSL/passCube.fragment.js.map +1 -1
  330. package/ShadersWGSL/pbr.fragment.js +1 -3
  331. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  332. package/XR/features/WebXRDepthSensing.d.ts +24 -2
  333. package/XR/features/WebXRDepthSensing.js +320 -26
  334. package/XR/features/WebXRDepthSensing.js.map +1 -1
  335. package/XR/features/WebXRHandTracking.js +8 -7
  336. package/XR/features/WebXRHandTracking.js.map +1 -1
  337. package/package.json +1 -1
  338. package/scene.js +9 -5
  339. package/scene.js.map +1 -1
  340. package/types.d.ts +4 -0
  341. package/types.js.map +1 -1
@@ -1,14 +1,13 @@
1
1
  import { __decorate } from "../../../../tslib.es6.js";
2
- import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
3
2
  import { RegisterClass } from "../../../../Misc/typeStore.js";
4
- import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
5
3
  import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
6
4
  import { FrameGraphExtractHighlightsTask } from "../../../Tasks/PostProcesses/extractHighlightsTask.js";
7
5
  import { ThinExtractHighlightsPostProcess } from "../../../../PostProcesses/thinExtractHighlightsPostProcess.js";
6
+ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
8
7
  /**
9
8
  * Block that implements the extract highlights post process
10
9
  */
11
- export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBlock {
10
+ export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
12
11
  /**
13
12
  * Gets the frame graph task associated with this block
14
13
  */
@@ -23,24 +22,9 @@ export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRender
23
22
  */
24
23
  constructor(name, frameGraph, scene) {
25
24
  super(name, frameGraph, scene);
26
- this.registerInput("source", NodeRenderGraphBlockConnectionPointTypes.Texture);
27
- this.registerInput("destination", NodeRenderGraphBlockConnectionPointTypes.Texture, true);
28
- this._addDependenciesInput();
29
- this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
30
- this.source.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
31
- this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);
32
- this.output._typeConnectionSource = () => {
33
- return this.destination.isConnected ? this.destination : this.source;
34
- };
25
+ this._finalizeInputOutputRegistering();
35
26
  this._frameGraphTask = new FrameGraphExtractHighlightsTask(this.name, frameGraph, new ThinExtractHighlightsPostProcess(name, scene.getEngine()));
36
27
  }
37
- /** Sampling mode used to sample from the source texture */
38
- get sourceSamplingMode() {
39
- return this._frameGraphTask.sourceSamplingMode;
40
- }
41
- set sourceSamplingMode(value) {
42
- this._frameGraphTask.sourceSamplingMode = value;
43
- }
44
28
  /** The luminance threshold, pixels below this value will be set to black. */
45
29
  get threshold() {
46
30
  return this._frameGraphTask.postProcess.threshold;
@@ -55,51 +39,21 @@ export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRender
55
39
  getClassName() {
56
40
  return "NodeRenderGraphExtractHighlightsPostProcessBlock";
57
41
  }
58
- /**
59
- * Gets the source input component
60
- */
61
- get source() {
62
- return this._inputs[0];
63
- }
64
- /**
65
- * Gets the destination input component
66
- */
67
- get destination() {
68
- return this._inputs[1];
69
- }
70
- /**
71
- * Gets the output component
72
- */
73
- get output() {
74
- return this._outputs[0];
75
- }
76
- _buildBlock(state) {
77
- super._buildBlock(state);
78
- this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
79
- this._frameGraphTask.sourceTexture = this.source.connectedPoint?.value;
80
- this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value;
81
- }
82
42
  _dumpPropertiesCode() {
83
43
  const codes = [];
84
44
  codes.push(`${this._codeVariableName}.threshold = ${this.threshold};`);
85
- codes.push(`${this._codeVariableName}.sourceSamplingMode = ${this.sourceSamplingMode};`);
86
45
  return super._dumpPropertiesCode() + codes.join("\n");
87
46
  }
88
47
  serialize() {
89
48
  const serializationObject = super.serialize();
90
49
  serializationObject.threshold = this.threshold;
91
- serializationObject.sourceSamplingMode = this.sourceSamplingMode;
92
50
  return serializationObject;
93
51
  }
94
52
  _deserialize(serializationObject) {
95
53
  super._deserialize(serializationObject);
96
54
  this.threshold = serializationObject.threshold;
97
- this.sourceSamplingMode = serializationObject.sourceSamplingMode;
98
55
  }
99
56
  }
100
- __decorate([
101
- editableInPropertyPage("Source sampling mode", 6 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
102
- ], NodeRenderGraphExtractHighlightsPostProcessBlock.prototype, "sourceSamplingMode", null);
103
57
  __decorate([
104
58
  editableInPropertyPage("Threshold", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
105
59
  ], NodeRenderGraphExtractHighlightsPostProcessBlock.prototype, "threshold", null);
@@ -1 +1 @@
1
- {"version":3,"file":"extractHighlightsPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,8DAAkE;AAC5G,OAAO,EAAE,gCAAgC,EAAE,sEAA4D;AAEvG;;GAEG;AACH,MAAM,OAAO,gDAAiD,SAAQ,oBAAoB;IAGtF;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,wCAAwC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1F,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,wCAAwC,CAAC,YAAY,CAAC,CAAC;QAErF,IAAI,CAAC,MAAM,CAAC,+BAA+B,CAAC,wCAAwC,CAAC,uBAAuB,CAAC,CAAC;QAC9G,IAAI,CA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,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;iFAGnG;AAiEL,aAAa,CAAC,0DAA0D,EAAE,gDAAgD,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraphTextureHandle, FrameGraph } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphExtractHighlightsTask } from \"core/FrameGraph/Tasks/PostProcesses/extractHighlightsTask\";\r\nimport { ThinExtractHighlightsPostProcess } from \"core/PostProcesses/thinExtractHighlightsPostProcess\";\r\n\r\n/**\r\n * Block that implements the extract highlights post process\r\n */\r\nexport class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphExtractHighlightsTask;\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 ExtractHighlightsPostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"source\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture, true);\r\n this._addDependenciesInput();\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.source.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\r\n this.output._typeConnectionSource = () => {\r\n return this.destination.isConnected ? this.destination : this.source;\r\n };\r\n\r\n this._frameGraphTask = new FrameGraphExtractHighlightsTask(this.name, frameGraph, new ThinExtractHighlightsPostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /** Sampling mode used to sample from the source texture */\r\n @editableInPropertyPage(\"Source sampling mode\", PropertyTypeForEdition.SamplingMode, \"PROPERTIES\")\r\n public get sourceSamplingMode() {\r\n return this._frameGraphTask.sourceSamplingMode;\r\n }\r\n\r\n public set sourceSamplingMode(value: number) {\r\n this._frameGraphTask.sourceSamplingMode = value;\r\n }\r\n\r\n /** The luminance threshold, pixels below this value will be set to black. */\r\n @editableInPropertyPage(\"Threshold\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get threshold(): number {\r\n return this._frameGraphTask.postProcess.threshold;\r\n }\r\n\r\n public set threshold(value: number) {\r\n this._frameGraphTask.postProcess.threshold = 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 \"NodeRenderGraphExtractHighlightsPostProcessBlock\";\r\n }\r\n\r\n /**\r\n * Gets the source input component\r\n */\r\n public get source(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the destination input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n\r\n this._frameGraphTask.sourceTexture = this.source.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value as FrameGraphTextureHandle;\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}.sourceSamplingMode = ${this.sourceSamplingMode};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.threshold = this.threshold;\r\n serializationObject.sourceSamplingMode = this.sourceSamplingMode;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.threshold = serializationObject.threshold;\r\n this.sourceSamplingMode = serializationObject.sourceSamplingMode;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphExtractHighlightsPostProcessBlock\", NodeRenderGraphExtractHighlightsPostProcessBlock);\r\n"]}
1
+ {"version":3,"file":"extractHighlightsPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,8DAAkE;AAC5G,OAAO,EAAE,gCAAgC,EAAE,sEAA4D;AACvG,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,gDAAiD,SAAQ,mCAAmC;IAGrG;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAA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cesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphExtractHighlightsTask } from \"core/FrameGraph/Tasks/PostProcesses/extractHighlightsTask\";\r\nimport { ThinExtractHighlightsPostProcess } from \"core/PostProcesses/thinExtractHighlightsPostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the extract highlights post process\r\n */\r\nexport class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphExtractHighlightsTask;\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 ExtractHighlightsPostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphExtractHighlightsTask(this.name, frameGraph, new ThinExtractHighlightsPostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /** The luminance threshold, pixels below this value will be set to black. */\r\n @editableInPropertyPage(\"Threshold\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get threshold(): number {\r\n return this._frameGraphTask.postProcess.threshold;\r\n }\r\n\r\n public set threshold(value: number) {\r\n this._frameGraphTask.postProcess.threshold = 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 \"NodeRenderGraphExtractHighlightsPostProcessBlock\";\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 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 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 }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphExtractHighlightsPostProcessBlock\", NodeRenderGraphExtractHighlightsPostProcessBlock);\r\n"]}
@@ -0,0 +1,47 @@
1
+ import type { Scene, FrameGraph } from "../../../../index.js";
2
+ import { FrameGraphPassCubeTask, FrameGraphPassTask } from "../../../Tasks/PostProcesses/passTask.js";
3
+ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock";
4
+ /**
5
+ * Block that implements the pass post process
6
+ */
7
+ export declare class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
8
+ protected _frameGraphTask: FrameGraphPassTask;
9
+ /**
10
+ * Gets the frame graph task associated with this block
11
+ */
12
+ get task(): FrameGraphPassTask;
13
+ /**
14
+ * Create a new NodeRenderGraphPassPostProcessBlock
15
+ * @param name defines the block name
16
+ * @param frameGraph defines the hosting frame graph
17
+ * @param scene defines the hosting scene
18
+ */
19
+ constructor(name: string, frameGraph: FrameGraph, scene: Scene);
20
+ /**
21
+ * Gets the current class name
22
+ * @returns the class name
23
+ */
24
+ getClassName(): string;
25
+ }
26
+ /**
27
+ * Block that implements the pass cube post process
28
+ */
29
+ export declare class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
30
+ protected _frameGraphTask: FrameGraphPassCubeTask;
31
+ /**
32
+ * Gets the frame graph task associated with this block
33
+ */
34
+ get task(): FrameGraphPassCubeTask;
35
+ /**
36
+ * Create a new NodeRenderGraphPassCubePostProcessBlock
37
+ * @param name defines the block name
38
+ * @param frameGraph defines the hosting frame graph
39
+ * @param scene defines the hosting scene
40
+ */
41
+ constructor(name: string, frameGraph: FrameGraph, scene: Scene);
42
+ /**
43
+ * Gets the current class name
44
+ * @returns the class name
45
+ */
46
+ getClassName(): string;
47
+ }
@@ -0,0 +1,65 @@
1
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
2
+ import { FrameGraphPassCubeTask, FrameGraphPassTask } from "../../../Tasks/PostProcesses/passTask.js";
3
+ import { ThinPassCubePostProcess, ThinPassPostProcess } from "../../../../PostProcesses/thinPassPostProcess.js";
4
+ import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
5
+ /**
6
+ * Block that implements the pass post process
7
+ */
8
+ export class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
9
+ /**
10
+ * Gets the frame graph task associated with this block
11
+ */
12
+ get task() {
13
+ return this._frameGraphTask;
14
+ }
15
+ /**
16
+ * Create a new NodeRenderGraphPassPostProcessBlock
17
+ * @param name defines the block name
18
+ * @param frameGraph defines the hosting frame graph
19
+ * @param scene defines the hosting scene
20
+ */
21
+ constructor(name, frameGraph, scene) {
22
+ super(name, frameGraph, scene);
23
+ this._finalizeInputOutputRegistering();
24
+ this._frameGraphTask = new FrameGraphPassTask(this.name, frameGraph, new ThinPassPostProcess(name, scene.getEngine()));
25
+ }
26
+ /**
27
+ * Gets the current class name
28
+ * @returns the class name
29
+ */
30
+ getClassName() {
31
+ return "NodeRenderGraphPassPostProcessBlock";
32
+ }
33
+ }
34
+ RegisterClass("BABYLON.NodeRenderGraphPassPostProcessBlock", NodeRenderGraphPassPostProcessBlock);
35
+ /**
36
+ * Block that implements the pass cube post process
37
+ */
38
+ export class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
39
+ /**
40
+ * Gets the frame graph task associated with this block
41
+ */
42
+ get task() {
43
+ return this._frameGraphTask;
44
+ }
45
+ /**
46
+ * Create a new NodeRenderGraphPassCubePostProcessBlock
47
+ * @param name defines the block name
48
+ * @param frameGraph defines the hosting frame graph
49
+ * @param scene defines the hosting scene
50
+ */
51
+ constructor(name, frameGraph, scene) {
52
+ super(name, frameGraph, scene);
53
+ this._finalizeInputOutputRegistering();
54
+ this._frameGraphTask = new FrameGraphPassCubeTask(this.name, frameGraph, new ThinPassCubePostProcess(name, scene.getEngine()));
55
+ }
56
+ /**
57
+ * Gets the current class name
58
+ * @returns the class name
59
+ */
60
+ getClassName() {
61
+ return "NodeRenderGraphPassCubePostProcessBlock";
62
+ }
63
+ }
64
+ RegisterClass("BABYLON.NodeRenderGraphPassCubePostProcessBlock", NodeRenderGraphPassCubePostProcessBlock);
65
+ //# sourceMappingURL=passPostProcessBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,iDAAqD;AAC1G,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,yDAA+C;AACtG,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,mCAAoC,SAAQ,mCAAmC;IAGxF;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC3H,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,qCAAqC,CAAC;IACjD,CAAC;CACJ;AAED,aAAa,CAAC,6CAA6C,EAAE,mCAAmC,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,OAAO,uCAAwC,SAAQ,mCAAmC;IAG5F;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACnI,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,yCAAyC,CAAC;IACrD,CAAC;CACJ;AAED,aAAa,CAAC,iDAAiD,EAAE,uCAAuC,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { FrameGraphPassCubeTask, FrameGraphPassTask } from \"core/FrameGraph/Tasks/PostProcesses/passTask\";\r\nimport { ThinPassCubePostProcess, ThinPassPostProcess } from \"core/PostProcesses/thinPassPostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the pass post process\r\n */\r\nexport class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphPassTask;\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 NodeRenderGraphPassPostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphPassTask(this.name, frameGraph, new ThinPassPostProcess(name, scene.getEngine()));\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 \"NodeRenderGraphPassPostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphPassPostProcessBlock\", NodeRenderGraphPassPostProcessBlock);\r\n\r\n/**\r\n * Block that implements the pass cube post process\r\n */\r\nexport class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphPassCubeTask;\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 NodeRenderGraphPassCubePostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphPassCubeTask(this.name, frameGraph, new ThinPassCubePostProcess(name, scene.getEngine()));\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 \"NodeRenderGraphPassCubePostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphPassCubePostProcessBlock\", NodeRenderGraphPassCubePostProcessBlock);\r\n"]}
@@ -60,6 +60,10 @@ export declare class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGr
60
60
  * Gets the output depth component
61
61
  */
62
62
  get outputDepth(): NodeRenderGraphConnectionPoint;
63
+ /**
64
+ * Gets the objectRenderer component
65
+ */
66
+ get objectRenderer(): NodeRenderGraphConnectionPoint;
63
67
  protected _buildBlock(state: NodeRenderGraphBuildState): void;
64
68
  protected _dumpPropertiesCode(): string;
65
69
  serialize(): any;
@@ -3,6 +3,7 @@ import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
3
3
  import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
4
4
  import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
5
5
  import { NodeRenderGraphConnectionPoint } from "../../nodeRenderGraphBlockConnectionPoint.js";
6
+ import { NodeRenderGraphConnectionPointCustomObject } from "../../nodeRenderGraphConnectionPointCustomObject.js";
6
7
  /**
7
8
  * @internal
8
9
  */
@@ -29,6 +30,7 @@ export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock
29
30
  this.registerInput("shadowGenerators", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);
30
31
  this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
31
32
  this.registerOutput("outputDepth", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
33
+ this.registerOutput("objectRenderer", NodeRenderGraphBlockConnectionPointTypes.Object, new NodeRenderGraphConnectionPointCustomObject("objectRenderer", this, 1 /* NodeRenderGraphConnectionPointDirection.Output */, NodeRenderGraphBaseObjectRendererBlock, "NodeRenderGraphBaseObjectRendererBlock"));
32
34
  this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);
33
35
  this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);
34
36
  this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);
@@ -104,10 +106,17 @@ export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock
104
106
  get outputDepth() {
105
107
  return this._outputs[1];
106
108
  }
109
+ /**
110
+ * Gets the objectRenderer component
111
+ */
112
+ get objectRenderer() {
113
+ return this._outputs[2];
114
+ }
107
115
  _buildBlock(state) {
108
116
  super._buildBlock(state);
109
117
  this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
110
118
  this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the "outputDepth" texture of the task
119
+ this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself
111
120
  this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value;
112
121
  this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value;
113
122
  this._frameGraphTask.camera = this.camera.connectedPoint?.value;
@@ -1 +1 @@
1
- {"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAE3F;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,oBAAoB;IAG5E;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QACpF,IAAI,CAAC,aAAa,CAA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G,IAAI,CAAC,iBAAiB,gBAAgB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACvE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAlIG;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n // eslint-disable-next-line import/no-internal-modules\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n\r\n this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n container.inputs.forEach((input) => {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators!.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n });\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,0CAA0C,EAAE,MAAM,kDAAkD,CAAC;AAE9G;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,oBAAoB;IAG5E;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QACpF,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,wCAAwC,CAAC,uCAAuC,EAAE,IAAI,CAAC,CAAC;QACpH,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,MAAM,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,wCAAwC,CAAC,UAAU,CAAC,CAAC;QACnF,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,wCAAwC,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;QAEvG,IAAI,CAAC,cAAc,CA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B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACvE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAzIG;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n // eslint-disable-next-line import/no-internal-modules\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointDirection } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\r\n \"objectRenderer\",\r\n NodeRenderGraphBlockConnectionPointTypes.Object,\r\n new NodeRenderGraphConnectionPointCustomObject(\r\n \"objectRenderer\",\r\n this,\r\n NodeRenderGraphConnectionPointDirection.Output,\r\n NodeRenderGraphBaseObjectRendererBlock,\r\n \"NodeRenderGraphBaseObjectRendererBlock\"\r\n )\r\n );\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the objectRenderer component\r\n */\r\n public get objectRenderer(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[2];\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; // the value of the output connection point is the \"output\" texture of the task\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself\r\n\r\n this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n container.inputs.forEach((input) => {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators!.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n });\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n"]}
@@ -4,12 +4,14 @@ export * from "./inputBlock";
4
4
  export * from "./outputBlock";
5
5
  export * from "./resourceContainerBlock";
6
6
  export * from "./Layers/glowLayerBlock";
7
+ export * from "./Layers/highlightLayerBlock";
7
8
  export * from "./PostProcesses/blackAndWhitePostProcessBlock";
8
9
  export * from "./PostProcesses/bloomPostProcessBlock";
9
10
  export * from "./PostProcesses/blurPostProcessBlock";
10
11
  export * from "./PostProcesses/circleOfConfusionPostProcessBlock";
11
12
  export * from "./PostProcesses/depthOfFieldPostProcessBlock";
12
13
  export * from "./PostProcesses/extractHighlightsPostProcessBlock";
14
+ export * from "./PostProcesses/passPostProcessBlock";
13
15
  export * from "./Rendering/csmShadowGeneratorBlock";
14
16
  export * from "./Rendering/cullObjectsBlock";
15
17
  export * from "./Rendering/geometryRendererBlock";
@@ -4,12 +4,14 @@ export * from "./inputBlock.js";
4
4
  export * from "./outputBlock.js";
5
5
  export * from "./resourceContainerBlock.js";
6
6
  export * from "./Layers/glowLayerBlock.js";
7
+ export * from "./Layers/highlightLayerBlock.js";
7
8
  export * from "./PostProcesses/blackAndWhitePostProcessBlock.js";
8
9
  export * from "./PostProcesses/bloomPostProcessBlock.js";
9
10
  export * from "./PostProcesses/blurPostProcessBlock.js";
10
11
  export * from "./PostProcesses/circleOfConfusionPostProcessBlock.js";
11
12
  export * from "./PostProcesses/depthOfFieldPostProcessBlock.js";
12
13
  export * from "./PostProcesses/extractHighlightsPostProcessBlock.js";
14
+ export * from "./PostProcesses/passPostProcessBlock.js";
13
15
  export * from "./Rendering/csmShadowGeneratorBlock.js";
14
16
  export * from "./Rendering/cullObjectsBlock.js";
15
17
  export * from "./Rendering/geometryRendererBlock.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AAExC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAElE,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * 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\n\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/cullObjectsBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\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,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,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AAErD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * 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/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/cullObjectsBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\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,4 +1,4 @@
1
- import type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask } from "../../../index.js";
1
+ import type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask, FrameGraphObjectRendererTask } from "../../../index.js";
2
2
  /**
3
3
  * Interface used to configure the node render graph editor
4
4
  */
@@ -84,6 +84,8 @@ export declare enum NodeRenderGraphBlockConnectionPointTypes {
84
84
  BasedOnInput = 536870912,
85
85
  /** Undefined */
86
86
  Undefined = 1073741824,
87
+ /** Custom object */
88
+ Object = 2147483648,
87
89
  /** Bitmask of all types */
88
90
  All = 4294967295
89
91
  }
@@ -110,4 +112,4 @@ export declare enum NodeRenderGraphConnectionPointDirection {
110
112
  /**
111
113
  * Defines the type of a connection point value
112
114
  */
113
- export type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList | IShadowLight | FrameGraphShadowGeneratorTask;
115
+ export type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList | IShadowLight | FrameGraphShadowGeneratorTask | FrameGraphObjectRendererTask;
@@ -57,6 +57,8 @@ export var NodeRenderGraphBlockConnectionPointTypes;
57
57
  NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["BasedOnInput"] = 536870912] = "BasedOnInput";
58
58
  /** Undefined */
59
59
  NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Undefined"] = 1073741824] = "Undefined";
60
+ /** Custom object */
61
+ NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Object"] = 2147483648] = "Object";
60
62
  /** Bitmask of all types */
61
63
  NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["All"] = 4294967295] = "All";
62
64
  })(NodeRenderGraphBlockConnectionPointTypes || (NodeRenderGraphBlockConnectionPointTypes = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"nodeRenderGraphTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Types/nodeRenderGraphTypes.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,MAAM,CAAN,IAAY,wCA4DX;AA5DD,WAAY,wCAAwC;IAChD,8BAA8B;I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D,KAAjD,iDAAiD,QAOlE;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,uCAKjB;AALD,WAAkB,uCAAuC;IACrD,YAAY;IACZ,uGAAK,CAAA;IACL,aAAa;IACb,yGAAM,CAAA;AACV,CAAC,EALiB,uCAAuC,KAAvC,uCAAuC,QAKxD","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask } from \"core/index\";\r\n\r\n/**\r\n * Interface used to configure the node render graph editor\r\n */\r\nexport interface INodeRenderGraphEditorOptions {\r\n /** Define the URL to load node editor script from */\r\n editorURL?: string;\r\n /** Additional configuration for the FGE */\r\n nodeRenderGraphEditorConfig?: {\r\n backgroundColor?: Color4;\r\n hostScene?: Scene;\r\n };\r\n}\r\n\r\n/**\r\n * Options that can be passed to the node render graph build method\r\n */\r\nexport interface INodeRenderGraphCreateOptions {\r\n /** If true, textures created by the node render graph will be visible in the inspector, for easier debugging (default: false) */\r\n debugTextures?: boolean;\r\n /** Rebuild the node render graph when the screen is resized (default: true) */\r\n rebuildGraphOnEngineResize?: boolean;\r\n /** Defines if the build should log activity (default: false) */\r\n verbose?: boolean;\r\n /** Defines if the autoConfigure method should be called when initializing blocks (default: false) */\r\n autoConfigure?: boolean;\r\n /** If true, external inputs like object lists and cameras will be filled with default values, taken from the scene. Note that external textures are not concerned (default: true). */\r\n autoFillExternalInputs?: boolean;\r\n}\r\n\r\n/**\r\n * Defines the kind of connection point for node render graph nodes\r\n */\r\nexport enum NodeRenderGraphBlockConnectionPointTypes {\r\n /** General purpose texture */\r\n Texture = 0x00000001,\r\n /** Back buffer color texture */\r\n TextureBackBuffer = 0x00000002,\r\n /** Back buffer depth/stencil attachment */\r\n TextureBackBufferDepthStencilAttachment = 0x00000004,\r\n /** Depth/stencil attachment */\r\n TextureDepthStencilAttachment = 0x00000008,\r\n /** Depth (in view space) geometry texture */\r\n TextureViewDepth = 0x00000010,\r\n /** Normal (in view space) geometry texture */\r\n TextureViewNormal = 0x00000020,\r\n /** Albedo geometry texture */\r\n TextureAlbedo = 0x00000040,\r\n /** Reflectivity geometry texture */\r\n TextureReflectivity = 0x00000080,\r\n /** Position (in world space) geometry texture */\r\n TextureWorldPosition = 0x00000100,\r\n /** Velocity geometry texture */\r\n TextureVelocity = 0x00000200,\r\n /** Irradiance geometry texture */\r\n TextureIrradiance = 0x00000400,\r\n /** Albedo (sqrt) geometry texture */\r\n TextureAlbedoSqrt = 0x00000800,\r\n /** Depth (in screen space) geometry texture */\r\n TextureScreenDepth = 0x00001000,\r\n /** Normal (in world space) geometry texture */\r\n TextureWorldNormal = 0x00002000,\r\n /** Position (in local space) geometry texture */\r\n TextureLocalPosition = 0x00004000,\r\n /** Linear velocity geometry texture */\r\n TextureLinearVelocity = 0x00008000,\r\n\r\n /** Bit field for all textures but back buffer depth/stencil */\r\n TextureAllButBackBufferDepthStencil = 0x000ffffb,\r\n /** Bit field for all textures but back buffer color and depth/stencil */\r\n TextureAllButBackBuffer = 0x000ffff9,\r\n /** Bit field for all textures */\r\n TextureAll = 0x000fffff,\r\n\r\n /** Resource container */\r\n ResourceContainer = 0x00100000,\r\n /** Shadow generator */\r\n ShadowGenerator = 0x00200000,\r\n /** Light */\r\n ShadowLight = 0x00400000,\r\n /** Camera */\r\n Camera = 0x01000000,\r\n /** List of objects (meshes, particle systems, sprites) */\r\n ObjectList = 0x02000000,\r\n\r\n /** Detect type based on connection */\r\n AutoDetect = 0x10000000,\r\n /** Output type that will be defined by input type */\r\n BasedOnInput = 0x20000000,\r\n /** Undefined */\r\n Undefined = 0x40000000,\r\n /** Bitmask of all types */\r\n All = 0xffffffff,\r\n}\r\n\r\n/**\r\n * Enum used to define the compatibility state between two connection points\r\n */\r\nexport const enum NodeRenderGraphConnectionPointCompatibilityStates {\r\n /** Points are compatibles */\r\n Compatible,\r\n /** Points are incompatible because of their types */\r\n TypeIncompatible,\r\n /** Points are incompatible because they are in the same hierarchy **/\r\n HierarchyIssue,\r\n}\r\n\r\n/**\r\n * Defines the direction of a connection point\r\n */\r\nexport const enum NodeRenderGraphConnectionPointDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\n/**\r\n * Defines the type of a connection point value\r\n */\r\nexport type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList | IShadowLight | FrameGraphShadowGeneratorTask;\r\n"]}
1
+ {"version":3,"file":"nodeRenderGraphTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Types/nodeRenderGraphTypes.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,MAAM,CAAN,IAAY,wCA8DX;AA9DD,WAAY,wCAAwC;IAChD,8BAA8B;IAC9B,6GAAoB,CAAA;IACpB,gCAAgC;IAChC,iIAA8B,CAAA;IAC9B,2CAA2C;IAC3C,6KAAoD,CAAA;IACpD,+BAA+B;IAC/B,yJAA0C,CAAA;IAC1C,6CAA6C;IAC7C,gIAA6B,CAAA;IAC7B,8CAA8C;IAC9C,kIAA8B,CAAA;IAC9B,8BAA8B;IAC9B,0HAA0B,CAAA;IAC1B,oCAAoC;IACpC,uIAAgC,CAAA;IAChC,iDAAiD;IACjD,yIAAiC,CAAA;IACjC,gCAAgC;IAChC,+HAA4B,CAAA;IAC5B,kCAAkC;IAClC,oIAA8B,CAAA;IAC9B,qCAAqC;IACrC,oIAA8B,CAAA;IAC9B,+CAA+C;IAC/C,sIAA+B,CAAA;IAC/B,+CAA+C;IAC/C,sIAA+B,CAAA;IAC/B,iDAAiD;IACjD,2IAAiC,CAAA;IACjC,uCAAuC;IACvC,6IAAkC,CAAA;IAElC,+DAA+D;IAC/D,2KAAgD,CAAA;IAChD,yEAAyE;IACzE,mJAAoC,CAAA;IACpC,iCAAiC;IACjC,yHAAuB,CAAA;IAEvB,yBAAyB;IACzB,uIAA8B,CAAA;IAC9B,uBAAuB;IACvB,mIAA4B,CAAA;IAC5B,YAAY;IACZ,2HAAwB,CAAA;IACxB,aAAa;IACb,kHAAmB,CAAA;IACnB,0DAA0D;IAC1D,0HAAuB,CAAA;IAEvB,sCAAsC;IACtC,2HAAuB,CAAA;IACvB,qDAAqD;IACrD,+HAAyB,CAAA;IACzB,gBAAgB;IAChB,0HAAsB,CAAA;IACtB,oBAAoB;IACpB,oHAAmB,CAAA;IACnB,2BAA2B;IAC3B,8GAAgB,CAAA;AACpB,CAAC,EA9DW,wCAAwC,KAAxC,wCAAwC,QA8DnD;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,iDAOjB;AAPD,WAAkB,iDAAiD;IAC/D,6BAA6B;IAC7B,qIAAU,CAAA;IACV,qDAAqD;IACrD,iJAAgB,CAAA;IAChB,sEAAsE;IACtE,6IAAc,CAAA;AAClB,CAAC,EAPiB,iDAAiD,KAAjD,iDAAiD,QAOlE;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,uCAKjB;AALD,WAAkB,uCAAuC;IACrD,YAAY;IACZ,uGAAK,CAAA;IACL,aAAa;IACb,yGAAM,CAAA;AACV,CAAC,EALiB,uCAAuC,KAAvC,uCAAuC,QAKxD","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask, FrameGraphObjectRendererTask } from \"core/index\";\r\n\r\n/**\r\n * Interface used to configure the node render graph editor\r\n */\r\nexport interface INodeRenderGraphEditorOptions {\r\n /** Define the URL to load node editor script from */\r\n editorURL?: string;\r\n /** Additional configuration for the FGE */\r\n nodeRenderGraphEditorConfig?: {\r\n backgroundColor?: Color4;\r\n hostScene?: Scene;\r\n };\r\n}\r\n\r\n/**\r\n * Options that can be passed to the node render graph build method\r\n */\r\nexport interface INodeRenderGraphCreateOptions {\r\n /** If true, textures created by the node render graph will be visible in the inspector, for easier debugging (default: false) */\r\n debugTextures?: boolean;\r\n /** Rebuild the node render graph when the screen is resized (default: true) */\r\n rebuildGraphOnEngineResize?: boolean;\r\n /** Defines if the build should log activity (default: false) */\r\n verbose?: boolean;\r\n /** Defines if the autoConfigure method should be called when initializing blocks (default: false) */\r\n autoConfigure?: boolean;\r\n /** If true, external inputs like object lists and cameras will be filled with default values, taken from the scene. Note that external textures are not concerned (default: true). */\r\n autoFillExternalInputs?: boolean;\r\n}\r\n\r\n/**\r\n * Defines the kind of connection point for node render graph nodes\r\n */\r\nexport enum NodeRenderGraphBlockConnectionPointTypes {\r\n /** General purpose texture */\r\n Texture = 0x00000001,\r\n /** Back buffer color texture */\r\n TextureBackBuffer = 0x00000002,\r\n /** Back buffer depth/stencil attachment */\r\n TextureBackBufferDepthStencilAttachment = 0x00000004,\r\n /** Depth/stencil attachment */\r\n TextureDepthStencilAttachment = 0x00000008,\r\n /** Depth (in view space) geometry texture */\r\n TextureViewDepth = 0x00000010,\r\n /** Normal (in view space) geometry texture */\r\n TextureViewNormal = 0x00000020,\r\n /** Albedo geometry texture */\r\n TextureAlbedo = 0x00000040,\r\n /** Reflectivity geometry texture */\r\n TextureReflectivity = 0x00000080,\r\n /** Position (in world space) geometry texture */\r\n TextureWorldPosition = 0x00000100,\r\n /** Velocity geometry texture */\r\n TextureVelocity = 0x00000200,\r\n /** Irradiance geometry texture */\r\n TextureIrradiance = 0x00000400,\r\n /** Albedo (sqrt) geometry texture */\r\n TextureAlbedoSqrt = 0x00000800,\r\n /** Depth (in screen space) geometry texture */\r\n TextureScreenDepth = 0x00001000,\r\n /** Normal (in world space) geometry texture */\r\n TextureWorldNormal = 0x00002000,\r\n /** Position (in local space) geometry texture */\r\n TextureLocalPosition = 0x00004000,\r\n /** Linear velocity geometry texture */\r\n TextureLinearVelocity = 0x00008000,\r\n\r\n /** Bit field for all textures but back buffer depth/stencil */\r\n TextureAllButBackBufferDepthStencil = 0x000ffffb,\r\n /** Bit field for all textures but back buffer color and depth/stencil */\r\n TextureAllButBackBuffer = 0x000ffff9,\r\n /** Bit field for all textures */\r\n TextureAll = 0x000fffff,\r\n\r\n /** Resource container */\r\n ResourceContainer = 0x00100000,\r\n /** Shadow generator */\r\n ShadowGenerator = 0x00200000,\r\n /** Light */\r\n ShadowLight = 0x00400000,\r\n /** Camera */\r\n Camera = 0x01000000,\r\n /** List of objects (meshes, particle systems, sprites) */\r\n ObjectList = 0x02000000,\r\n\r\n /** Detect type based on connection */\r\n AutoDetect = 0x10000000,\r\n /** Output type that will be defined by input type */\r\n BasedOnInput = 0x20000000,\r\n /** Undefined */\r\n Undefined = 0x40000000,\r\n /** Custom object */\r\n Object = 0x80000000,\r\n /** Bitmask of all types */\r\n All = 0xffffffff,\r\n}\r\n\r\n/**\r\n * Enum used to define the compatibility state between two connection points\r\n */\r\nexport const enum NodeRenderGraphConnectionPointCompatibilityStates {\r\n /** Points are compatibles */\r\n Compatible,\r\n /** Points are incompatible because of their types */\r\n TypeIncompatible,\r\n /** Points are incompatible because they are in the same hierarchy **/\r\n HierarchyIssue,\r\n}\r\n\r\n/**\r\n * Defines the direction of a connection point\r\n */\r\nexport const enum NodeRenderGraphConnectionPointDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\n/**\r\n * Defines the type of a connection point value\r\n */\r\nexport type NodeRenderGraphBlockConnectionPointValueType =\r\n | FrameGraphTextureHandle\r\n | Camera\r\n | FrameGraphObjectList\r\n | IShadowLight\r\n | FrameGraphShadowGeneratorTask\r\n | FrameGraphObjectRendererTask;\r\n"]}
@@ -115,10 +115,11 @@ export declare class NodeRenderGraph {
115
115
  /**
116
116
  * Returns a promise that resolves when the node render graph is ready to be executed
117
117
  * This method must be called after the graph has been built (NodeRenderGraph.build called)!
118
- * @param timeout Timeout in ms between retries (default is 16)
118
+ * @param timeStep Time step in ms between retries (default is 16)
119
+ * @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 30000)
119
120
  * @returns The promise that resolves when the graph is ready
120
121
  */
121
- whenReadyAsync(timeout?: number): Promise<void>;
122
+ whenReadyAsync(timeStep?: number, maxTimeout?: number): Promise<void>;
122
123
  /**
123
124
  * Execute the graph (the graph must have been built before!)
124
125
  */
@@ -257,11 +257,12 @@ export class NodeRenderGraph {
257
257
  /**
258
258
  * Returns a promise that resolves when the node render graph is ready to be executed
259
259
  * This method must be called after the graph has been built (NodeRenderGraph.build called)!
260
- * @param timeout Timeout in ms between retries (default is 16)
260
+ * @param timeStep Time step in ms between retries (default is 16)
261
+ * @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 30000)
261
262
  * @returns The promise that resolves when the graph is ready
262
263
  */
263
- whenReadyAsync(timeout = 16) {
264
- return this._frameGraph.whenReadyAsync(timeout);
264
+ whenReadyAsync(timeStep = 16, maxTimeout = 30000) {
265
+ return this._frameGraph.whenReadyAsync(timeStep, maxTimeout);
265
266
  }
266
267
  /**
267
268
  * Execute the graph (the graph must have been built before!)