@onerjs/core 9.0.0 → 9.0.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 (352) hide show
  1. package/Animations/animationGroup.pure.js.map +1 -1
  2. package/Cameras/targetCamera.pure.js +6 -1
  3. package/Cameras/targetCamera.pure.js.map +1 -1
  4. package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
  5. package/Engines/Native/nativeHardwareTexture.js +7 -0
  6. package/Engines/Native/nativeHardwareTexture.js.map +1 -1
  7. package/Engines/Native/nativeHelpers.js +56 -1
  8. package/Engines/Native/nativeHelpers.js.map +1 -1
  9. package/Engines/Native/nativeInterfaces.d.ts +37 -8
  10. package/Engines/Native/nativeInterfaces.js.map +1 -1
  11. package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
  12. package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
  13. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  14. package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
  15. package/Engines/Processors/shaderCodeCursor.js +40 -3
  16. package/Engines/Processors/shaderCodeCursor.js.map +1 -1
  17. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
  18. package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
  19. package/Engines/abstractEngine.pure.d.ts +15 -1
  20. package/Engines/abstractEngine.pure.js +12 -4
  21. package/Engines/abstractEngine.pure.js.map +1 -1
  22. package/Engines/engine.pure.d.ts +0 -1
  23. package/Engines/engine.pure.js +0 -7
  24. package/Engines/engine.pure.js.map +1 -1
  25. package/Engines/nativeEngine.pure.js +1 -1
  26. package/Engines/nativeEngine.pure.js.map +1 -1
  27. package/Engines/thinEngine.pure.d.ts +1 -0
  28. package/Engines/thinEngine.pure.js +13 -2
  29. package/Engines/thinEngine.pure.js.map +1 -1
  30. package/Engines/thinNativeEngine.pure.d.ts +217 -17
  31. package/Engines/thinNativeEngine.pure.js +1431 -164
  32. package/Engines/thinNativeEngine.pure.js.map +1 -1
  33. package/Engines/thinWebGPUEngine.js +6 -1
  34. package/Engines/thinWebGPUEngine.js.map +1 -1
  35. package/Engines/webgpuEngine.pure.d.ts +12 -1
  36. package/Engines/webgpuEngine.pure.js +8 -0
  37. package/Engines/webgpuEngine.pure.js.map +1 -1
  38. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
  39. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
  40. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
  41. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
  42. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
  43. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
  44. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +16 -4
  45. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +20 -6
  46. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
  47. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
  48. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
  49. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +7 -7
  50. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +52 -35
  51. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
  52. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
  53. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
  54. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
  55. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
  56. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
  57. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
  58. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
  59. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
  60. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
  61. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
  62. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
  63. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
  64. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
  65. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
  66. package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
  67. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
  68. package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
  69. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
  70. package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
  71. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  72. package/FlowGraph/flowGraph.d.ts +2 -1
  73. package/FlowGraph/flowGraph.js +3 -2
  74. package/FlowGraph/flowGraph.js.map +1 -1
  75. package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
  76. package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
  77. package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
  78. package/FlowGraph/flowGraphContext.js +1 -0
  79. package/FlowGraph/flowGraphContext.js.map +1 -1
  80. package/FlowGraph/flowGraphValidator.js +0 -4
  81. package/FlowGraph/flowGraphValidator.js.map +1 -1
  82. package/FlowGraph/index.d.ts +2 -0
  83. package/FlowGraph/index.js +2 -0
  84. package/FlowGraph/index.js.map +1 -1
  85. package/FlowGraph/pure.d.ts +2 -0
  86. package/FlowGraph/pure.js +2 -0
  87. package/FlowGraph/pure.js.map +1 -1
  88. package/FlowGraph/serialization.d.ts +2 -2
  89. package/FlowGraph/serialization.js +2 -2
  90. package/FlowGraph/serialization.js.map +1 -1
  91. package/FlowGraph/typeDefinitions.d.ts +1 -1
  92. package/FlowGraph/typeDefinitions.js.map +1 -1
  93. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
  94. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
  95. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
  96. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
  97. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
  98. package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
  99. package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
  100. package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
  101. package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
  102. package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
  103. package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
  104. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  105. package/FrameGraph/Node/Blocks/index.js +1 -0
  106. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  107. package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
  108. package/FrameGraph/Node/Blocks/pure.js +1 -0
  109. package/FrameGraph/Node/Blocks/pure.js.map +1 -1
  110. package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
  111. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
  112. package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
  113. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -1
  114. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  115. package/FrameGraph/frameGraph.d.ts +4 -0
  116. package/FrameGraph/frameGraph.js +14 -0
  117. package/FrameGraph/frameGraph.js.map +1 -1
  118. package/FrameGraph/index.d.ts +1 -0
  119. package/FrameGraph/index.js +1 -0
  120. package/FrameGraph/index.js.map +1 -1
  121. package/FrameGraph/pure.d.ts +1 -0
  122. package/FrameGraph/pure.js +1 -0
  123. package/FrameGraph/pure.js.map +1 -1
  124. package/Inputs/scene.inputManager.js +1 -1
  125. package/Inputs/scene.inputManager.js.map +1 -1
  126. package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
  127. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
  128. package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
  129. package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
  130. package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
  131. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
  132. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
  133. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
  134. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
  135. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
  136. package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
  137. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
  138. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
  139. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
  140. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
  141. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
  142. package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
  143. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
  144. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +98 -0
  145. package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
  146. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +1 -1
  147. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
  148. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -2
  149. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  150. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
  151. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
  152. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
  153. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
  154. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
  155. package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
  156. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
  157. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
  158. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
  159. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
  160. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
  161. package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
  162. package/Materials/GaussianSplatting/pure.d.ts +4 -0
  163. package/Materials/GaussianSplatting/pure.js +4 -0
  164. package/Materials/GaussianSplatting/pure.js.map +1 -1
  165. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
  166. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
  167. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
  168. package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +1 -0
  169. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +31 -7
  170. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  171. package/Materials/Textures/mirrorTexture.pure.js +3 -1
  172. package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
  173. package/Materials/Textures/texture.pure.js +1 -1
  174. package/Materials/Textures/texture.pure.js.map +1 -1
  175. package/Materials/effectRenderer.pure.d.ts +4 -0
  176. package/Materials/effectRenderer.pure.js +3 -2
  177. package/Materials/effectRenderer.pure.js.map +1 -1
  178. package/Materials/index.d.ts +4 -0
  179. package/Materials/index.js +4 -0
  180. package/Materials/index.js.map +1 -1
  181. package/Materials/material.pure.js +25 -12
  182. package/Materials/material.pure.js.map +1 -1
  183. package/Materials/pure.d.ts +4 -0
  184. package/Materials/pure.js +4 -0
  185. package/Materials/pure.js.map +1 -1
  186. package/Materials/standardMaterial.pure.d.ts +8 -0
  187. package/Materials/standardMaterial.pure.js +24 -2
  188. package/Materials/standardMaterial.pure.js.map +1 -1
  189. package/Meshes/Builders/polygonBuilder.pure.js +1 -1
  190. package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
  191. package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
  192. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
  193. package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
  194. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
  195. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
  196. package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
  197. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
  198. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
  199. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
  200. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
  201. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
  202. package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
  203. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
  204. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
  205. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  206. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +160 -0
  207. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +219 -0
  208. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  209. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +32 -4
  210. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +114 -21
  211. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  212. package/Meshes/GaussianSplatting/pure.d.ts +2 -0
  213. package/Meshes/GaussianSplatting/pure.js +2 -0
  214. package/Meshes/GaussianSplatting/pure.js.map +1 -1
  215. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
  216. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
  217. package/Meshes/abstractMesh.pure.d.ts +12 -0
  218. package/Meshes/abstractMesh.pure.js +32 -0
  219. package/Meshes/abstractMesh.pure.js.map +1 -1
  220. package/Meshes/index.d.ts +1 -0
  221. package/Meshes/index.js +1 -0
  222. package/Meshes/index.js.map +1 -1
  223. package/Meshes/pure.d.ts +1 -0
  224. package/Meshes/pure.js +1 -0
  225. package/Meshes/pure.js.map +1 -1
  226. package/Meshes/subMesh.pure.d.ts +11 -2
  227. package/Meshes/subMesh.pure.js +20 -5
  228. package/Meshes/subMesh.pure.js.map +1 -1
  229. package/Meshes/thinInstanceMesh.pure.js +1 -0
  230. package/Meshes/thinInstanceMesh.pure.js.map +1 -1
  231. package/Misc/andOrNotEvaluator.js +4 -0
  232. package/Misc/andOrNotEvaluator.js.map +1 -1
  233. package/Misc/minMaxReducer.pure.d.ts +6 -0
  234. package/Misc/minMaxReducer.pure.js +10 -0
  235. package/Misc/minMaxReducer.pure.js.map +1 -1
  236. package/Misc/thinMinMaxReducer.d.ts +19 -2
  237. package/Misc/thinMinMaxReducer.js +74 -21
  238. package/Misc/thinMinMaxReducer.js.map +1 -1
  239. package/Misc/tools.pure.js +1 -1
  240. package/Misc/tools.pure.js.map +1 -1
  241. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
  242. package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
  243. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
  244. package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
  245. package/Particles/gpuParticleSystem.pure.d.ts +2 -0
  246. package/Particles/gpuParticleSystem.pure.js +12 -4
  247. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  248. package/Particles/particle.js +3 -2
  249. package/Particles/particle.js.map +1 -1
  250. package/Particles/solidParticleSystem.js +7 -1
  251. package/Particles/solidParticleSystem.js.map +1 -1
  252. package/Particles/thinParticleSystem.function.d.ts +6 -0
  253. package/Particles/thinParticleSystem.function.js +144 -88
  254. package/Particles/thinParticleSystem.function.js.map +1 -1
  255. package/Particles/thinParticleSystem.pure.d.ts +6 -0
  256. package/Particles/thinParticleSystem.pure.js +70 -9
  257. package/Particles/thinParticleSystem.pure.js.map +1 -1
  258. package/Physics/v2/ragdoll.d.ts +2 -4
  259. package/Physics/v2/ragdoll.js +11 -4
  260. package/Physics/v2/ragdoll.js.map +1 -1
  261. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
  262. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +43 -18
  263. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
  264. package/Rendering/depthRenderer.pure.d.ts +9 -0
  265. package/Rendering/depthRenderer.pure.js +12 -0
  266. package/Rendering/depthRenderer.pure.js.map +1 -1
  267. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +4 -0
  268. package/Rendering/fluidRenderer/fluidRenderingObject.js +6 -0
  269. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  270. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +4 -0
  271. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +8 -0
  272. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
  273. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
  274. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  275. package/Rendering/geometryBufferRenderer.pure.js +4 -1
  276. package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
  277. package/Rendering/prePassRenderer.pure.js +3 -3
  278. package/Rendering/prePassRenderer.pure.js.map +1 -1
  279. package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
  280. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  281. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
  282. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  283. package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
  284. package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
  285. package/Shaders/minmaxRedux.fragment.js +6 -1
  286. package/Shaders/minmaxRedux.fragment.js.map +1 -1
  287. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
  288. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
  289. package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
  290. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
  291. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
  292. package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
  293. package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
  294. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
  295. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  296. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
  297. package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
  298. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
  299. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
  300. package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
  301. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
  302. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  303. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
  304. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
  305. package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
  306. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
  307. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
  308. package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
  309. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
  310. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
  311. package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
  312. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
  313. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  314. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
  315. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  316. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
  317. package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
  318. package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
  319. package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
  320. package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
  321. package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
  322. package/ShadersWGSL/gpsPartition.compute.js +27 -0
  323. package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
  324. package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
  325. package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
  326. package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
  327. package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
  328. package/ShadersWGSL/gpsResolve.compute.js +41 -0
  329. package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
  330. package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
  331. package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
  332. package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
  333. package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
  334. package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
  335. package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
  336. package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
  337. package/ShadersWGSL/gpsScanSums.compute.js +30 -0
  338. package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
  339. package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
  340. package/ShadersWGSL/gpsSplat.compute.js +37 -0
  341. package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
  342. package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
  343. package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
  344. package/XR/features/WebXRSpaceWarp.pure.js +2 -1
  345. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  346. package/assetContainer.d.ts +1 -0
  347. package/assetContainer.js +5 -1
  348. package/assetContainer.js.map +1 -1
  349. package/package.json +1 -1
  350. package/scene.pure.d.ts +13 -2
  351. package/scene.pure.js +28 -4
  352. package/scene.pure.js.map +1 -1
@@ -9,7 +9,7 @@ import { type RenderTargetCreationOptions, type TextureSize, type DepthTextureCr
9
9
  import { type IPipelineContext } from "./IPipelineContext.js";
10
10
  import { type IMultiRenderTargetOptions } from "../Materials/Textures/multiRenderTarget.pure.js";
11
11
  import { type IColor3Like, type IColor4Like, type IViewportLike } from "../Maths/math.like.js";
12
- import { type ISceneLike } from "./abstractEngine.pure.js";
12
+ import { type AbstractEngineOptions, type ISceneLike } from "./abstractEngine.pure.js";
13
13
  import { ThinEngine } from "./thinEngine.pure.js";
14
14
  import { type IMaterialContext } from "./IMaterialContext.js";
15
15
  import { type IDrawContext } from "./IDrawContext.js";
@@ -21,7 +21,7 @@ import { type INative, type INativeEngine, type NativeFramebuffer, type NativeTe
21
21
  import { NativeRenderTargetWrapper } from "./Native/nativeRenderTargetWrapper.js";
22
22
  import { type IHardwareTextureWrapper } from "../Materials/Textures/hardwareTextureWrapper.js";
23
23
  import { type _IShaderProcessingContext } from "./Processors/shaderProcessingOptions.js";
24
- import { type ShaderLanguage } from "../Materials/shaderLanguage.js";
24
+ import { ShaderLanguage } from "../Materials/shaderLanguage.js";
25
25
  import { type WebGLHardwareTexture } from "./WebGL/webGLHardwareTexture.js";
26
26
  import { _TimeToken } from "../Instrumentation/timeToken.js";
27
27
  /**
@@ -50,7 +50,7 @@ declare class NativeDataBuffer extends DataBuffer {
50
50
  /**
51
51
  * Options to create the Native engine
52
52
  */
53
- export interface ThinNativeEngineOptions {
53
+ export interface ThinNativeEngineOptions extends AbstractEngineOptions {
54
54
  /**
55
55
  * defines whether to adapt to the device's viewport characteristics (default: false)
56
56
  */
@@ -66,6 +66,13 @@ export declare class ThinNativeEngine extends ThinEngine {
66
66
  private _commandBufferEncoder;
67
67
  private _frameStats;
68
68
  private _boundBuffersVertexArray;
69
+ private _transformFeedbackBuffer;
70
+ private _transformFeedbackActive;
71
+ /**
72
+ * Bit i is set when color attachment i is selected by the last bindAttachments() call.
73
+ * Only used to mask clears (see bindAttachments).
74
+ */
75
+ private _clearAttachmentMask;
69
76
  private _currentDepthTest;
70
77
  private _depthTestEnabled;
71
78
  private _stencilTest;
@@ -85,6 +92,10 @@ export declare class ThinNativeEngine extends ThinEngine {
85
92
  private _cachedZOffsetUnits;
86
93
  private _depthWrite;
87
94
  private _fillModeWarningDisplayed;
95
+ private _int2Scratch;
96
+ private _int3Scratch;
97
+ private _int4Scratch;
98
+ private _frameGraphFramebufferRefCount;
88
99
  constructor(options?: ThinNativeEngineOptions);
89
100
  /**
90
101
  * Keeps as a separate function to use in NativeEngine
@@ -140,10 +151,12 @@ export declare class ThinNativeEngine extends ThinEngine {
140
151
  }): WebGLVertexArrayObject;
141
152
  private _deleteVertexArray;
142
153
  bindVertexArrayObject(vertexArray: WebGLVertexArrayObject): void;
154
+ /** @internal Native vertex arrays capture their buffers when recorded; there is no bound array buffer. */
155
+ bindArrayBuffer(_buffer: Nullable<DataBuffer>): void;
143
156
  releaseVertexArrayObject(vertexArray: WebGLVertexArrayObject): void;
144
157
  getAttributes(pipelineContext: IPipelineContext, attributesNames: string[]): number[];
145
158
  /**
146
- * Triangle Fan and Line Loop are not supported by modern rendering API
159
+ * Check whether the runtime can expand primitive modes unavailable in modern rendering APIs.
147
160
  * @param fillMode defines the primitive to use
148
161
  * @returns true if supported
149
162
  */
@@ -164,6 +177,24 @@ export declare class ThinNativeEngine extends ThinEngine {
164
177
  * @param instancesCount defines the number of instances to draw (if instantiation is enabled)
165
178
  */
166
179
  drawArraysType(fillMode: number, verticesStart: number, verticesCount: number, instancesCount?: number): void;
180
+ /** @internal Transform feedback objects are implicit on native; state lives on the engine. */
181
+ createTransformFeedback(): WebGLTransformFeedback;
182
+ /** @internal */
183
+ deleteTransformFeedback(_value: WebGLTransformFeedback): void;
184
+ /** @internal */
185
+ bindTransformFeedback(_value: Nullable<WebGLTransformFeedback>): void;
186
+ /** @internal */
187
+ bindTransformFeedbackBuffer(value: Nullable<DataBuffer>): void;
188
+ /** @internal Varyings are passed to the native program when it is created. */
189
+ setTranformFeedbackVaryings(_program: WebGLProgram, _value: string[]): void;
190
+ /** @internal */
191
+ beginTransformFeedback(_usePoints?: boolean): void;
192
+ /** @internal */
193
+ endTransformFeedback(): void;
194
+ /** @internal */
195
+ readTransformFeedbackBuffer(target: ArrayBufferView): void;
196
+ /** @internal Transform feedback draws never rasterize on native. */
197
+ setRasterizerState(_value: boolean): void;
167
198
  createPipelineContext(shaderProcessingContext: Nullable<_IShaderProcessingContext>): IPipelineContext;
168
199
  createMaterialContext(): IMaterialContext | undefined;
169
200
  createDrawContext(): IDrawContext | undefined;
@@ -171,17 +202,17 @@ export declare class ThinNativeEngine extends ThinEngine {
171
202
  * Function is not technically Async
172
203
  * @internal
173
204
  */
174
- _preparePipelineContextAsync(pipelineContext: IPipelineContext, vertexSourceCode: string, fragmentSourceCode: string, createAsRaw: boolean, _rawVertexSourceCode: string, _rawFragmentSourceCode: string, _rebuildRebind: any, defines: Nullable<string>, _transformFeedbackVaryings: Nullable<string[]>, _key: string, onReady: () => void): void;
205
+ _preparePipelineContextAsync(pipelineContext: IPipelineContext, vertexSourceCode: string, fragmentSourceCode: string, createAsRaw: boolean, _rawVertexSourceCode: string, _rawFragmentSourceCode: string, _rebuildRebind: any, defines: Nullable<string>, transformFeedbackVaryings: Nullable<string[]>, _key: string, onReady: () => void): void;
175
206
  /**
176
207
  * @internal
177
208
  */
178
- _getShaderProcessingContext(_shaderLanguage: ShaderLanguage): Nullable<_IShaderProcessingContext>;
209
+ _getShaderProcessingContext(shaderLanguage: ShaderLanguage): Nullable<_IShaderProcessingContext>;
179
210
  /**
180
211
  * @internal
181
212
  */
182
213
  _executeWhenRenderingStateIsCompiled(pipelineContext: IPipelineContext, action: () => void): void;
183
214
  createRawShaderProgram(): WebGLProgram;
184
- createShaderProgram(pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, defines: Nullable<string>): WebGLProgram;
215
+ createShaderProgram(pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, defines: Nullable<string>, _context?: WebGLRenderingContext, transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
185
216
  /**
186
217
  * Inline functions in shader code that are marked to be inlined
187
218
  * @param code code to inline
@@ -230,7 +261,6 @@ export declare class ThinNativeEngine extends ThinEngine {
230
261
  setDepthBuffer(enable: boolean): void;
231
262
  private _encodeDepthTest;
232
263
  private _flushDepthTestState;
233
- applyStates(): void;
234
264
  /**
235
265
  * Gets a boolean indicating if depth writing is enabled
236
266
  * @returns the current depth writing state
@@ -253,6 +283,20 @@ export declare class ThinNativeEngine extends ThinEngine {
253
283
  * @returns the current color writing state
254
284
  */
255
285
  getColorWrite(): boolean;
286
+ /**
287
+ * Apply the currently pending engine states.
288
+ *
289
+ * The base ThinEngine.applyStates() flushes state by calling
290
+ * this._depthCullingState.apply(this._gl) (and similar for alpha/stencil), but the
291
+ * native engine has no WebGL context (_gl is undefined), so inheriting that path
292
+ * throws "Cannot read properties of undefined (reading 'depthMask')". Callers such
293
+ * as the depth-peeling (OIT) renderer mutate engine.depthCullingState directly and
294
+ * then call applyStates() expecting the change to be flushed, so reconcile the shared
295
+ * depth-culling state into the native command buffer here instead. Alpha and stencil
296
+ * states are already encoded immediately on the native side (setAlphaMode /
297
+ * setStencil* emit commands directly), so only the depth state needs reconciling.
298
+ */
299
+ applyStates(): void;
256
300
  private applyStencil;
257
301
  private _setStencil;
258
302
  /**
@@ -291,8 +335,8 @@ export declare class ThinNativeEngine extends ThinEngine {
291
335
  */
292
336
  setStencilFunctionReference(reference: number): void;
293
337
  /**
294
- * Sets the current stencil mask
295
- * @param mask defines the new stencil mask to use
338
+ * Sets the current stencil function mask
339
+ * @param mask defines the new stencil function mask to use
296
340
  */
297
341
  setStencilFunctionMask(mask: number): void;
298
342
  /**
@@ -351,7 +395,19 @@ export declare class ThinNativeEngine extends ThinEngine {
351
395
  * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering
352
396
  */
353
397
  setAlphaMode(mode: number, noDepthWriteChange?: boolean, targetIndex?: number): void;
398
+ /**
399
+ * Sets the current alpha blend equation (ADD / SUB / MAX / MIN / ...).
400
+ * Dual depth peeling (OIT) requires ALPHA_EQUATION_MAX so peel passes accumulate
401
+ * farthest/nearest depths. Native previously only wired blend *factors*; equations
402
+ * stayed at bgfx's default ADD and transparent peels never wrote useful depth.
403
+ * @param equation one of Constants.ALPHA_EQUATION_*
404
+ * @param targetIndex MRT attachment index (Native applies equation globally; kept for API parity)
405
+ */
406
+ setAlphaEquation(equation: number, targetIndex?: number): void;
354
407
  setInt(uniform: WebGLUniformLocation, int: number): boolean;
408
+ setInt2(uniform: Nullable<WebGLUniformLocation>, x: number, y: number): boolean;
409
+ setInt3(uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number): boolean;
410
+ setInt4(uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number, w: number): boolean;
355
411
  setIntArray(uniform: WebGLUniformLocation, array: Int32Array): boolean;
356
412
  setIntArray2(uniform: WebGLUniformLocation, array: Int32Array): boolean;
357
413
  setIntArray3(uniform: WebGLUniformLocation, array: Int32Array): boolean;
@@ -390,7 +446,42 @@ export declare class ThinNativeEngine extends ThinEngine {
390
446
  updateVideoTexture(texture: Nullable<InternalTexture>, video: HTMLVideoElement, invertY: boolean): void;
391
447
  createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number, creationFlags?: number, useSRGBBuffer?: boolean): InternalTexture;
392
448
  createRawTexture2DArray(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
449
+ createRawTexture3D(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
450
+ updateRawTexture3D(texture: Nullable<InternalTexture>, bufferView: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression?: Nullable<string>, textureType?: number): void;
393
451
  updateRawTexture(texture: Nullable<InternalTexture>, bufferView: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression?: Nullable<string>, type?: number, useSRGBBuffer?: boolean): void;
452
+ /**
453
+ * Creates a raw cube texture on the native engine.
454
+ *
455
+ * The WebGL implementation (engine.rawTexture) drives the whole upload through `this._gl`, which is null
456
+ * on Native, so loading an HDR/`.env` cube via `createRawCubeTextureFromUrl` used to throw
457
+ * `Cannot read properties of undefined (reading 'FLOAT')`. This override allocates a native cube texture
458
+ * and uploads its faces through the bgfx `updateTextureData` path instead.
459
+ *
460
+ * Native has no 3-component float texture format, so an RGB float/half-float source (what HDRCubeTexture
461
+ * requests) is allocated and uploaded as RGBA; the per-face RGB->RGBA expansion happens in
462
+ * `updateRawCubeTexture`.
463
+ * @param data defines the data used to create the texture (6 faces, +X +Y +Z -X -Y -Z) or null
464
+ * @param size defines the size of the textures (each face is size x size)
465
+ * @param format defines the format of the data
466
+ * @param type defines the type of the data
467
+ * @param generateMipMaps defines if the engine should generate the mip levels
468
+ * @param invertY defines if data must be stored with Y axis inverted
469
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
470
+ * @param compression defines the compression used (null by default)
471
+ * @returns the cube texture as an InternalTexture
472
+ */
473
+ createRawCubeTexture(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
474
+ /**
475
+ * Updates a raw cube texture on the native engine.
476
+ * @param texture defines the texture to update
477
+ * @param data defines the data to store (6 faces, +X +Y +Z -X -Y -Z)
478
+ * @param format defines the data format
479
+ * @param type defines the type of the data
480
+ * @param invertY defines if data must be stored with Y axis inverted
481
+ * @param compression defines the compression used (null by default)
482
+ * @param level defines which mip level of the texture to update (0 by default)
483
+ */
484
+ updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression?: Nullable<string>, level?: number): void;
394
485
  /**
395
486
  * Usually called from Texture.ts.
396
487
  * Passed information to create a NativeTexture
@@ -444,11 +535,98 @@ export declare class ThinNativeEngine extends ThinEngine {
444
535
  * @param texture defines the new native texture handle to wrap
445
536
  */
446
537
  updateWrappedNativeTexture(internalTexture: InternalTexture, texture: NativeTexture): void;
538
+ /**
539
+ * Creates a depth/stencil texture for a render target wrapper.
540
+ * @param size The size of the depth texture
541
+ * @param options The options defining the depth texture
542
+ * @param rtWrapper The render target wrapper the depth texture belongs to
543
+ * @returns The depth/stencil texture
544
+ */
545
+ createDepthStencilTexture(size: TextureSize, options: DepthTextureCreationOptions, rtWrapper: RenderTargetWrapper): InternalTexture;
447
546
  _createDepthStencilTexture(size: TextureSize, options: DepthTextureCreationOptions, rtWrapper: RenderTargetWrapper): InternalTexture;
547
+ /**
548
+ * Builds the framebuffer(s) of a render target so they carry its sampleable depth/stencil texture. The depth
549
+ * texture's native handle must not be allocated yet: the first framebuffer creation allocates it.
550
+ * @internal
551
+ */
552
+ _attachDepthStencilTexture(nativeRTWrapper: NativeRenderTargetWrapper, texture: InternalTexture, width: number, height: number, generateStencil: boolean, samples: number): void;
553
+ private _recreateDepthStencilTexture;
554
+ /**
555
+ * Returns whether a render-target texture was created with mip storage, independently of generateMipMaps.
556
+ * @internal
557
+ */
558
+ _hasMipStorage(texture: InternalTexture): boolean;
559
+ private _setHasMipStorage;
560
+ /**
561
+ * Ensures a cloned render-target texture retains allocation-only mip storage.
562
+ * @internal
563
+ */
564
+ _ensureRenderTargetMipStorage(texture: InternalTexture): boolean;
565
+ /**
566
+ * Rebuilds native framebuffer objects after a wrapper's explicit depth attachment changes.
567
+ * @internal
568
+ */
569
+ _rebuildRenderTargetFramebuffersAfterDepthChange(nativeRTWrapper: NativeRenderTargetWrapper): void;
570
+ /**
571
+ * Rejects an explicit depth attachment the render target cannot use, before any attachment state is mutated.
572
+ * bgfx requires every framebuffer attachment to share one sample count.
573
+ * @internal
574
+ */
575
+ _assertDepthAttachmentCompatible(rtWrapper: NativeRenderTargetWrapper, depthSamples: number): void;
576
+ /**
577
+ * Whether the depth attachment carries stencil: an explicit depth texture decides from its own format (its handle
578
+ * may be unallocated after a sample-count change), otherwise the automatic depth buffer request does.
579
+ * @internal
580
+ */
581
+ _getDepthAttachmentStencil(rtWrapper: NativeRenderTargetWrapper): boolean;
582
+ /** @internal */
583
+ _assertVolumeDepthAttachmentSupported(depthSamples?: number, colorSamples?: number): void;
584
+ /**
585
+ * Updates a depth texture Comparison Mode and Function.
586
+ * @param texture The texture to set the comparison function for
587
+ * @param comparisonFunction The comparison function to set, 0 if no comparison required
588
+ */
589
+ updateTextureComparisonFunction(texture: InternalTexture, comparisonFunction: number): void;
590
+ /**
591
+ * Generates mipmaps for the given texture.
592
+ * @param _texture The texture to generate the mipmaps for.
593
+ */
594
+ generateMipmaps(_texture: InternalTexture): void;
595
+ /**
596
+ * Creates one framebuffer per layer (or cube face) of a native texture.
597
+ * @internal
598
+ */
599
+ _createLayerFramebuffers(nativeTexture: NativeTexture, width: number, height: number, layerCount: number, generateStencilBuffer: boolean, generateDepthBuffer: boolean, samples: number, autoGenerateMips?: boolean): NativeFramebuffer[];
600
+ /**
601
+ * Per-layer framebuffers carry their own depth/stencil attachment, either requested at creation or added by
602
+ * createDepthStencilTexture (see _createDepthStencilTexture), so recreate them with the same attachments.
603
+ * @internal
604
+ */
605
+ _getLayerFramebufferDepthStencil(rtWrapper: RenderTargetWrapper): {
606
+ generateDepth: boolean;
607
+ generateStencil: boolean;
608
+ };
448
609
  /**
449
610
  * @internal
450
611
  */
451
612
  _releaseFramebufferObjects(framebuffer: Nullable<NativeFramebuffer>): void;
613
+ /**
614
+ * Returns true when the given framebuffer was built by the frame graph path (_buildFrameGraphFramebuffer),
615
+ * i.e. it is reference-counted, shared between wrappers and rebuilt lazily on bind.
616
+ * @param framebuffer The framebuffer to test
617
+ * @returns true if the framebuffer is a frame graph framebuffer
618
+ * @internal
619
+ */
620
+ _isFrameGraphFramebuffer(framebuffer: NativeFramebuffer): boolean;
621
+ /**
622
+ * Lazily builds (or reuses a shared) bgfx framebuffer for a frame graph render-target wrapper whose
623
+ * textures were attached after creation (dontCreateTextures). All wrappers that reference the same
624
+ * underlying color texture share a single framebuffer, cached on that texture's hardware wrapper, so that
625
+ * successive passes (clear, object render, post) accumulate into the same target instead of each fresh
626
+ * framebuffer/view clearing it.
627
+ * @internal
628
+ */
629
+ private _buildFrameGraphFramebuffer;
452
630
  /**
453
631
  * @internal Engine abstraction for loading and creating an image bitmap from a given source string.
454
632
  * @param imageSource source to load the image from.
@@ -475,13 +653,18 @@ export declare class ThinNativeEngine extends ThinEngine {
475
653
  _createHardwareTexture(): IHardwareTextureWrapper;
476
654
  /** @internal */
477
655
  _createHardwareRenderTargetWrapper(isMulti: boolean, isCube: boolean, size: TextureSize): RenderTargetWrapper;
656
+ /**
657
+ * Older bgfx D3D11/D3D12/Vulkan backends share one texture descriptor between the MSAA render target and its
658
+ * resolve target, so requesting mips together with samples > 1 fails texture creation (BabylonNative#1714).
659
+ * Only keep the mip chain of a multisampled render target when the runtime reports that it supports it.
660
+ * @internal
661
+ */
662
+ _getRenderTargetHasMips(generateMipMaps: boolean, samples: number): boolean;
478
663
  /** @internal */
479
664
  _createInternalTexture(size: TextureSize, options: boolean | InternalTextureCreationOptions, _delayGPUTextureCreation?: boolean, source?: InternalTextureSource): InternalTexture;
480
- createRenderTargetTexture(size: number | {
481
- width: number;
482
- height: number;
483
- depth: number;
484
- }, options: boolean | RenderTargetCreationOptions): RenderTargetWrapper;
665
+ private _createInternalCubeTexture;
666
+ createRenderTargetTexture(size: TextureSize, options: boolean | RenderTargetCreationOptions): RenderTargetWrapper;
667
+ private _createRenderTargetTexture3D;
485
668
  createRenderTargetCubeTexture(size: number, options?: RenderTargetCreationOptions): RenderTargetWrapper;
486
669
  createMultipleRenderTarget(size: TextureSize, options: IMultiRenderTargetOptions, _initializeBuffers?: boolean): RenderTargetWrapper;
487
670
  /**
@@ -494,8 +677,15 @@ export declare class ThinNativeEngine extends ThinEngine {
494
677
  * @internal
495
678
  */
496
679
  _createMultiRenderTargetFramebuffer(rtWrapper: NativeRenderTargetWrapper): void;
680
+ private _applyDepthTextureSampling;
681
+ /**
682
+ * Creates a multi-attachment framebuffer, falling back to a single-attachment framebuffer bound to the first
683
+ * color target (and its first requested layer) on older Babylon Native runtimes without createMultiFrameBuffer.
684
+ * @internal
685
+ */
686
+ _createNativeMultiFrameBuffer(colorTextures: NativeTexture[], width: number, height: number, generateStencilBuffer: boolean, generateDepthBuffer: boolean, samples: number, layers?: number[], explicitDepthTexture?: NativeTexture): NativeFramebuffer;
497
687
  generateMipMapsForCubemap(_texture: InternalTexture, _unbind?: boolean): void;
498
- bindAttachments(_attachments: number[]): void;
688
+ bindAttachments(attachments: number[]): void;
499
689
  clearAttachments(color: Nullable<IColor4Like>, attachments: number[], clearColor: boolean, clearDepth: boolean, clearStencil?: boolean, stencilClearValue?: number): void;
500
690
  buildTextureLayout(textureStatus: boolean[], _backBufferLayout?: boolean): number[];
501
691
  restoreSingleAttachment(): void;
@@ -506,7 +696,13 @@ export declare class ThinNativeEngine extends ThinEngine {
506
696
  updateMultipleRenderTargetTextureSampleCount(rtWrapper: Nullable<RenderTargetWrapper>, samples: number, _initializeBuffers?: boolean): number;
507
697
  updateRenderTargetTextureSampleCount(rtWrapper: RenderTargetWrapper, samples: number): number;
508
698
  updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void;
509
- bindFramebuffer(texture: RenderTargetWrapper, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean): void;
699
+ updateTextureWrappingMode(texture: InternalTexture, wrapU: Nullable<number>, wrapV?: Nullable<number>, wrapR?: Nullable<number>): void;
700
+ bindFramebuffer(texture: RenderTargetWrapper, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean, lodLevel?: number, layer?: number): void;
701
+ private _applyBoundViewport;
702
+ private _get3DLayerFramebuffer;
703
+ private _getCubeFaceMipFramebuffer;
704
+ private _isLayeredFrameGraphMRT;
705
+ private _bindLayeredMultiFramebuffer;
510
706
  unBindFramebuffer(texture: RenderTargetWrapper, disableGenerateMipMaps?: boolean, onBeforeUnbind?: () => void): void;
511
707
  createDynamicVertexBuffer(data: DataArray): DataBuffer;
512
708
  updateDynamicIndexBuffer(indexBuffer: DataBuffer, indices: IndicesArray, offset?: number): void;
@@ -524,6 +720,10 @@ export declare class ThinNativeEngine extends ThinEngine {
524
720
  * @internal
525
721
  */
526
722
  _bindTexture(channel: number, texture: Nullable<InternalTexture>): void;
723
+ /**
724
+ * @internal
725
+ */
726
+ _bindTextureDirectly(_target: number, _texture: Nullable<InternalTexture>, _forTextureDataUpdate?: boolean, _force?: boolean): boolean;
527
727
  /**
528
728
  * Unbind all textures
529
729
  */