@onerjs/core 9.0.2 → 9.0.3

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 (473) hide show
  1. package/Buffers/buffer.pure.js +4 -0
  2. package/Buffers/buffer.pure.js.map +1 -1
  3. package/Cameras/camera.pure.d.ts +14 -0
  4. package/Cameras/camera.pure.js +15 -0
  5. package/Cameras/camera.pure.js.map +1 -1
  6. package/Compute/computeShader.pure.d.ts +2 -1
  7. package/Compute/computeShader.pure.js +29 -10
  8. package/Compute/computeShader.pure.js.map +1 -1
  9. package/Culling/ray.core.js +22 -9
  10. package/Culling/ray.core.js.map +1 -1
  11. package/Engines/IDrawContext.d.ts +2 -0
  12. package/Engines/IDrawContext.js.map +1 -1
  13. package/Engines/Native/nativeInterfaces.d.ts +55 -4
  14. package/Engines/Native/nativeInterfaces.js.map +1 -1
  15. package/Engines/Native/nativeRenderTargetWrapper.d.ts +1 -0
  16. package/Engines/Native/nativeRenderTargetWrapper.js +5 -1
  17. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  18. package/Engines/Processors/shaderCodeInliner.d.ts +2 -0
  19. package/Engines/Processors/shaderCodeInliner.js +251 -6
  20. package/Engines/Processors/shaderCodeInliner.js.map +1 -1
  21. package/Engines/Processors/shaderProcessor.js +10 -1
  22. package/Engines/Processors/shaderProcessor.js.map +1 -1
  23. package/Engines/WebGPU/Extensions/engine.debugging.pure.js +12 -0
  24. package/Engines/WebGPU/Extensions/engine.debugging.pure.js.map +1 -1
  25. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +0 -1
  26. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
  27. package/Engines/WebGPU/Extensions/engine.query.pure.js +5 -0
  28. package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
  29. package/Engines/WebGPU/webgpuBufferManager.js +7 -0
  30. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  31. package/Engines/WebGPU/webgpuCacheTextureView.d.ts +1 -1
  32. package/Engines/WebGPU/webgpuCacheTextureView.js +20 -8
  33. package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -1
  34. package/Engines/WebGPU/webgpuDrawContext.d.ts +2 -0
  35. package/Engines/WebGPU/webgpuDrawContext.js +6 -0
  36. package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
  37. package/Engines/WebGPU/webgpuQuerySet.d.ts +3 -3
  38. package/Engines/WebGPU/webgpuQuerySet.js +23 -9
  39. package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
  40. package/Engines/WebGPU/webgpuRenderPassCommandStream.d.ts +156 -0
  41. package/Engines/WebGPU/webgpuRenderPassCommandStream.js +323 -0
  42. package/Engines/WebGPU/webgpuRenderPassCommandStream.js.map +1 -0
  43. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  44. package/Engines/WebGPU/webgpuTextureManager.js +4 -3
  45. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  46. package/Engines/WebGPU/webgpuTimestampQuery.d.ts +3 -1
  47. package/Engines/WebGPU/webgpuTimestampQuery.js +9 -6
  48. package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
  49. package/Engines/abstractEngine.pure.d.ts +2 -0
  50. package/Engines/abstractEngine.pure.js +14 -5
  51. package/Engines/abstractEngine.pure.js.map +1 -1
  52. package/Engines/constants.d.ts +6 -0
  53. package/Engines/constants.js +6 -0
  54. package/Engines/constants.js.map +1 -1
  55. package/Engines/engine.d.ts +198 -24
  56. package/Engines/pure.d.ts +1 -0
  57. package/Engines/pure.js +1 -0
  58. package/Engines/pure.js.map +1 -1
  59. package/Engines/renderCommandBatcher.pure.d.ts +16 -0
  60. package/Engines/renderCommandBatcher.pure.js +24 -0
  61. package/Engines/renderCommandBatcher.pure.js.map +1 -0
  62. package/Engines/thinEngine.functions.js +3 -2
  63. package/Engines/thinEngine.functions.js.map +1 -1
  64. package/Engines/thinEngine.pure.js +18 -2
  65. package/Engines/thinEngine.pure.js.map +1 -1
  66. package/Engines/thinNativeEngine.pure.d.ts +10 -7
  67. package/Engines/thinNativeEngine.pure.js +117 -46
  68. package/Engines/thinNativeEngine.pure.js.map +1 -1
  69. package/Engines/thinWebGPUEngine.d.ts +8 -0
  70. package/Engines/thinWebGPUEngine.js +11 -0
  71. package/Engines/thinWebGPUEngine.js.map +1 -1
  72. package/Engines/webgpuEngine.pure.d.ts +60 -1
  73. package/Engines/webgpuEngine.pure.js +238 -42
  74. package/Engines/webgpuEngine.pure.js.map +1 -1
  75. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.d.ts +3 -3
  76. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js +2 -1
  77. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js.map +1 -1
  78. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.d.ts +3 -3
  79. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js +2 -1
  80. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js.map +1 -1
  81. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.d.ts +5 -0
  82. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js +8 -0
  83. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js.map +1 -0
  84. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.d.ts +77 -0
  85. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js +141 -0
  86. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js.map +1 -0
  87. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.d.ts +5 -3
  88. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js +38 -7
  89. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js.map +1 -1
  90. package/FlowGraph/Blocks/Event/index.d.ts +1 -0
  91. package/FlowGraph/Blocks/Event/index.js +1 -0
  92. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  93. package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
  94. package/FlowGraph/Blocks/Event/pure.js +1 -0
  95. package/FlowGraph/Blocks/Event/pure.js.map +1 -1
  96. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.d.ts +3 -3
  97. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js +2 -1
  98. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js.map +1 -1
  99. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.d.ts +3 -3
  100. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js +2 -1
  101. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js.map +1 -1
  102. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.d.ts +3 -3
  103. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js +2 -1
  104. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js.map +1 -1
  105. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.d.ts +3 -3
  106. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js +2 -1
  107. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js.map +1 -1
  108. package/FlowGraph/Blocks/allBlocks.pure.js +2 -0
  109. package/FlowGraph/Blocks/allBlocks.pure.js.map +1 -1
  110. package/FlowGraph/Blocks/flowGraphBlockFactory.js +2 -0
  111. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  112. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +1 -0
  113. package/FlowGraph/Blocks/flowGraphBlockNames.js +1 -0
  114. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  115. package/FlowGraph/flowGraph.d.ts +12 -1
  116. package/FlowGraph/flowGraph.js +38 -0
  117. package/FlowGraph/flowGraph.js.map +1 -1
  118. package/FlowGraph/flowGraphCoordinator.d.ts +44 -0
  119. package/FlowGraph/flowGraphCoordinator.js +141 -0
  120. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  121. package/FlowGraph/flowGraphDataConnection.pure.js +41 -14
  122. package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
  123. package/FlowGraph/flowGraphParser.js +105 -5
  124. package/FlowGraph/flowGraphParser.js.map +1 -1
  125. package/FlowGraph/flowGraphSoundAssets.d.ts +40 -0
  126. package/FlowGraph/flowGraphSoundAssets.js +33 -0
  127. package/FlowGraph/flowGraphSoundAssets.js.map +1 -0
  128. package/FlowGraph/index.d.ts +1 -0
  129. package/FlowGraph/index.js +1 -0
  130. package/FlowGraph/index.js.map +1 -1
  131. package/FlowGraph/pure.d.ts +1 -0
  132. package/FlowGraph/pure.js +1 -0
  133. package/FlowGraph/pure.js.map +1 -1
  134. package/FlowGraph/serialization.d.ts +8 -0
  135. package/FlowGraph/serialization.js +31 -12
  136. package/FlowGraph/serialization.js.map +1 -1
  137. package/FlowGraph/typeDefinitions.d.ts +25 -0
  138. package/FlowGraph/typeDefinitions.js.map +1 -1
  139. package/FrameGraph/Tasks/PostProcesses/taaTask.js +2 -0
  140. package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
  141. package/Instrumentation/engineInstrumentation.d.ts +1 -0
  142. package/Instrumentation/engineInstrumentation.js +25 -6
  143. package/Instrumentation/engineInstrumentation.js.map +1 -1
  144. package/Lights/Clustered/clusteredLightContainer.pure.js +2 -0
  145. package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
  146. package/Lights/Shadows/cascadedShadowGenerator.pure.d.ts +36 -1
  147. package/Lights/Shadows/cascadedShadowGenerator.pure.js +202 -27
  148. package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
  149. package/Lights/directionalLight.pure.d.ts +24 -10
  150. package/Lights/directionalLight.pure.js +29 -11
  151. package/Lights/directionalLight.pure.js.map +1 -1
  152. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +4 -4
  153. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  154. package/Materials/Node/Blocks/Dual/lightBlock.pure.js +1 -1
  155. package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
  156. package/Materials/Node/Blocks/Input/inputBlock.pure.js +4 -0
  157. package/Materials/Node/Blocks/Input/inputBlock.pure.js.map +1 -1
  158. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.d.ts +9 -0
  159. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +23 -3
  160. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
  161. package/Materials/PBR/openpbrMaterial.pure.js +1 -1
  162. package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
  163. package/Materials/PBR/pbrBaseMaterial.pure.d.ts +9 -0
  164. package/Materials/PBR/pbrBaseMaterial.pure.js +60 -1
  165. package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
  166. package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +11 -0
  167. package/Materials/PBR/pbrBaseSimpleMaterial.js +21 -2
  168. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  169. package/Materials/PBR/pbrMaterial.pure.d.ts +12 -0
  170. package/Materials/PBR/pbrMaterial.pure.js +23 -3
  171. package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
  172. package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +1 -0
  173. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +10 -0
  174. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -1
  175. package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +5 -0
  176. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +7 -0
  177. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -1
  178. package/Materials/Textures/HTML/htmlInteractionManager.d.ts +9 -3
  179. package/Materials/Textures/HTML/htmlInteractionManager.js +64 -5
  180. package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -1
  181. package/Materials/Textures/HTML/htmlTexture.d.ts +11 -11
  182. package/Materials/Textures/HTML/htmlTexture.js +106 -65
  183. package/Materials/Textures/HTML/htmlTexture.js.map +1 -1
  184. package/Materials/Textures/Loaders/internalTextureLoader.d.ts +2 -1
  185. package/Materials/Textures/Loaders/internalTextureLoader.js.map +1 -1
  186. package/Materials/Textures/Loaders/ktxTextureLoader.d.ts +2 -1
  187. package/Materials/Textures/Loaders/ktxTextureLoader.js +4 -50
  188. package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
  189. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +10 -0
  190. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  191. package/Materials/Textures/dynamicTexture.pure.js +6 -0
  192. package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
  193. package/Materials/Textures/ktx2encoderTypes.d.ts +51 -0
  194. package/Materials/Textures/ktx2encoderTypes.js +2 -0
  195. package/Materials/Textures/ktx2encoderTypes.js.map +1 -0
  196. package/Materials/Textures/renderTargetTexture.pure.js +10 -2
  197. package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
  198. package/Materials/Textures/textureMerger.d.ts +11 -0
  199. package/Materials/Textures/textureMerger.js +34 -19
  200. package/Materials/Textures/textureMerger.js.map +1 -1
  201. package/Materials/Textures/textureProcessor.d.ts +145 -0
  202. package/Materials/Textures/textureProcessor.js +445 -45
  203. package/Materials/Textures/textureProcessor.js.map +1 -1
  204. package/Materials/Textures/textureSampling.functions.d.ts +41 -0
  205. package/Materials/Textures/textureSampling.functions.js +82 -0
  206. package/Materials/Textures/textureSampling.functions.js.map +1 -0
  207. package/Materials/drawWrapper.d.ts +8 -0
  208. package/Materials/drawWrapper.js +19 -0
  209. package/Materials/drawWrapper.js.map +1 -1
  210. package/Materials/effect.pure.d.ts +6 -0
  211. package/Materials/effect.pure.js +28 -6
  212. package/Materials/effect.pure.js.map +1 -1
  213. package/Materials/effect.webgl.functions.pure.js +1 -1
  214. package/Materials/effect.webgl.functions.pure.js.map +1 -1
  215. package/Materials/material.pure.d.ts +5 -0
  216. package/Materials/material.pure.js +9 -2
  217. package/Materials/material.pure.js.map +1 -1
  218. package/Materials/materialFlags.d.ts +6 -0
  219. package/Materials/materialFlags.js +14 -0
  220. package/Materials/materialFlags.js.map +1 -1
  221. package/Materials/materialHelper.functions.d.ts +2 -1
  222. package/Materials/materialHelper.functions.js +36 -2
  223. package/Materials/materialHelper.functions.js.map +1 -1
  224. package/Materials/materialHelper.geometryrendering.js +19 -16
  225. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  226. package/Materials/materialPluginManager.pure.js +12 -8
  227. package/Materials/materialPluginManager.pure.js.map +1 -1
  228. package/Materials/prePassConfiguration.js +19 -16
  229. package/Materials/prePassConfiguration.js.map +1 -1
  230. package/Materials/shaderMaterial.pure.js +19 -6
  231. package/Materials/shaderMaterial.pure.js.map +1 -1
  232. package/Materials/shadowDepthWrapper.d.ts +6 -0
  233. package/Materials/shadowDepthWrapper.js +17 -0
  234. package/Materials/shadowDepthWrapper.js.map +1 -1
  235. package/Meshes/Compression/dracoCodec.d.ts +14 -0
  236. package/Meshes/Compression/dracoCodec.js +22 -0
  237. package/Meshes/Compression/dracoCodec.js.map +1 -1
  238. package/Meshes/Compression/dracoDecoder.d.ts +1 -0
  239. package/Meshes/Compression/dracoDecoder.js +27 -0
  240. package/Meshes/Compression/dracoDecoder.js.map +1 -1
  241. package/Meshes/Compression/dracoEncoder.d.ts +1 -0
  242. package/Meshes/Compression/dracoEncoder.js +8 -0
  243. package/Meshes/Compression/dracoEncoder.js.map +1 -1
  244. package/Meshes/Compression/meshoptCompression.d.ts +1 -0
  245. package/Meshes/Compression/meshoptCompression.js +9 -0
  246. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  247. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.d.ts +415 -0
  248. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js +912 -0
  249. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js.map +1 -0
  250. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +3 -0
  251. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +40 -9
  252. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  253. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +112 -8
  254. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +696 -74
  255. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  256. package/Meshes/abstractMesh.pure.js +12 -4
  257. package/Meshes/abstractMesh.pure.js.map +1 -1
  258. package/Meshes/geometry.d.ts +5 -0
  259. package/Meshes/geometry.js +25 -0
  260. package/Meshes/geometry.js.map +1 -1
  261. package/Meshes/index.d.ts +1 -0
  262. package/Meshes/index.js +1 -0
  263. package/Meshes/index.js.map +1 -1
  264. package/Meshes/mesh.pure.d.ts +7 -0
  265. package/Meshes/mesh.pure.js +18 -13
  266. package/Meshes/mesh.pure.js.map +1 -1
  267. package/Meshes/pure.d.ts +1 -0
  268. package/Meshes/pure.js +1 -0
  269. package/Meshes/pure.js.map +1 -1
  270. package/Meshes/subMesh.pure.d.ts +3 -0
  271. package/Meshes/subMesh.pure.js +26 -0
  272. package/Meshes/subMesh.pure.js.map +1 -1
  273. package/Meshes/thinInstanceMesh.pure.js +5 -3
  274. package/Meshes/thinInstanceMesh.pure.js.map +1 -1
  275. package/Misc/index.d.ts +1 -0
  276. package/Misc/index.js +1 -0
  277. package/Misc/index.js.map +1 -1
  278. package/Misc/khronosTextureContainer2.d.ts +3 -2
  279. package/Misc/khronosTextureContainer2.js +24 -6
  280. package/Misc/khronosTextureContainer2.js.map +1 -1
  281. package/Misc/khronosTextureContainer2Encoder.d.ts +166 -0
  282. package/Misc/khronosTextureContainer2Encoder.js +556 -0
  283. package/Misc/khronosTextureContainer2Encoder.js.map +1 -0
  284. package/Misc/khronosTextureContainer2EncoderWorker.d.ts +61 -0
  285. package/Misc/khronosTextureContainer2EncoderWorker.js +55 -0
  286. package/Misc/khronosTextureContainer2EncoderWorker.js.map +1 -0
  287. package/Misc/pure.d.ts +1 -0
  288. package/Misc/pure.js +1 -0
  289. package/Misc/pure.js.map +1 -1
  290. package/Misc/textureFormat.functions.d.ts +6 -0
  291. package/Misc/textureFormat.functions.js +54 -0
  292. package/Misc/textureFormat.functions.js.map +1 -0
  293. package/Misc/textureTools.d.ts +6 -2
  294. package/Misc/textureTools.js +100 -42
  295. package/Misc/textureTools.js.map +1 -1
  296. package/Misc/tools.pure.js +1 -1
  297. package/Misc/tools.pure.js.map +1 -1
  298. package/Particles/Node/Blocks/systemBlock.pure.d.ts +1 -1
  299. package/Particles/Node/Blocks/systemBlock.pure.js +6 -3
  300. package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
  301. package/Particles/computeShaderParticleSystem.pure.js +5 -0
  302. package/Particles/computeShaderParticleSystem.pure.js.map +1 -1
  303. package/Particles/gpuParticleSystem.pure.d.ts +2 -0
  304. package/Particles/gpuParticleSystem.pure.js +25 -1
  305. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  306. package/Particles/solidParticle.d.ts +5 -0
  307. package/Particles/solidParticle.js +5 -0
  308. package/Particles/solidParticle.js.map +1 -1
  309. package/Particles/solidParticleSystem.d.ts +10 -0
  310. package/Particles/solidParticleSystem.js +72 -13
  311. package/Particles/solidParticleSystem.js.map +1 -1
  312. package/Particles/thinParticleSystem.pure.js +4 -0
  313. package/Particles/thinParticleSystem.pure.js.map +1 -1
  314. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.d.ts +27 -6
  315. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js +60 -5
  316. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js.map +1 -1
  317. package/PostProcesses/thinTAAPostProcess.d.ts +1 -0
  318. package/PostProcesses/thinTAAPostProcess.js +17 -1
  319. package/PostProcesses/thinTAAPostProcess.js.map +1 -1
  320. package/PostProcesses/volumetricLightScatteringPostProcess.pure.d.ts +2 -1
  321. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +6 -5
  322. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
  323. package/Rendering/boundingBoxRenderer.pure.js +2 -3
  324. package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
  325. package/Rendering/geometryBufferRenderer.pure.js +8 -2
  326. package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
  327. package/Rendering/objectRenderer.d.ts +1 -0
  328. package/Rendering/objectRenderer.js +14 -0
  329. package/Rendering/objectRenderer.js.map +1 -1
  330. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
  331. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  332. package/Shaders/ShadersInclude/bumpVertex.js +1 -1
  333. package/Shaders/ShadersInclude/bumpVertex.js.map +1 -1
  334. package/Shaders/ShadersInclude/bumpVertexDeclaration.js +1 -1
  335. package/Shaders/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
  336. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +5 -1
  337. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  338. package/Shaders/ShadersInclude/helperFunctions.js +2 -2
  339. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  340. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  341. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  342. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +6 -0
  343. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
  344. package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
  345. package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
  346. package/Shaders/ShadersInclude/pbrBlockNormalFinal.js +9 -0
  347. package/Shaders/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
  348. package/Shaders/ShadersInclude/pbrBlockReflectance.js +1 -1
  349. package/Shaders/ShadersInclude/pbrBlockReflectance.js.map +1 -1
  350. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
  351. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  352. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +7 -1
  353. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
  354. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
  355. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  356. package/Shaders/ShadersInclude/pbrIBLFunctions.js +12 -0
  357. package/Shaders/ShadersInclude/pbrIBLFunctions.js.map +1 -1
  358. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  359. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  360. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +3 -0
  361. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  362. package/Shaders/geometry.vertex.js +6 -6
  363. package/Shaders/geometry.vertex.js.map +1 -1
  364. package/Shaders/gpuUpdateParticles.vertex.js +1 -1
  365. package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
  366. package/Shaders/lod.fragment.js +15 -2
  367. package/Shaders/lod.fragment.js.map +1 -1
  368. package/Shaders/lod3D.fragment.js +15 -2
  369. package/Shaders/lod3D.fragment.js.map +1 -1
  370. package/Shaders/lodCube.fragment.js +15 -2
  371. package/Shaders/lodCube.fragment.js.map +1 -1
  372. package/Shaders/openpbr.vertex.js +2 -0
  373. package/Shaders/openpbr.vertex.js.map +1 -1
  374. package/Shaders/pbr.fragment.js +12 -1
  375. package/Shaders/pbr.fragment.js.map +1 -1
  376. package/Shaders/pbr.vertex.js +2 -0
  377. package/Shaders/pbr.vertex.js.map +1 -1
  378. package/Shaders/textureMerger.fragment.js +28 -0
  379. package/Shaders/textureMerger.fragment.js.map +1 -1
  380. package/Shaders/textureProcessor.fragment.js +26 -4
  381. package/Shaders/textureProcessor.fragment.js.map +1 -1
  382. package/Shaders/volumetricLightScattering.fragment.js +1 -1
  383. package/Shaders/volumetricLightScattering.fragment.js.map +1 -1
  384. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
  385. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  386. package/ShadersWGSL/ShadersInclude/bumpVertex.js +1 -1
  387. package/ShadersWGSL/ShadersInclude/bumpVertex.js.map +1 -1
  388. package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js +1 -1
  389. package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
  390. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +1 -1
  391. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  392. package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
  393. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
  394. package/ShadersWGSL/ShadersInclude/lightFragment.js +44 -2
  395. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  396. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js +17 -3
  397. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js.map +1 -1
  398. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js +12 -1
  399. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
  400. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  401. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  402. package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
  403. package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
  404. package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js +9 -0
  405. package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
  406. package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js +1 -1
  407. package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js.map +1 -1
  408. package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
  409. package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  410. package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js +1 -1
  411. package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js.map +1 -1
  412. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
  413. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  414. package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js +8 -0
  415. package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js.map +1 -1
  416. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  417. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  418. package/ShadersWGSL/ShadersInclude/prePassVertex.js +2 -2
  419. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  420. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +1 -1
  421. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  422. package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js +3 -1
  423. package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js.map +1 -1
  424. package/ShadersWGSL/ShadersInclude/shadowsVertex.js +16 -0
  425. package/ShadersWGSL/ShadersInclude/shadowsVertex.js.map +1 -1
  426. package/ShadersWGSL/default.fragment.js +4 -4
  427. package/ShadersWGSL/default.fragment.js.map +1 -1
  428. package/ShadersWGSL/default.vertex.js +1 -1
  429. package/ShadersWGSL/default.vertex.js.map +1 -1
  430. package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
  431. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  432. package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
  433. package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
  434. package/ShadersWGSL/gsSortCount.compute.d.ts +5 -0
  435. package/ShadersWGSL/gsSortCount.compute.js +19 -0
  436. package/ShadersWGSL/gsSortCount.compute.js.map +1 -0
  437. package/ShadersWGSL/gsSortKeys.compute.d.ts +5 -0
  438. package/ShadersWGSL/gsSortKeys.compute.js +49 -0
  439. package/ShadersWGSL/gsSortKeys.compute.js.map +1 -0
  440. package/ShadersWGSL/gsSortOutput.compute.d.ts +5 -0
  441. package/ShadersWGSL/gsSortOutput.compute.js +28 -0
  442. package/ShadersWGSL/gsSortOutput.compute.js.map +1 -0
  443. package/ShadersWGSL/gsSortScanLocal.compute.d.ts +5 -0
  444. package/ShadersWGSL/gsSortScanLocal.compute.js +23 -0
  445. package/ShadersWGSL/gsSortScanLocal.compute.js.map +1 -0
  446. package/ShadersWGSL/gsSortScanSums.compute.d.ts +5 -0
  447. package/ShadersWGSL/gsSortScanSums.compute.js +19 -0
  448. package/ShadersWGSL/gsSortScanSums.compute.js.map +1 -0
  449. package/ShadersWGSL/gsSortScatter.compute.d.ts +5 -0
  450. package/ShadersWGSL/gsSortScatter.compute.js +33 -0
  451. package/ShadersWGSL/gsSortScatter.compute.js.map +1 -0
  452. package/ShadersWGSL/lod.fragment.js +14 -2
  453. package/ShadersWGSL/lod.fragment.js.map +1 -1
  454. package/ShadersWGSL/lod3D.fragment.js +14 -2
  455. package/ShadersWGSL/lod3D.fragment.js.map +1 -1
  456. package/ShadersWGSL/lodCube.fragment.js +14 -2
  457. package/ShadersWGSL/lodCube.fragment.js.map +1 -1
  458. package/ShadersWGSL/openpbr.vertex.js +3 -1
  459. package/ShadersWGSL/openpbr.vertex.js.map +1 -1
  460. package/ShadersWGSL/pbr.fragment.js +11 -0
  461. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  462. package/ShadersWGSL/pbr.vertex.js +3 -1
  463. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  464. package/ShadersWGSL/textureMerger.fragment.js +40 -4
  465. package/ShadersWGSL/textureMerger.fragment.js.map +1 -1
  466. package/ShadersWGSL/textureProcessor.fragment.js +26 -4
  467. package/ShadersWGSL/textureProcessor.fragment.js.map +1 -1
  468. package/Sprites/spriteRenderer.js +15 -5
  469. package/Sprites/spriteRenderer.js.map +1 -1
  470. package/package.json +1 -1
  471. package/scene.pure.d.ts +23 -1
  472. package/scene.pure.js +83 -1
  473. package/scene.pure.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"meshoptCompression.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Compression/meshoptCompression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAM9C,IAAI,eAAe,GAAG,CAAC,CAAC;AACxB,IAAI,aAAa,GAA4C,IAAI,CAAC;AAiBlE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,kBAAkB;IAmB3B;;OAEG;IACI,MAAM,KAAK,OAAO;QACrB,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;YAC/B,kBAAkB,CAAC,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAC3D,CAAC;QAED,OAAO,kBAAkB,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED;;OAEG;IACH;QACI,MAAM,OAAO,GAAG,kBAAkB,CAAC,aAAa,CAAC,OAAO,CAAC;QAEzD,0CAA0C;QAC1C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAC7E,4DAA4D;YAC5D,OAAO,cAAc,CAAC,KAAK,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,OAAO;QACV,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,qBAAqB,CAAC,MAAkB,EAAE,KAAa,EAAE,MAAc,EAAE,IAA4C,EAAE,MAAe;QAC/I,MAAM,IAAI,CAAC,qBAAsB,CAAC;QAClC,IAAI,eAAe,KAAK,CAAC,EAAE,CAAC;YACxB,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,eAAe,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/F,oGAAoG;QACpG,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YACzB,YAAY,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;QACD,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,eAAe,GAAG,CAAC,CAAC;YACpB,aAAa,GAAG,IAAI,CAAC;QACzB,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,OAAO,MAAM,CAAC;IAClB,CAAC;;AA1ED;;;;;;;GAOG;AACW,gCAAa,GAAqC;IAC5D,OAAO,EAAE;QACL,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,qBAAqB;KACpD;CACJ,CAAC;AAEa,2BAAQ,GAAiC,IAAI,CAAC","sourcesContent":["import { Tools } from \"../../Misc/tools.pure\";\r\nimport { type IDisposable } from \"../../scene\";\r\nimport { type Nullable } from \"../../types\";\r\n\r\ndeclare let MeshoptDecoder: any;\r\n\r\nlet NumberOfWorkers = 0;\r\nlet WorkerTimeout: Nullable<ReturnType<typeof setTimeout>> = null;\r\n\r\n/**\r\n * Configuration for meshoptimizer compression\r\n */\r\nexport interface IMeshoptCompressionConfiguration {\r\n /**\r\n * Configuration for the decoder.\r\n */\r\n decoder: {\r\n /**\r\n * The url to the meshopt decoder library.\r\n */\r\n url: string;\r\n };\r\n}\r\n\r\n/**\r\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\r\n *\r\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\r\n *\r\n * **Encoder**\r\n *\r\n * The encoder is not currently implemented.\r\n *\r\n * **Decoder**\r\n *\r\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\r\n *\r\n * To update the configuration, use the following code:\r\n * ```javascript\r\n * MeshoptCompression.Configuration = {\r\n * decoder: {\r\n * url: \"<url to the meshopt decoder library>\"\r\n * }\r\n * };\r\n * ```\r\n */\r\nexport class MeshoptCompression implements IDisposable {\r\n private _decoderModulePromise?: Promise<any>;\r\n\r\n /**\r\n * The configuration. Defaults to the following:\r\n * ```javascript\r\n * decoder: {\r\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\r\n * }\r\n * ```\r\n */\r\n public static Configuration: IMeshoptCompressionConfiguration = {\r\n decoder: {\r\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\r\n },\r\n };\r\n\r\n private static _Default: Nullable<MeshoptCompression> = null;\r\n\r\n /**\r\n * Default instance for the meshoptimizer object.\r\n */\r\n public static get Default(): MeshoptCompression {\r\n if (!MeshoptCompression._Default) {\r\n MeshoptCompression._Default = new MeshoptCompression();\r\n }\r\n\r\n return MeshoptCompression._Default;\r\n }\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor() {\r\n const decoder = MeshoptCompression.Configuration.decoder;\r\n\r\n // eslint-disable-next-line github/no-then\r\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\r\n // Wait for WebAssembly compilation before resolving promise\r\n return MeshoptDecoder.ready;\r\n });\r\n }\r\n\r\n /**\r\n * Stop all async operations and release resources.\r\n */\r\n public dispose(): void {\r\n delete this._decoderModulePromise;\r\n }\r\n\r\n /**\r\n * Decode meshopt data.\r\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\r\n * @param source The input data.\r\n * @param count The number of elements.\r\n * @param stride The stride in bytes.\r\n * @param mode The compression mode.\r\n * @param filter The compression filter.\r\n * @returns a Promise<Uint8Array> that resolves to the decoded data\r\n */\r\n public async decodeGltfBufferAsync(source: Uint8Array, count: number, stride: number, mode: \"ATTRIBUTES\" | \"TRIANGLES\" | \"INDICES\", filter?: string): Promise<Uint8Array> {\r\n await this._decoderModulePromise!;\r\n if (NumberOfWorkers === 0) {\r\n MeshoptDecoder.useWorkers(1);\r\n NumberOfWorkers = 1;\r\n }\r\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\r\n // a simple debounce to avoid switching back and forth between workers and no workers while decoding\r\n if (WorkerTimeout !== null) {\r\n clearTimeout(WorkerTimeout);\r\n }\r\n WorkerTimeout = setTimeout(() => {\r\n MeshoptDecoder.useWorkers(0);\r\n NumberOfWorkers = 0;\r\n WorkerTimeout = null;\r\n }, 1000);\r\n return result;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"meshoptCompression.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Compression/meshoptCompression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAS9C,IAAI,eAAe,GAAG,CAAC,CAAC;AACxB,IAAI,aAAa,GAA4C,IAAI,CAAC;AAiBlE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,kBAAkB;IAoB3B;;OAEG;IACI,MAAM,KAAK,OAAO;QACrB,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;YAC/B,kBAAkB,CAAC,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAC3D,CAAC;QAED,OAAO,kBAAkB,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED;;OAEG;IACH;QAhCiB,sBAAiB,GAAY,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAiCpG,sEAAsE;QACtE,oEAAoE;QACpE,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzB,OAAO;QACX,CAAC;QAED,MAAM,OAAO,GAAG,kBAAkB,CAAC,aAAa,CAAC,OAAO,CAAC;QAEzD,0CAA0C;QAC1C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAC7E,4DAA4D;YAC5D,OAAO,cAAc,CAAC,KAAK,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,OAAO;QACV,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,qBAAqB,CAAC,MAAkB,EAAE,KAAa,EAAE,MAAc,EAAE,IAA4C,EAAE,MAAe;QAC/I,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzB,OAAO,OAAO,CAAC,aAAc,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvE,CAAC;QACD,MAAM,IAAI,CAAC,qBAAsB,CAAC;QAClC,IAAI,eAAe,KAAK,CAAC,EAAE,CAAC;YACxB,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,eAAe,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/F,oGAAoG;QACpG,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YACzB,YAAY,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;QACD,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,eAAe,GAAG,CAAC,CAAC;YACpB,aAAa,GAAG,IAAI,CAAC;QACzB,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,OAAO,MAAM,CAAC;IAClB,CAAC;;AAnFD;;;;;;;GAOG;AACW,gCAAa,GAAqC;IAC5D,OAAO,EAAE;QACL,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,qBAAqB;KACpD;CACJ,AAJ0B,CAIzB;AAEa,2BAAQ,GAAiC,IAAI,AAArC,CAAsC","sourcesContent":["import { Tools } from \"../../Misc/tools.pure\";\r\nimport { type IDisposable } from \"../../scene\";\r\nimport { type Nullable } from \"../../types\";\r\nimport { type INative } from \"../../Engines/Native/nativeInterfaces\";\r\n\r\ndeclare let MeshoptDecoder: any;\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\ndeclare const _native: INative;\r\n\r\nlet NumberOfWorkers = 0;\r\nlet WorkerTimeout: Nullable<ReturnType<typeof setTimeout>> = null;\r\n\r\n/**\r\n * Configuration for meshoptimizer compression\r\n */\r\nexport interface IMeshoptCompressionConfiguration {\r\n /**\r\n * Configuration for the decoder.\r\n */\r\n decoder: {\r\n /**\r\n * The url to the meshopt decoder library.\r\n */\r\n url: string;\r\n };\r\n}\r\n\r\n/**\r\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\r\n *\r\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\r\n *\r\n * **Encoder**\r\n *\r\n * The encoder is not currently implemented.\r\n *\r\n * **Decoder**\r\n *\r\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\r\n *\r\n * To update the configuration, use the following code:\r\n * ```javascript\r\n * MeshoptCompression.Configuration = {\r\n * decoder: {\r\n * url: \"<url to the meshopt decoder library>\"\r\n * }\r\n * };\r\n * ```\r\n */\r\nexport class MeshoptCompression implements IDisposable {\r\n private _decoderModulePromise?: Promise<any>;\r\n private readonly _useNativeDecoder: boolean = typeof _native !== \"undefined\" && !!_native.decodeMeshopt;\r\n\r\n /**\r\n * The configuration. Defaults to the following:\r\n * ```javascript\r\n * decoder: {\r\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\r\n * }\r\n * ```\r\n */\r\n public static Configuration: IMeshoptCompressionConfiguration = {\r\n decoder: {\r\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\r\n },\r\n };\r\n\r\n private static _Default: Nullable<MeshoptCompression> = null;\r\n\r\n /**\r\n * Default instance for the meshoptimizer object.\r\n */\r\n public static get Default(): MeshoptCompression {\r\n if (!MeshoptCompression._Default) {\r\n MeshoptCompression._Default = new MeshoptCompression();\r\n }\r\n\r\n return MeshoptCompression._Default;\r\n }\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor() {\r\n // When the native meshopt decoder is available (Babylon Native), skip\r\n // loading the WebAssembly module entirely and decode synchronously.\r\n if (this._useNativeDecoder) {\r\n return;\r\n }\r\n\r\n const decoder = MeshoptCompression.Configuration.decoder;\r\n\r\n // eslint-disable-next-line github/no-then\r\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\r\n // Wait for WebAssembly compilation before resolving promise\r\n return MeshoptDecoder.ready;\r\n });\r\n }\r\n\r\n /**\r\n * Stop all async operations and release resources.\r\n */\r\n public dispose(): void {\r\n delete this._decoderModulePromise;\r\n }\r\n\r\n /**\r\n * Decode meshopt data.\r\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\r\n * @param source The input data.\r\n * @param count The number of elements.\r\n * @param stride The stride in bytes.\r\n * @param mode The compression mode.\r\n * @param filter The compression filter.\r\n * @returns a Promise<Uint8Array> that resolves to the decoded data\r\n */\r\n public async decodeGltfBufferAsync(source: Uint8Array, count: number, stride: number, mode: \"ATTRIBUTES\" | \"TRIANGLES\" | \"INDICES\", filter?: string): Promise<Uint8Array> {\r\n if (this._useNativeDecoder) {\r\n return _native.decodeMeshopt!(source, count, stride, mode, filter);\r\n }\r\n await this._decoderModulePromise!;\r\n if (NumberOfWorkers === 0) {\r\n MeshoptDecoder.useWorkers(1);\r\n NumberOfWorkers = 1;\r\n }\r\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\r\n // a simple debounce to avoid switching back and forth between workers and no workers while decoding\r\n if (WorkerTimeout !== null) {\r\n clearTimeout(WorkerTimeout);\r\n }\r\n WorkerTimeout = setTimeout(() => {\r\n MeshoptDecoder.useWorkers(0);\r\n NumberOfWorkers = 0;\r\n WorkerTimeout = null;\r\n }, 1000);\r\n return result;\r\n }\r\n}\r\n"]}
@@ -0,0 +1,415 @@
1
+ import { type Nullable } from "../../types.js";
2
+ import { type AbstractEngine } from "../../Engines/abstractEngine.pure.js";
3
+ import { type WebGPUEngine } from "../../Engines/webgpuEngine.pure.js";
4
+ import { type Matrix } from "../../Maths/math.vector.pure.js";
5
+ import { type BaseTexture } from "../../Materials/Textures/baseTexture.pure.js";
6
+ import { ComputeShader } from "../../Compute/computeShader.pure.js";
7
+ import { StorageBuffer } from "../../Buffers/storageBuffer.js";
8
+ import { type VertexBuffer } from "../../Buffers/buffer.pure.js";
9
+ /**
10
+ * Anything exposing a Babylon.js column-major 4x4 matrix array (a Matrix, for instance).
11
+ */
12
+ export type GaussianSplattingGpuSortMatrix = Pick<Matrix, "m">;
13
+ /**
14
+ * Inputs describing the splat data the GPU sorter reads. The sorter only reads textures: it never owns them.
15
+ */
16
+ export interface IGaussianSplattingGpuSortSource {
17
+ /**
18
+ * Number of splats in the mesh (the value used as the "empty splat" index padding the sorted output).
19
+ */
20
+ vertexCount: number;
21
+ /**
22
+ * Width in texels of the data textures (splat index i lives at texel (i % width, floor(i / width))).
23
+ */
24
+ textureWidth: number;
25
+ /**
26
+ * RGBA32F texture whose xyz hold the splat centers. For SOG data, the RGBA8 "means low" texture.
27
+ */
28
+ centersTexture: BaseTexture;
29
+ /**
30
+ * SOG (quantized means) inputs. When set, centers are decoded like the Gaussian Splatting vertex shader does.
31
+ */
32
+ sog?: {
33
+ /**
34
+ * RGBA8 "means high" texture.
35
+ */
36
+ meansHighTexture: BaseTexture;
37
+ /**
38
+ * Quantization range minimum (xyz) of the log-encoded means.
39
+ */
40
+ meansMin: ArrayLike<number>;
41
+ /**
42
+ * Quantization range maximum (xyz) of the log-encoded means.
43
+ */
44
+ meansMax: ArrayLike<number>;
45
+ };
46
+ /**
47
+ * Compound meshes: R8 texture (same layout as the centers) holding each splat's part index. Used together with {@link GaussianSplattingGpuSorter.setPartMatrices}.
48
+ */
49
+ partIndicesTexture?: BaseTexture;
50
+ /**
51
+ * Optional local-space bounding box minimum of the splat centers, used to derive the depth range when none is given to {@link GaussianSplattingGpuSorter.sort}.
52
+ * Not needed for SOG data (derived from the means range).
53
+ */
54
+ boundsMin?: ArrayLike<number>;
55
+ /**
56
+ * Optional local-space bounding box maximum of the splat centers.
57
+ */
58
+ boundsMax?: ArrayLike<number>;
59
+ }
60
+ /**
61
+ * Options of {@link GaussianSplattingGpuSorter.sort}.
62
+ */
63
+ export interface IGaussianSplattingGpuSortOptions {
64
+ /**
65
+ * Whether the scene is right-handed. Matches the CPU sort worker: the depth is negated so larger always means farther.
66
+ */
67
+ rightHanded?: boolean;
68
+ /**
69
+ * World position of the camera. When omitted, the translation of the view matrix is used, which is equivalent.
70
+ */
71
+ cameraPosition?: ArrayLike<number>;
72
+ /**
73
+ * Depth interval covering every active splat, in the sign-adjusted depth space (larger = farther). The 2^keyBits sort keys span this interval,
74
+ * so a tight interval improves the precision. When omitted, it is derived from the source bounds.
75
+ */
76
+ depthRange?: {
77
+ min: number;
78
+ max: number;
79
+ };
80
+ }
81
+ /**
82
+ * Number of keys bits clamped to the supported range.
83
+ * @param keyBits requested number of sort key bits
84
+ * @returns the clamped, integral number of key bits
85
+ * @internal
86
+ */
87
+ export declare function _ClampGpuSortKeyBits(keyBits: number): number;
88
+ /**
89
+ * Number of radix passes needed to sort keys of a given size.
90
+ * @param keyBits number of bits of the sort keys
91
+ * @returns the number of 4-bit radix passes
92
+ * @internal
93
+ */
94
+ export declare function _GetGpuSortPassCount(keyBits: number): number;
95
+ /**
96
+ * Count of output slots: the active count rounded up to a multiple of 16 (16 splats per instance), at least 16.
97
+ * @param activeCount number of splats to render
98
+ * @returns the padded count
99
+ * @internal
100
+ */
101
+ export declare function _GetGpuSortPaddedCount(activeCount: number): number;
102
+ /**
103
+ * Packs flat `[start0, count0, start1, count1, ...]` splat intervals for the key shader. Each GPU entry is `(exclusive prefix of the counts, start)`.
104
+ * Empty intervals are dropped and intervals are clamped to `[0, vertexCount)`.
105
+ * @param intervals flat source-splat intervals (start, count pairs)
106
+ * @param vertexCount number of splats in the mesh
107
+ * @returns the packed entries, the number of entries and the total number of active splats
108
+ * @internal
109
+ */
110
+ export declare function _PackGpuSortIntervals(intervals: ArrayLike<number>, vertexCount: number): {
111
+ data: Uint32Array;
112
+ count: number;
113
+ total: number;
114
+ };
115
+ /**
116
+ * Computes the coefficients of the depth of a splat center: `depth = dot(coef.xyz, center) + coef.w`, in the same space and sign convention as the CPU sort worker
117
+ * (the signed distance along the camera forward axis, negated in right-handed scenes, so a larger value is farther).
118
+ * @param world world matrix (array of 16 numbers) transforming the splat center
119
+ * @param view view matrix (array of 16 numbers)
120
+ * @param depthSign 1 for left-handed scenes, -1 for right-handed scenes
121
+ * @param cameraPosition world camera position, or null to use the view matrix translation
122
+ * @param out receives the 4 coefficients
123
+ * @param offset index of the first coefficient in out
124
+ * @param worldOffset index of the first element of the world matrix in world (defaults to 0), so a matrix can be read from a flat array without creating a view
125
+ * @internal
126
+ */
127
+ export declare function _ComputeGpuSortDepthCoefficients(world: ArrayLike<number>, view: ArrayLike<number>, depthSign: number, cameraPosition: Nullable<ArrayLike<number>>, out: Float32Array, offset: number, worldOffset?: number): void;
128
+ /**
129
+ * Computes the interval of depths reached by the points of a box, for one or several sets of depth coefficients.
130
+ * @param coefficients depth coefficients (4 per set)
131
+ * @param setCount number of coefficient sets
132
+ * @param boundsMin box minimum (xyz)
133
+ * @param boundsMax box maximum (xyz)
134
+ * @param result optional object receiving the interval, to avoid an allocation when called every frame
135
+ * @returns the min and max depths (the result object when provided)
136
+ * @internal
137
+ */
138
+ export declare function _ComputeGpuSortDepthRange(coefficients: ArrayLike<number>, setCount: number, boundsMin: ArrayLike<number>, boundsMax: ArrayLike<number>, result?: {
139
+ min: number;
140
+ max: number;
141
+ }): {
142
+ min: number;
143
+ max: number;
144
+ };
145
+ /**
146
+ * Scale converting a depth distance to a sort key: `key = (depthMax - depth) * scale`, so the farthest splat gets key 0 (sorted first).
147
+ * @param depthMin smallest depth
148
+ * @param depthMax largest depth
149
+ * @param keyBits number of bits of the sort keys
150
+ * @returns the scale, 0 when the depth range is degenerate (all keys are 0, like the CPU worker)
151
+ * @internal
152
+ */
153
+ export declare function _ComputeGpuSortKeyScale(depthMin: number, depthMax: number, keyBits: number): number;
154
+ /**
155
+ * Inverse of the SOG means log-transform, applied to a quantization range bound.
156
+ * @param value log-encoded value
157
+ * @returns the decoded value
158
+ * @internal
159
+ */
160
+ export declare function _DecodeGpuSortSogMean(value: number): number;
161
+ /**
162
+ * Gets the number of splats a GPU sorter can handle on an engine: limited by the maximum storage buffer binding size (4 bytes per splat),
163
+ * and by 2^24 so that source indices are exactly representable as float32 in the instanced vertex buffer.
164
+ * @param engine the engine
165
+ * @returns the maximum number of splats (a multiple of 16)
166
+ */
167
+ export declare function GetGaussianSplattingGpuSorterMaxSplatCount(engine: AbstractEngine): number;
168
+ /**
169
+ * Per-view GPU buffer receiving a sorted splat index list. It can be bound as the four instanced `splatIndex0` ... `splatIndex3` vertex attributes
170
+ * of the Gaussian Splatting vertex shader (16 splats per instance), in place of the CPU-uploaded index buffer.
171
+ *
172
+ * Create it with {@link GaussianSplattingGpuSorter.createOutput}. After each successful sort, if {@link buffersVersion} changed,
173
+ * the vertex buffers were recreated (the output grew) and must be bound again.
174
+ */
175
+ export declare class GaussianSplattingGpuSortOutput {
176
+ private _engine;
177
+ private _label;
178
+ private _storageBuffer;
179
+ private _vertexBuffers;
180
+ private _wrapper;
181
+ private _capacity;
182
+ private _buffersVersion;
183
+ /** @internal */
184
+ _sortedPaddedCount: number;
185
+ /** @internal */
186
+ _paramsBuffer: StorageBuffer;
187
+ /** @internal */
188
+ _coefsBuffer: Nullable<StorageBuffer>;
189
+ /** @internal */
190
+ _coefsCapacity: number;
191
+ /** @internal */
192
+ _keysCs: Nullable<ComputeShader>;
193
+ /** @internal */
194
+ _keysCsSog: boolean;
195
+ /** @internal */
196
+ _keysCsCompound: boolean;
197
+ /** @internal Texture views used by the keys context, which may change without replacing their BaseTexture objects. */
198
+ _keysCsCentersView: Nullable<GPUTextureView>;
199
+ /** @internal */
200
+ _keysCsMeansHighView: Nullable<GPUTextureView>;
201
+ /** @internal */
202
+ _keysCsPartIndicesView: Nullable<GPUTextureView>;
203
+ /** @internal */
204
+ _outputCs: ComputeShader;
205
+ /** @internal Sorter binding version the compute shaders of this output were last bound with. */
206
+ _boundSorterVersion: number;
207
+ /** @internal Buffers version of the output storage buffer the output shader was last bound with. */
208
+ _boundBuffersVersion: number;
209
+ /** @internal */
210
+ _boundCoefsBuffer: Nullable<StorageBuffer>;
211
+ /** @internal */
212
+ _boundKeysCs: Nullable<ComputeShader>;
213
+ /** @internal */
214
+ _lastSortError: boolean;
215
+ /** @internal */
216
+ _onDisposed: Nullable<() => void>;
217
+ private _disposed;
218
+ /**
219
+ * @param engine the WebGPU engine
220
+ * @param label debug label
221
+ * @internal
222
+ */
223
+ constructor(engine: WebGPUEngine, label: string);
224
+ /**
225
+ * The buffer holding the sorted splat indices as float32 (back-to-front), padded to a multiple of 16 with the empty splat index.
226
+ */
227
+ get buffer(): Nullable<StorageBuffer>;
228
+ /**
229
+ * The 4 instanced vertex buffers `splatIndex0` ... `splatIndex3` (vec4 each, stride 16 floats) viewing {@link buffer}.
230
+ */
231
+ get vertexBuffers(): readonly VertexBuffer[];
232
+ /**
233
+ * Number of output slots written by the last successful sort: a multiple of 16 (0 before the first successful sort).
234
+ */
235
+ get paddedCount(): number;
236
+ /**
237
+ * Number of instances to draw (16 splats per instance) after the last successful sort.
238
+ */
239
+ get instanceCount(): number;
240
+ /**
241
+ * Incremented each time the underlying buffer and vertex buffers are recreated.
242
+ */
243
+ get buffersVersion(): number;
244
+ /**
245
+ * Creates (or grows) the GPU buffer so it can hold the given number of slots.
246
+ * @param paddedCount number of slots
247
+ * @param maxCapacity maximum capacity allowed by the device limits
248
+ * @internal
249
+ */
250
+ _ensureCapacity(paddedCount: number, maxCapacity: number): void;
251
+ /**
252
+ * Releases the GPU resources.
253
+ */
254
+ dispose(): void;
255
+ private _releaseBuffers;
256
+ }
257
+ /**
258
+ * WebGPU compute depth sorter for Gaussian Splatting. It reproduces the ordering of the CPU sort worker (back-to-front counting sort) entirely on the GPU,
259
+ * and writes the sorted splat indices in a vertex buffer ready to be used as the instanced `splatIndex` attributes ({@link GaussianSplattingGpuSortOutput}).
260
+ *
261
+ * Pipeline of a sort (all dispatches are enqueued on the engine's command encoder, without any CPU readback):
262
+ * 1. keys: for each active splat, compute the view depth and quantize it to a `keyBits`-bit key (farthest = smallest). Supports splat intervals,
263
+ * compound parts (per-part matrices) and SOG decoded means.
264
+ * 2. a stable LSD radix sort with 4-bit digits, `ceil(keyBits / 4)` passes of count, scan (2 levels) and scatter. No subgroup operation is required.
265
+ * 3. output: writes the sorted indices as float32, padding to a multiple of 16 with `vertexCount`.
266
+ *
267
+ * Usage constraints:
268
+ * - {@link sort} ends the current render pass: call it outside of any render pass (e.g. in `onBeforeRenderObservable` / `onBeforeCameraRenderObservable`).
269
+ * - Uniform-like data is written with queue writes, which take effect before the whole frame's commands. So call {@link sort} at most once per output and per frame, and do not
270
+ * change the source, the intervals or the part matrices between two sorts of the same frame.
271
+ * - If the textures given to {@link setSource} are recreated, call {@link setSource} again.
272
+ * - The compute shaders and the WebGPU compute engine extension are loaded by {@link GaussianSplattingGpuSorter.LoadDependenciesAsync}: await it before the first {@link sort}.
273
+ * Until it has completed, {@link sort} returns false without enqueuing anything.
274
+ * @experimental
275
+ */
276
+ export declare class GaussianSplattingGpuSorter {
277
+ private static _DependenciesReady;
278
+ private static _DependenciesPromise;
279
+ private readonly _engine;
280
+ private readonly _name;
281
+ private readonly _keyBits;
282
+ private readonly _passCount;
283
+ private readonly _maxSplatCount;
284
+ private readonly _maxIntervalCount;
285
+ private _vertexCount;
286
+ private _textureWidth;
287
+ private _centersTexture;
288
+ private _meansHighTexture;
289
+ private _partIndicesTexture;
290
+ private readonly _meansMin;
291
+ private readonly _meansMax;
292
+ private _boundsMin;
293
+ private _boundsMax;
294
+ private _partMatrices;
295
+ private _partCount;
296
+ private _rawIntervals;
297
+ private _packedIntervals;
298
+ private _intervalCount;
299
+ private _intervalsDirty;
300
+ private _intervalsValid;
301
+ private _activeCount;
302
+ private _bindingsVersion;
303
+ private _sortShadersBoundVersion;
304
+ private _capacity;
305
+ private _keysA;
306
+ private _keysB;
307
+ private _valsA;
308
+ private _valsB;
309
+ private _sumTable;
310
+ private _intervalsBuffer;
311
+ private _intervalsCapacity;
312
+ private readonly _chunkSums;
313
+ private readonly _passParams;
314
+ private _passParamsActiveCount;
315
+ private readonly _passData;
316
+ private readonly _countCs;
317
+ private readonly _scatterCs;
318
+ private readonly _scanLocalCs;
319
+ private readonly _scanSumsCs;
320
+ private readonly _paramsData;
321
+ private readonly _paramsU32;
322
+ private readonly _paramsF32;
323
+ private _coefs;
324
+ private readonly _depthRange;
325
+ private readonly _outputs;
326
+ private _disposed;
327
+ /**
328
+ * Whether GPU sorting is available on an engine: a WebGPU engine with compute shader support.
329
+ * @param engine the engine
330
+ * @returns true if a {@link GaussianSplattingGpuSorter} can be created
331
+ */
332
+ static IsSupported(engine: AbstractEngine): boolean;
333
+ /**
334
+ * Gets the maximum number of splats the sorter can sort on an engine.
335
+ * @param engine the engine
336
+ * @returns the maximum splat count
337
+ */
338
+ static GetMaxSupportedSplatCount(engine: AbstractEngine): number;
339
+ /**
340
+ * Registers the WebGPU compute engine extension and loads the compute shaders of the sorter. The result is cached: calling it again returns the same promise.
341
+ * It must have completed before the first {@link sort} (which returns false until then). If loading fails, the promise rejects and the next call retries.
342
+ * @returns a promise resolved when the dependencies are ready
343
+ */
344
+ static LoadDependenciesAsync(): Promise<void>;
345
+ /**
346
+ * Creates a GPU sorter. Shaders are compiled asynchronously: {@link sort} returns false until they are ready.
347
+ * Await {@link GaussianSplattingGpuSorter.LoadDependenciesAsync} before the first {@link sort}.
348
+ * @param engine the WebGPU engine
349
+ * @param name debug name
350
+ * @param keyBits number of bits of the depth sort keys (8 to 24, default 16). Each 4 bits cost one radix pass; 16 bits is enough for most scenes.
351
+ */
352
+ constructor(engine: AbstractEngine, name?: string, keyBits?: number);
353
+ /**
354
+ * Number of splats rendered after applying the intervals (the number of keys sorted).
355
+ */
356
+ get activeCount(): number;
357
+ /**
358
+ * Number of output slots (activeCount rounded up to a multiple of 16).
359
+ */
360
+ get paddedCount(): number;
361
+ /**
362
+ * Number of bits of the depth sort keys.
363
+ */
364
+ get keyBits(): number;
365
+ /**
366
+ * Sets the splat data to sort.
367
+ * @param source the source textures and layout
368
+ * @returns false (and logs an error) if the source or active interval count exceeds {@link GaussianSplattingGpuSorter.GetMaxSupportedSplatCount}
369
+ */
370
+ setSource(source: IGaussianSplattingGpuSortSource): boolean;
371
+ /**
372
+ * Sets the transform of each part of a compound mesh. Used instead of the world matrix given to {@link sort} when a part indices texture was set in {@link setSource}.
373
+ * The matrices are copied: call this again when they change.
374
+ * @param matrices one matrix per part, or a flat array of 16 floats per part, or null for a non-compound mesh
375
+ */
376
+ setPartMatrices(matrices: Nullable<ReadonlyArray<GaussianSplattingGpuSortMatrix> | ArrayLike<number>>): void;
377
+ /**
378
+ * Restricts the sort to ranges of source splats, like the CPU worker's `intervals` message.
379
+ * @param intervals flat `[start0, count0, start1, count1, ...]` (start, COUNT pairs), or null to sort every splat
380
+ * @returns false (and logs an error) if the packed intervals or padded active count exceed the scan or device storage-buffer limits.
381
+ * Overlapping intervals count each occurrence. Sorting is disabled until valid intervals or a valid source are set.
382
+ */
383
+ setIntervals(intervals: Nullable<ArrayLike<number>>): boolean;
384
+ /**
385
+ * Creates an output receiving the sorted indices of one view. Use one output per camera that is sorted independently.
386
+ * @returns the new output
387
+ */
388
+ createOutput(): GaussianSplattingGpuSortOutput;
389
+ /**
390
+ * Enqueues the sort of the active splats for a view. Call it outside of any render pass, once per output and per frame.
391
+ * @param output the output receiving the sorted indices
392
+ * @param worldMatrix world matrix of the mesh (ignored for compound meshes, which use the part matrices)
393
+ * @param viewMatrix view matrix of the camera
394
+ * @param options handedness, camera position and depth range
395
+ * @returns false if nothing was enqueued (unsupported active intervals, shaders still compiling, no source, or no depth range), true otherwise
396
+ */
397
+ sort(output: GaussianSplattingGpuSortOutput, worldMatrix: GaussianSplattingGpuSortMatrix, viewMatrix: GaussianSplattingGpuSortMatrix, options?: IGaussianSplattingGpuSortOptions): boolean;
398
+ /**
399
+ * Releases all the GPU resources, including the outputs created by {@link createOutput}.
400
+ */
401
+ dispose(): void;
402
+ private _refreshIntervals;
403
+ private _releaseSortBuffers;
404
+ private _ensureCapacity;
405
+ private _ensureIntervalsBuffer;
406
+ private _ensureCoefsBuffer;
407
+ private _getKeysComputeShader;
408
+ private _bindResources;
409
+ private _bindSortShaders;
410
+ private _isReady;
411
+ private _writeParams;
412
+ private _writeIntervals;
413
+ private _writePassParams;
414
+ private _dispatchSort;
415
+ }