@babylonjs/core 7.31.2 → 7.32.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 (367) hide show
  1. package/Behaviors/Cameras/autoRotationBehavior.js +1 -0
  2. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  3. package/Cameras/camera.d.ts +5 -2
  4. package/Cameras/camera.js +1 -0
  5. package/Cameras/camera.js.map +1 -1
  6. package/Decorators/nodeDecorator.d.ts +9 -1
  7. package/Decorators/nodeDecorator.js +8 -0
  8. package/Decorators/nodeDecorator.js.map +1 -1
  9. package/Engines/Extensions/engine.multiRender.js +40 -53
  10. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  11. package/Engines/Extensions/engine.renderTarget.js +20 -8
  12. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  13. package/Engines/WebGPU/Extensions/engine.debugging.js +16 -7
  14. package/Engines/WebGPU/Extensions/engine.debugging.js.map +1 -1
  15. package/Engines/WebGPU/Extensions/engine.multiRender.js +43 -44
  16. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  17. package/Engines/WebGPU/Extensions/engine.renderTarget.js +8 -6
  18. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  19. package/Engines/WebGPU/webgpuHardwareTexture.d.ts +3 -3
  20. package/Engines/WebGPU/webgpuHardwareTexture.js +12 -9
  21. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  22. package/Engines/WebGPU/webgpuTextureHelper.js +25 -19
  23. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  24. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  25. package/Engines/WebGPU/webgpuTextureManager.js +5 -3
  26. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  27. package/Engines/abstractEngine.d.ts +6 -1
  28. package/Engines/abstractEngine.js +2 -2
  29. package/Engines/abstractEngine.js.map +1 -1
  30. package/Engines/constants.d.ts +6 -1
  31. package/Engines/constants.js +6 -1
  32. package/Engines/constants.js.map +1 -1
  33. package/Engines/renderTargetWrapper.d.ts +7 -0
  34. package/Engines/renderTargetWrapper.js +15 -0
  35. package/Engines/renderTargetWrapper.js.map +1 -1
  36. package/Engines/webgpuEngine.d.ts +3 -1
  37. package/Engines/webgpuEngine.js +9 -8
  38. package/Engines/webgpuEngine.js.map +1 -1
  39. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.d.ts +47 -0
  40. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +113 -0
  41. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -0
  42. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +62 -0
  43. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +171 -0
  44. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -0
  45. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.d.ts +51 -0
  46. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +127 -0
  47. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -0
  48. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.d.ts +67 -0
  49. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +187 -0
  50. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -0
  51. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.d.ts +77 -0
  52. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +232 -0
  53. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -0
  54. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.d.ts +47 -0
  55. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +113 -0
  56. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -0
  57. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.d.ts +41 -0
  58. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js +79 -0
  59. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js.map +1 -0
  60. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +119 -0
  61. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +451 -0
  62. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -0
  63. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +63 -0
  64. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +154 -0
  65. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -0
  66. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.d.ts +59 -0
  67. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js +131 -0
  68. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js.map +1 -0
  69. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.d.ts +49 -0
  70. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js +107 -0
  71. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -0
  72. package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +50 -0
  73. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +125 -0
  74. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -0
  75. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.d.ts +38 -0
  76. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +71 -0
  77. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -0
  78. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.d.ts +34 -0
  79. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +59 -0
  80. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -0
  81. package/FrameGraph/Node/Blocks/elbowBlock.d.ts +28 -0
  82. package/FrameGraph/Node/Blocks/elbowBlock.js +47 -0
  83. package/FrameGraph/Node/Blocks/elbowBlock.js.map +1 -0
  84. package/FrameGraph/Node/Blocks/index.d.ts +17 -0
  85. package/FrameGraph/Node/Blocks/index.js +18 -0
  86. package/FrameGraph/Node/Blocks/index.js.map +1 -0
  87. package/FrameGraph/Node/Blocks/inputBlock.d.ts +94 -0
  88. package/FrameGraph/Node/Blocks/inputBlock.js +270 -0
  89. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -0
  90. package/FrameGraph/Node/Blocks/outputBlock.d.ts +30 -0
  91. package/FrameGraph/Node/Blocks/outputBlock.js +51 -0
  92. package/FrameGraph/Node/Blocks/outputBlock.js.map +1 -0
  93. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +110 -0
  94. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +78 -0
  95. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -0
  96. package/FrameGraph/Node/nodeRenderGraph.d.ts +196 -0
  97. package/FrameGraph/Node/nodeRenderGraph.js +614 -0
  98. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -0
  99. package/FrameGraph/Node/nodeRenderGraphBlock.d.ts +190 -0
  100. package/FrameGraph/Node/nodeRenderGraphBlock.js +495 -0
  101. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -0
  102. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +143 -0
  103. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +275 -0
  104. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -0
  105. package/FrameGraph/Node/nodeRenderGraphBuildState.d.ts +21 -0
  106. package/FrameGraph/Node/nodeRenderGraphBuildState.js +35 -0
  107. package/FrameGraph/Node/nodeRenderGraphBuildState.js.map +1 -0
  108. package/FrameGraph/Passes/cullPass.d.ts +28 -0
  109. package/FrameGraph/Passes/cullPass.js +38 -0
  110. package/FrameGraph/Passes/cullPass.js.map +1 -0
  111. package/FrameGraph/Passes/pass.d.ts +14 -0
  112. package/FrameGraph/Passes/pass.js +20 -0
  113. package/FrameGraph/Passes/pass.js.map +1 -0
  114. package/FrameGraph/Passes/renderPass.d.ts +49 -0
  115. package/FrameGraph/Passes/renderPass.js +72 -0
  116. package/FrameGraph/Passes/renderPass.js.map +1 -0
  117. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.d.ts +16 -0
  118. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js +17 -0
  119. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js.map +1 -0
  120. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.d.ts +12 -0
  121. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +21 -0
  122. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -0
  123. package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +54 -0
  124. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +114 -0
  125. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -0
  126. package/FrameGraph/Tasks/PostProcesses/blurTask.d.ts +17 -0
  127. package/FrameGraph/Tasks/PostProcesses/blurTask.js +24 -0
  128. package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -0
  129. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.d.ts +30 -0
  130. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +35 -0
  131. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -0
  132. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.d.ts +12 -0
  133. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +26 -0
  134. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -0
  135. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.d.ts +12 -0
  136. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +29 -0
  137. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -0
  138. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +65 -0
  139. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +134 -0
  140. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -0
  141. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.d.ts +16 -0
  142. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js +17 -0
  143. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js.map +1 -0
  144. package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +41 -0
  145. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +64 -0
  146. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -0
  147. package/FrameGraph/Tasks/Rendering/cullObjectsTask.d.ts +28 -0
  148. package/FrameGraph/Tasks/Rendering/cullObjectsTask.js +52 -0
  149. package/FrameGraph/Tasks/Rendering/cullObjectsTask.js.map +1 -0
  150. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +145 -0
  151. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +259 -0
  152. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -0
  153. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +66 -0
  154. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +127 -0
  155. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -0
  156. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +34 -0
  157. package/FrameGraph/Tasks/Texture/clearTextureTask.js +42 -0
  158. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -0
  159. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.d.ts +12 -0
  160. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js +23 -0
  161. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js.map +1 -0
  162. package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +26 -0
  163. package/FrameGraph/Tasks/Texture/copyToTextureTask.js +31 -0
  164. package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -0
  165. package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +22 -0
  166. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +34 -0
  167. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -0
  168. package/FrameGraph/frameGraph.d.ts +143 -0
  169. package/FrameGraph/frameGraph.js +275 -0
  170. package/FrameGraph/frameGraph.js.map +1 -0
  171. package/FrameGraph/frameGraphContext.d.ts +5 -0
  172. package/FrameGraph/frameGraphContext.js +6 -0
  173. package/FrameGraph/frameGraphContext.js.map +1 -0
  174. package/FrameGraph/frameGraphObjectList.d.ts +15 -0
  175. package/FrameGraph/frameGraphObjectList.js +7 -0
  176. package/FrameGraph/frameGraphObjectList.js.map +1 -0
  177. package/FrameGraph/frameGraphRenderContext.d.ts +110 -0
  178. package/FrameGraph/frameGraphRenderContext.js +237 -0
  179. package/FrameGraph/frameGraphRenderContext.js.map +1 -0
  180. package/FrameGraph/frameGraphTask.d.ts +49 -0
  181. package/FrameGraph/frameGraphTask.js +117 -0
  182. package/FrameGraph/frameGraphTask.js.map +1 -0
  183. package/FrameGraph/frameGraphTextureManager.d.ts +50 -0
  184. package/FrameGraph/frameGraphTextureManager.js +277 -0
  185. package/FrameGraph/frameGraphTextureManager.js.map +1 -0
  186. package/FrameGraph/frameGraphTypes.d.ts +59 -0
  187. package/FrameGraph/frameGraphTypes.js +9 -0
  188. package/FrameGraph/frameGraphTypes.js.map +1 -0
  189. package/FrameGraph/index.d.ts +28 -0
  190. package/FrameGraph/index.js +30 -0
  191. package/FrameGraph/index.js.map +1 -0
  192. package/Gamepads/gamepadSceneComponent.d.ts +0 -1
  193. package/Gamepads/gamepadSceneComponent.js +1 -7
  194. package/Gamepads/gamepadSceneComponent.js.map +1 -1
  195. package/Gizmos/boundingBoxGizmo.d.ts +7 -0
  196. package/Gizmos/boundingBoxGizmo.js +19 -6
  197. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  198. package/Inputs/scene.inputManager.d.ts +3 -1
  199. package/Inputs/scene.inputManager.js +20 -8
  200. package/Inputs/scene.inputManager.js.map +1 -1
  201. package/Layers/layer.d.ts +1 -1
  202. package/Layers/layer.js +1 -1
  203. package/Layers/layer.js.map +1 -1
  204. package/Materials/PBR/pbrBaseMaterial.d.ts +4 -0
  205. package/Materials/PBR/pbrBaseMaterial.js +8 -0
  206. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  207. package/Materials/Textures/dynamicTexture.d.ts +32 -2
  208. package/Materials/Textures/dynamicTexture.js +13 -18
  209. package/Materials/Textures/dynamicTexture.js.map +1 -1
  210. package/Materials/Textures/index.d.ts +1 -0
  211. package/Materials/Textures/index.js +1 -0
  212. package/Materials/Textures/index.js.map +1 -1
  213. package/Materials/Textures/mirrorTexture.js +0 -6
  214. package/Materials/Textures/mirrorTexture.js.map +1 -1
  215. package/Materials/Textures/multiRenderTarget.d.ts +20 -8
  216. package/Materials/Textures/multiRenderTarget.js +2 -0
  217. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  218. package/Materials/Textures/renderTargetTexture.d.ts +8 -1
  219. package/Materials/Textures/renderTargetTexture.js +28 -10
  220. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  221. package/Materials/Textures/textureCreationOptions.d.ts +20 -2
  222. package/Materials/Textures/textureCreationOptions.js +20 -1
  223. package/Materials/Textures/textureCreationOptions.js.map +1 -1
  224. package/Materials/effectRenderer.d.ts +132 -14
  225. package/Materials/effectRenderer.js +229 -33
  226. package/Materials/effectRenderer.js.map +1 -1
  227. package/Materials/index.d.ts +1 -0
  228. package/Materials/index.js +1 -0
  229. package/Materials/index.js.map +1 -1
  230. package/Materials/materialHelper.functions.js +2 -0
  231. package/Materials/materialHelper.functions.js.map +1 -1
  232. package/Materials/materialHelper.geometryrendering.d.ts +122 -0
  233. package/Materials/materialHelper.geometryrendering.js +259 -0
  234. package/Materials/materialHelper.geometryrendering.js.map +1 -0
  235. package/Materials/standardMaterial.d.ts +4 -0
  236. package/Materials/standardMaterial.js +8 -0
  237. package/Materials/standardMaterial.js.map +1 -1
  238. package/Maths/index.d.ts +1 -0
  239. package/Maths/index.js +1 -0
  240. package/Maths/index.js.map +1 -1
  241. package/Meshes/Builders/greasedLineBuilder.d.ts +1 -1
  242. package/Meshes/Node/Blocks/geometryOptimizeBlock.d.ts +22 -1
  243. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +39 -0
  244. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  245. package/Misc/copyTextureToTexture.d.ts +3 -2
  246. package/Misc/copyTextureToTexture.js +11 -5
  247. package/Misc/copyTextureToTexture.js.map +1 -1
  248. package/PostProcesses/blackAndWhitePostProcess.d.ts +5 -3
  249. package/PostProcesses/blackAndWhitePostProcess.js +24 -19
  250. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  251. package/PostProcesses/bloomEffect.d.ts +7 -5
  252. package/PostProcesses/bloomEffect.js +49 -23
  253. package/PostProcesses/bloomEffect.js.map +1 -1
  254. package/PostProcesses/bloomMergePostProcess.d.ts +5 -5
  255. package/PostProcesses/bloomMergePostProcess.js +28 -19
  256. package/PostProcesses/bloomMergePostProcess.js.map +1 -1
  257. package/PostProcesses/blurPostProcess.d.ts +7 -43
  258. package/PostProcesses/blurPostProcess.js +47 -185
  259. package/PostProcesses/blurPostProcess.js.map +1 -1
  260. package/PostProcesses/circleOfConfusionPostProcess.d.ts +13 -6
  261. package/PostProcesses/circleOfConfusionPostProcess.js +59 -38
  262. package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
  263. package/PostProcesses/depthOfFieldBlurPostProcess.d.ts +2 -6
  264. package/PostProcesses/depthOfFieldBlurPostProcess.js +14 -11
  265. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  266. package/PostProcesses/depthOfFieldEffect.d.ts +5 -2
  267. package/PostProcesses/depthOfFieldEffect.js +53 -45
  268. package/PostProcesses/depthOfFieldEffect.js.map +1 -1
  269. package/PostProcesses/depthOfFieldMergePostProcess.d.ts +0 -1
  270. package/PostProcesses/depthOfFieldMergePostProcess.js +18 -12
  271. package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
  272. package/PostProcesses/extractHighlightsPostProcess.d.ts +8 -4
  273. package/PostProcesses/extractHighlightsPostProcess.js +35 -22
  274. package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
  275. package/PostProcesses/index.d.ts +6 -0
  276. package/PostProcesses/index.js +6 -0
  277. package/PostProcesses/index.js.map +1 -1
  278. package/PostProcesses/postProcess.d.ts +15 -70
  279. package/PostProcesses/postProcess.js +80 -97
  280. package/PostProcesses/postProcess.js.map +1 -1
  281. package/PostProcesses/thinBlackAndWhitePostProcess.d.ts +28 -0
  282. package/PostProcesses/thinBlackAndWhitePostProcess.js +50 -0
  283. package/PostProcesses/thinBlackAndWhitePostProcess.js.map +1 -0
  284. package/PostProcesses/thinBloomEffect.d.ts +49 -0
  285. package/PostProcesses/thinBloomEffect.js +59 -0
  286. package/PostProcesses/thinBloomEffect.js.map +1 -0
  287. package/PostProcesses/thinBloomMergePostProcess.d.ts +15 -0
  288. package/PostProcesses/thinBloomMergePostProcess.js +38 -0
  289. package/PostProcesses/thinBloomMergePostProcess.js.map +1 -0
  290. package/PostProcesses/thinBlurPostProcess.d.ts +89 -0
  291. package/PostProcesses/thinBlurPostProcess.js +242 -0
  292. package/PostProcesses/thinBlurPostProcess.js.map +1 -0
  293. package/PostProcesses/thinCircleOfConfusionPostProcess.d.ts +62 -0
  294. package/PostProcesses/thinCircleOfConfusionPostProcess.js +81 -0
  295. package/PostProcesses/thinCircleOfConfusionPostProcess.js.map +1 -0
  296. package/PostProcesses/thinDepthOfFieldBlurPostProcess.d.ts +8 -0
  297. package/PostProcesses/thinDepthOfFieldBlurPostProcess.js +13 -0
  298. package/PostProcesses/thinDepthOfFieldBlurPostProcess.js.map +1 -0
  299. package/PostProcesses/thinDepthOfFieldEffect.d.ts +70 -0
  300. package/PostProcesses/thinDepthOfFieldEffect.js +115 -0
  301. package/PostProcesses/thinDepthOfFieldEffect.js.map +1 -0
  302. package/PostProcesses/thinDepthOfFieldMergePostProcess.d.ts +11 -0
  303. package/PostProcesses/thinDepthOfFieldMergePostProcess.js +30 -0
  304. package/PostProcesses/thinDepthOfFieldMergePostProcess.js.map +1 -0
  305. package/PostProcesses/thinExtractHighlightsPostProcess.d.ts +30 -0
  306. package/PostProcesses/thinExtractHighlightsPostProcess.js +55 -0
  307. package/PostProcesses/thinExtractHighlightsPostProcess.js.map +1 -0
  308. package/Rendering/depthPeelingRenderer.js +2 -2
  309. package/Rendering/depthPeelingRenderer.js.map +1 -1
  310. package/Rendering/fluidRenderer/fluidRenderingObject.js +4 -4
  311. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  312. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +1 -1
  313. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
  314. package/Shaders/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
  315. package/Shaders/ShadersInclude/pbrBlockPrePass.js +75 -0
  316. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -0
  317. package/Shaders/ShadersInclude/prePassVertex.js +1 -2
  318. package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
  319. package/Shaders/circleOfConfusion.fragment.js +9 -1
  320. package/Shaders/circleOfConfusion.fragment.js.map +1 -1
  321. package/Shaders/colorCorrection.fragment.js +1 -0
  322. package/Shaders/colorCorrection.fragment.js.map +1 -1
  323. package/Shaders/default.fragment.js +17 -25
  324. package/Shaders/default.fragment.js.map +1 -1
  325. package/Shaders/default.vertex.js +4 -6
  326. package/Shaders/default.vertex.js.map +1 -1
  327. package/Shaders/pbr.fragment.d.ts +1 -0
  328. package/Shaders/pbr.fragment.js +2 -74
  329. package/Shaders/pbr.fragment.js.map +1 -1
  330. package/Shaders/pbr.vertex.js +3 -3
  331. package/Shaders/pbr.vertex.js.map +1 -1
  332. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
  333. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +100 -0
  334. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -0
  335. package/ShadersWGSL/ShadersInclude/prePassVertex.js +1 -2
  336. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  337. package/ShadersWGSL/background.vertex.js +1 -1
  338. package/ShadersWGSL/background.vertex.js.map +1 -1
  339. package/ShadersWGSL/circleOfConfusion.fragment.js +10 -2
  340. package/ShadersWGSL/circleOfConfusion.fragment.js.map +1 -1
  341. package/ShadersWGSL/default.fragment.js +20 -31
  342. package/ShadersWGSL/default.fragment.js.map +1 -1
  343. package/ShadersWGSL/default.vertex.js +4 -5
  344. package/ShadersWGSL/default.vertex.js.map +1 -1
  345. package/ShadersWGSL/glowMapGeneration.fragment.js +1 -1
  346. package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -1
  347. package/ShadersWGSL/glowMapGeneration.vertex.js +1 -1
  348. package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -1
  349. package/ShadersWGSL/pbr.fragment.d.ts +1 -0
  350. package/ShadersWGSL/pbr.fragment.js +2 -100
  351. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  352. package/ShadersWGSL/pbr.vertex.js +4 -2
  353. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  354. package/XR/features/WebXRRawCameraAccess.js +1 -1
  355. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  356. package/index.d.ts +1 -0
  357. package/index.js +1 -0
  358. package/index.js.map +1 -1
  359. package/package.json +1 -1
  360. package/scene.d.ts +19 -2
  361. package/scene.js +110 -13
  362. package/scene.js.map +1 -1
  363. package/sceneComponent.d.ts +0 -1
  364. package/sceneComponent.js +0 -1
  365. package/sceneComponent.js.map +1 -1
  366. package/types.d.ts +12 -0
  367. package/types.js.map +1 -1
@@ -585,7 +585,7 @@ export declare class Constants {
585
585
  */
586
586
  static readonly PREPASS_NORMAL_TEXTURE_TYPE = 6;
587
587
  /**
588
- * Constant used to retrieve albedo index in the textures array in the prepass
588
+ * Constant used to retrieve (sqrt) albedo index in the textures array in the prepass
589
589
  * using the getIndex(Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE)
590
590
  */
591
591
  static readonly PREPASS_ALBEDO_SQRT_TEXTURE_TYPE = 7;
@@ -609,6 +609,11 @@ export declare class Constants {
609
609
  * using getIndex(Constants.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE)
610
610
  */
611
611
  static readonly PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE = 11;
612
+ /**
613
+ * Constant used to retrieve albedo index in the textures array in the prepass
614
+ * using the getIndex(Constants.PREPASS_ALBEDO_TEXTURE_TYPE)
615
+ */
616
+ static readonly PREPASS_ALBEDO_TEXTURE_TYPE = 12;
612
617
  /** Flag to create a readable buffer (the buffer can be the source of a copy) */
613
618
  static readonly BUFFER_CREATIONFLAG_READ = 1;
614
619
  /** Flag to create a writable buffer (the buffer can be the destination of a copy) */
@@ -590,7 +590,7 @@ Constants.PREPASS_DEPTH_TEXTURE_TYPE = 5;
590
590
  */
591
591
  Constants.PREPASS_NORMAL_TEXTURE_TYPE = 6;
592
592
  /**
593
- * Constant used to retrieve albedo index in the textures array in the prepass
593
+ * Constant used to retrieve (sqrt) albedo index in the textures array in the prepass
594
594
  * using the getIndex(Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE)
595
595
  */
596
596
  Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE = 7;
@@ -614,6 +614,11 @@ Constants.PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE = 10;
614
614
  * using getIndex(Constants.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE)
615
615
  */
616
616
  Constants.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE = 11;
617
+ /**
618
+ * Constant used to retrieve albedo index in the textures array in the prepass
619
+ * using the getIndex(Constants.PREPASS_ALBEDO_TEXTURE_TYPE)
620
+ */
621
+ Constants.PREPASS_ALBEDO_TEXTURE_TYPE = 12;
617
622
  /** Flag to create a readable buffer (the buffer can be the source of a copy) */
618
623
  Constants.BUFFER_CREATIONFLAG_READ = 1;
619
624
  /** Flag to create a writable buffer (the buffer can be the destination of a copy) */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/constants.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,6EAA6E;AAC7E,MAAM,OAAO,SAAS;;AAClB,yDAAyD;AAClC,2BAAiB,GAAG,SAAS,CAAC;AACrD,kDAAkD;AAC3B,mBAAS,GAAG,qCAAqC,CAAC;AACzE,8CAA8C;AACvB,uBAAa,GAAG,CAAC,CAAC;AACzC,4DAA4D;AACrC,mBAAS,GAAG,CAAC,CAAC;AACrC,8EAA8E;AACvD,uBAAa,GAAG,CAAC,CAAC;AACzC,uDAAuD;AAChC,wBAAc,GAAG,CAAC,CAAC;AAC1C,gDAAgD;AACzB,wBAAc,GAAG,CAAC,CAAC;AAC1C,wEAAwE;AACjD,yBAAe,GAAG,CAAC,CAAC;AAC3C,gDAAgD;AACzB,sBAAY,GAAG,CAAC,CAAC;AACxC,kEAAkE;AAC3C,6BAAmB,GAAG,CAAC,CAAC;AAC/C;;;GAGG;AACoB,wCAA8B,GAAG,CAAC,CAAC;AAC1D,kEAAkE;AAC3C,2BAAiB,GAAG,CAAC,CAAC;AAC7C;;;GAGG;AACoB,0BAAgB,GAAG,EAAE,CAAC;AAC7C;;;GAGG;AACoB,6BA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AC;AAC9B;;GAEG;AACW,iBAAO,GAAG,KAAK,CAAC;AAC9B;;GAEG;AACW,iBAAO,GAAG,KAAK,CAAC;AAC9B;;GAEG;AACW,iBAAO,GAAG,KAAK,CAAC;AAC9B;;GAEG;AACW,iBAAO,GAAG,KAAK,CAAC;AAC9B;;GAEG;AACW,mBAAS,GAAG,OAAO,CAAC;AAClC;;GAEG;AACW,2BAAiB,GAAG,eAAe,CAAC;AAClD;;GAEG;AACW,6BAAmB,GAAG,iBAAiB,CAAC;AACtD;;GAEG;AACW,6BAAmB,GAAG,iBAAiB,CAAC;AACtD;;GAEG;AACW,kCAAwB,GAAG,sBAAsB,CAAC;AAChE;;GAEG;AACW,kCAAwB,GAAG,sBAAsB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n/** Defines the cross module used constants to avoid circular dependencies */\r\nexport class Constants {\r\n /** Sampler suffix when associated with a texture name */\r\n public static readonly AUTOSAMPLERSUFFIX = \"Sampler\";\r\n /** Flag used to disable diagnostics for WebGPU */\r\n public static readonly DISABLEUA = \"#define DISABLE_UNIFORMITY_ANALYSIS\";\r\n /** Defines that alpha blending is disabled */\r\n public static readonly ALPHA_DISABLE = 0;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + DEST */\r\n public static readonly ALPHA_ADD = 1;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\r\n public static readonly ALPHA_COMBINE = 2;\r\n /** Defines that alpha blending is DEST - SRC * DEST */\r\n public static readonly ALPHA_SUBTRACT = 3;\r\n /** Defines that alpha blending is SRC * DEST */\r\n public static readonly ALPHA_MULTIPLY = 4;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC) * DEST */\r\n public static readonly ALPHA_MAXIMIZED = 5;\r\n /** Defines that alpha blending is SRC + DEST */\r\n public static readonly ALPHA_ONEONE = 6;\r\n /** Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST */\r\n public static readonly ALPHA_PREMULTIPLIED = 7;\r\n /**\r\n * Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST\r\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n public static readonly ALPHA_PREMULTIPLIED_PORTERDUFF = 8;\r\n /** Defines that alpha blending is CST * SRC + (1 - CST) * DEST */\r\n public static readonly ALPHA_INTERPOLATE = 9;\r\n /**\r\n * Defines that alpha blending is SRC + (1 - SRC) * DEST\r\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n public static readonly ALPHA_SCREENMODE = 10;\r\n /**\r\n * Defines that alpha blending is SRC + DST\r\n * Alpha will be set to SRC ALPHA + DST ALPHA\r\n */\r\n public static readonly ALPHA_ONEONE_ONEONE = 11;\r\n /**\r\n * Defines that alpha blending is SRC * DST ALPHA + DST\r\n * Alpha will be set to 0\r\n */\r\n public static readonly ALPHA_ALPHATOCOLOR = 12;\r\n /**\r\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\r\n */\r\n public static readonly ALPHA_REVERSEONEMINUS = 13;\r\n /**\r\n * Defines that alpha blending is SRC + DST * (1 - SRC ALPHA)\r\n * Alpha will be set to SRC ALPHA + DST ALPHA * (1 - SRC ALPHA)\r\n */\r\n public static readonly ALPHA_SRC_DSTONEMINUSSRCALPHA = 14;\r\n /**\r\n * Defines that alpha blending is SRC + DST\r\n * Alpha will be set to SRC ALPHA\r\n */\r\n public static readonly ALPHA_ONEONE_ONEZERO = 15;\r\n /**\r\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\r\n * Alpha will be set to DST ALPHA\r\n */\r\n public static readonly ALPHA_EXCLUSION = 16;\r\n /**\r\n * Defines that alpha blending is SRC * SRC ALPHA + DST * (1 - SRC ALPHA)\r\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DST ALPHA\r\n */\r\n public static readonly ALPHA_LAYER_ACCUMULATE = 17;\r\n\r\n /** Defines that alpha blending equation a SUM */\r\n public static readonly ALPHA_EQUATION_ADD = 0;\r\n /** Defines that alpha blending equation a SUBSTRACTION */\r\n public static readonly ALPHA_EQUATION_SUBSTRACT = 1;\r\n /** Defines that alpha blending equation a REVERSE SUBSTRACTION */\r\n public static readonly ALPHA_EQUATION_REVERSE_SUBTRACT = 2;\r\n /** Defines that alpha blending equation a MAX operation */\r\n public static readonly ALPHA_EQUATION_MAX = 3;\r\n /** Defines that alpha blending equation a MIN operation */\r\n public static readonly ALPHA_EQUATION_MIN = 4;\r\n /**\r\n * Defines that alpha blending equation a DARKEN operation:\r\n * It takes the min of the src and sums the alpha channels.\r\n */\r\n public static readonly ALPHA_EQUATION_DARKEN = 5;\r\n\r\n /** Defines that the resource is not delayed*/\r\n public static readonly DELAYLOADSTATE_NONE = 0;\r\n /** Defines that the resource was successfully delay loaded */\r\n public static readonly DELAYLOADSTATE_LOADED = 1;\r\n /** Defines that the resource is currently delay loading */\r\n public static readonly DELAYLOADSTATE_LOADING = 2;\r\n /** Defines that the resource is delayed and has not started loading */\r\n public static readonly DELAYLOADSTATE_NOTLOADED = 4;\r\n\r\n // Depth or Stencil test Constants.\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\r\n public static readonly NEVER = 0x0200;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\r\n public static readonly ALWAYS = 0x0207;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\r\n public static readonly LESS = 0x0201;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\r\n public static readonly EQUAL = 0x0202;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\r\n public static readonly LEQUAL = 0x0203;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\r\n public static readonly GREATER = 0x0204;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\r\n public static readonly GEQUAL = 0x0206;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\r\n public static readonly NOTEQUAL = 0x0205;\r\n\r\n // Stencil Actions Constants.\r\n /** Passed to stencilOperation to specify that stencil value must be kept */\r\n public static readonly KEEP = 0x1e00;\r\n /** Passed to stencilOperation to specify that stencil value must be zero */\r\n public static readonly ZERO = 0x0000;\r\n /** Passed to stencilOperation to specify that stencil value must be replaced */\r\n public static readonly REPLACE = 0x1e01;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented */\r\n public static readonly INCR = 0x1e02;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented */\r\n public static readonly DECR = 0x1e03;\r\n /** Passed to stencilOperation to specify that stencil value must be inverted */\r\n public static readonly INVERT = 0x150a;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\r\n public static readonly INCR_WRAP = 0x8507;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\r\n public static readonly DECR_WRAP = 0x8508;\r\n\r\n /** Texture is not repeating outside of 0..1 UVs */\r\n public static readonly TEXTURE_CLAMP_ADDRESSMODE = 0;\r\n /** Texture is repeating outside of 0..1 UVs */\r\n public static readonly TEXTURE_WRAP_ADDRESSMODE = 1;\r\n /** Texture is repeating and mirrored */\r\n public static readonly TEXTURE_MIRROR_ADDRESSMODE = 2;\r\n\r\n /** Flag to create a storage texture */\r\n public static readonly TEXTURE_CREATIONFLAG_STORAGE = 1;\r\n\r\n /** ALPHA */\r\n public static readonly TEXTUREFORMAT_ALPHA = 0;\r\n /** LUMINANCE */\r\n public static readonly TEXTUREFORMAT_LUMINANCE = 1;\r\n /** LUMINANCE_ALPHA */\r\n public static readonly TEXTUREFORMAT_LUMINANCE_ALPHA = 2;\r\n /** RGB */\r\n public static readonly TEXTUREFORMAT_RGB = 4;\r\n /** RGBA */\r\n public static readonly TEXTUREFORMAT_RGBA = 5;\r\n /** RED */\r\n public static readonly TEXTUREFORMAT_RED = 6;\r\n /** RED (2nd reference) */\r\n public static readonly TEXTUREFORMAT_R = 6;\r\n /** RG */\r\n public static readonly TEXTUREFORMAT_RG = 7;\r\n /** RED_INTEGER */\r\n public static readonly TEXTUREFORMAT_RED_INTEGER = 8;\r\n /** RED_INTEGER (2nd reference) */\r\n public static readonly TEXTUREFORMAT_R_INTEGER = 8;\r\n /** RG_INTEGER */\r\n public static readonly TEXTUREFORMAT_RG_INTEGER = 9;\r\n /** RGB_INTEGER */\r\n public static readonly TEXTUREFORMAT_RGB_INTEGER = 10;\r\n /** RGBA_INTEGER */\r\n public static readonly TEXTUREFORMAT_RGBA_INTEGER = 11;\r\n /** BGRA */\r\n public static readonly TEXTUREFORMAT_BGRA = 12;\r\n\r\n /** Depth 24 bits + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24_STENCIL8 = 13;\r\n /** Depth 32 bits float */\r\n public static readonly TEXTUREFORMAT_DEPTH32_FLOAT = 14;\r\n /** Depth 16 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH16 = 15;\r\n /** Depth 24 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24 = 16;\r\n /** Depth 24 bits unorm + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24UNORM_STENCIL8 = 17;\r\n /** Depth 32 bits float + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8 = 18;\r\n /** Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_STENCIL8 = 19;\r\n /** UNDEFINED */\r\n public static readonly TEXTUREFORMAT_UNDEFINED = 0xffffffff;\r\n\r\n /** Compressed BC7 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM = 36492;\r\n /** Compressed BC7 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 36493;\r\n /** Compressed BC6 unsigned float */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 36495;\r\n /** Compressed BC6 signed float */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 36494;\r\n /** Compressed BC3 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5 = 33779;\r\n /** Compressed BC3 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919;\r\n /** Compressed BC2 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3 = 33778;\r\n /** Compressed BC2 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918;\r\n /** Compressed BC1 (RGBA) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1 = 33777;\r\n /** Compressed BC1 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1 = 33776;\r\n /** Compressed BC1 (SRGB+A) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917;\r\n /** Compressed BC1 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916;\r\n /** Compressed ASTC 4x4 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4 = 37808;\r\n /** Compressed ASTC 4x4 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 37840;\r\n /** Compressed ETC1 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL = 36196;\r\n /** Compressed ETC2 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB8_ETC2 = 37492;\r\n /** Compressed ETC2 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2 = 37493;\r\n /** Compressed ETC2 (RGB+A1) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494;\r\n /** Compressed ETC2 (SRGB+A1)*/\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495;\r\n /** Compressed ETC2 (RGB+A) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC = 37496;\r\n /** Compressed ETC2 (SRGB+1) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497;\r\n\r\n /** UNSIGNED_BYTE */\r\n public static readonly TEXTURETYPE_UNSIGNED_BYTE = 0;\r\n /** UNSIGNED_BYTE (2nd reference) */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT = 0;\r\n /** FLOAT */\r\n public static readonly TEXTURETYPE_FLOAT = 1;\r\n /** HALF_FLOAT */\r\n public static readonly TEXTURETYPE_HALF_FLOAT = 2;\r\n /** BYTE */\r\n public static readonly TEXTURETYPE_BYTE = 3;\r\n /** SHORT */\r\n public static readonly TEXTURETYPE_SHORT = 4;\r\n /** UNSIGNED_SHORT */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT = 5;\r\n /** INT */\r\n public static readonly TEXTURETYPE_INT = 6;\r\n /** UNSIGNED_INT */\r\n public static readonly TEXTURETYPE_UNSIGNED_INTEGER = 7;\r\n /** UNSIGNED_SHORT_4_4_4_4 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;\r\n /** UNSIGNED_SHORT_5_5_5_1 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;\r\n /** UNSIGNED_SHORT_5_6_5 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;\r\n /** UNSIGNED_INT_2_10_10_10_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;\r\n /** UNSIGNED_INT_24_8 */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_24_8 = 12;\r\n /** UNSIGNED_INT_10F_11F_11F_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;\r\n /** UNSIGNED_INT_5_9_9_9_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;\r\n /** FLOAT_32_UNSIGNED_INT_24_8_REV */\r\n public static readonly TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;\r\n /** UNDEFINED */\r\n public static readonly TEXTURETYPE_UNDEFINED = 16;\r\n\r\n /** 2D Texture target*/\r\n public static readonly TEXTURE_2D = 3553;\r\n /** 2D Array Texture target */\r\n public static readonly TEXTURE_2D_ARRAY = 35866;\r\n /** Cube Map Texture target */\r\n public static readonly TEXTURE_CUBE_MAP = 34067;\r\n /** Cube Map Array Texture target */\r\n public static readonly TEXTURE_CUBE_MAP_ARRAY = 0xdeadbeef;\r\n /** 3D Texture target */\r\n public static readonly TEXTURE_3D = 32879;\r\n\r\n /** nearest is mag = nearest and min = nearest and no mip */\r\n public static readonly TEXTURE_NEAREST_SAMPLINGMODE = 1;\r\n /** mag = nearest and min = nearest and mip = none */\r\n public static readonly TEXTURE_NEAREST_NEAREST = 1;\r\n\r\n /** Bilinear is mag = linear and min = linear and no mip */\r\n public static readonly TEXTURE_BILINEAR_SAMPLINGMODE = 2;\r\n /** mag = linear and min = linear and mip = none */\r\n public static readonly TEXTURE_LINEAR_LINEAR = 2;\r\n\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n public static readonly TEXTURE_TRILINEAR_SAMPLINGMODE = 3;\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n public static readonly TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;\r\n\r\n /** mag = nearest and min = nearest and mip = nearest */\r\n public static readonly TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;\r\n /** mag = nearest and min = linear and mip = nearest */\r\n public static readonly TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;\r\n /** mag = nearest and min = linear and mip = linear */\r\n public static readonly TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;\r\n /** mag = nearest and min = linear and mip = none */\r\n public static readonly TEXTURE_NEAREST_LINEAR = 7;\r\n /** nearest is mag = nearest and min = nearest and mip = linear */\r\n public static readonly TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8;\r\n /** mag = linear and min = nearest and mip = nearest */\r\n public static readonly TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;\r\n /** mag = linear and min = nearest and mip = linear */\r\n public static readonly TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;\r\n /** Bilinear is mag = linear and min = linear and mip = nearest */\r\n public static readonly TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11;\r\n /** mag = linear and min = nearest and mip = none */\r\n public static readonly TEXTURE_LINEAR_NEAREST = 12;\r\n\r\n /** Explicit coordinates mode */\r\n public static readonly TEXTURE_EXPLICIT_MODE = 0;\r\n /** Spherical coordinates mode */\r\n public static readonly TEXTURE_SPHERICAL_MODE = 1;\r\n /** Planar coordinates mode */\r\n public static readonly TEXTURE_PLANAR_MODE = 2;\r\n /** Cubic coordinates mode */\r\n public static readonly TEXTURE_CUBIC_MODE = 3;\r\n /** Projection coordinates mode */\r\n public static readonly TEXTURE_PROJECTION_MODE = 4;\r\n /** Skybox coordinates mode */\r\n public static readonly TEXTURE_SKYBOX_MODE = 5;\r\n /** Inverse Cubic coordinates mode */\r\n public static readonly TEXTURE_INVCUBIC_MODE = 6;\r\n /** Equirectangular coordinates mode */\r\n public static readonly TEXTURE_EQUIRECTANGULAR_MODE = 7;\r\n /** Equirectangular Fixed coordinates mode */\r\n public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;\r\n /** Equirectangular Fixed Mirrored coordinates mode */\r\n public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\r\n\r\n /** Offline (baking) quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_OFFLINE = 4096;\r\n\r\n /** High quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_HIGH = 64;\r\n\r\n /** Medium quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_MEDIUM = 16;\r\n\r\n /** Low quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_LOW = 8;\r\n\r\n // Texture rescaling mode\r\n /** Defines that texture rescaling will use a floor to find the closer power of 2 size */\r\n public static readonly SCALEMODE_FLOOR = 1;\r\n /** Defines that texture rescaling will look for the nearest power of 2 size */\r\n public static readonly SCALEMODE_NEAREST = 2;\r\n /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\r\n public static readonly SCALEMODE_CEILING = 3;\r\n\r\n /**\r\n * The dirty texture flag value\r\n */\r\n public static readonly MATERIAL_TextureDirtyFlag = 1;\r\n /**\r\n * The dirty light flag value\r\n */\r\n public static readonly MATERIAL_LightDirtyFlag = 2;\r\n /**\r\n * The dirty fresnel flag value\r\n */\r\n public static readonly MATERIAL_FresnelDirtyFlag = 4;\r\n /**\r\n * The dirty attribute flag value\r\n */\r\n public static readonly MATERIAL_AttributesDirtyFlag = 8;\r\n /**\r\n * The dirty misc flag value\r\n */\r\n public static readonly MATERIAL_MiscDirtyFlag = 16;\r\n /**\r\n * The dirty prepass flag value\r\n */\r\n public static readonly MATERIAL_PrePassDirtyFlag = 32;\r\n /**\r\n * The all dirty flag value\r\n */\r\n public static readonly MATERIAL_AllDirtyFlag = 63;\r\n\r\n /**\r\n * Returns the triangle fill mode\r\n */\r\n public static readonly MATERIAL_TriangleFillMode = 0;\r\n /**\r\n * Returns the wireframe mode\r\n */\r\n public static readonly MATERIAL_WireFrameFillMode = 1;\r\n /**\r\n * Returns the point fill mode\r\n */\r\n public static readonly MATERIAL_PointFillMode = 2;\r\n /**\r\n * Returns the point list draw mode\r\n */\r\n public static readonly MATERIAL_PointListDrawMode = 3;\r\n /**\r\n * Returns the line list draw mode\r\n */\r\n public static readonly MATERIAL_LineListDrawMode = 4;\r\n /**\r\n * Returns the line loop draw mode\r\n */\r\n public static readonly MATERIAL_LineLoopDrawMode = 5;\r\n /**\r\n * Returns the line strip draw mode\r\n */\r\n public static readonly MATERIAL_LineStripDrawMode = 6;\r\n\r\n /**\r\n * Returns the triangle strip draw mode\r\n */\r\n public static readonly MATERIAL_TriangleStripDrawMode = 7;\r\n /**\r\n * Returns the triangle fan draw mode\r\n */\r\n public static readonly MATERIAL_TriangleFanDrawMode = 8;\r\n\r\n /**\r\n * Stores the clock-wise side orientation\r\n */\r\n public static readonly MATERIAL_ClockWiseSideOrientation = 0;\r\n /**\r\n * Stores the counter clock-wise side orientation\r\n */\r\n public static readonly MATERIAL_CounterClockWiseSideOrientation = 1;\r\n\r\n /**\r\n * Nothing\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_NothingTrigger = 0;\r\n /**\r\n * On pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickTrigger = 1;\r\n /**\r\n * On left pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnLeftPickTrigger = 2;\r\n /**\r\n * On right pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnRightPickTrigger = 3;\r\n /**\r\n * On center pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnCenterPickTrigger = 4;\r\n /**\r\n * On pick down\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickDownTrigger = 5;\r\n /**\r\n * On double pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnDoublePickTrigger = 6;\r\n /**\r\n * On pick up\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickUpTrigger = 7;\r\n /**\r\n * On pick out.\r\n * This trigger will only be raised if you also declared a OnPickDown\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickOutTrigger = 16;\r\n /**\r\n * On long press\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnLongPressTrigger = 8;\r\n /**\r\n * On pointer over\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPointerOverTrigger = 9;\r\n /**\r\n * On pointer out\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPointerOutTrigger = 10;\r\n /**\r\n * On every frame\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnEveryFrameTrigger = 11;\r\n /**\r\n * On intersection enter\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnIntersectionEnterTrigger = 12;\r\n /**\r\n * On intersection exit\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnIntersectionExitTrigger = 13;\r\n /**\r\n * On key down\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnKeyDownTrigger = 14;\r\n /**\r\n * On key up\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnKeyUpTrigger = 15;\r\n\r\n /**\r\n * Billboard mode will only apply to Y axis\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_Y = 2;\r\n /**\r\n * Billboard mode will apply to all axes\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_ALL = 7;\r\n /**\r\n * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_STRETCHED = 8;\r\n /**\r\n * Special billboard mode where the particle will be billboard to the camera but only around the axis of the direction of particle emission\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL = 9;\r\n\r\n /** Default culling strategy : this is an exclusion test and it's the more accurate.\r\n * Test order :\r\n * Is the bounding sphere outside the frustum ?\r\n * If not, are the bounding box vertices outside the frustum ?\r\n * It not, then the cullable object is in the frustum.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_STANDARD = 0;\r\n /** Culling strategy : Bounding Sphere Only.\r\n * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.\r\n * It's also less accurate than the standard because some not visible objects can still be selected.\r\n * Test : is the bounding sphere outside the frustum ?\r\n * If not, then the cullable object is in the frustum.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;\r\n /** Culling strategy : Optimistic Inclusion.\r\n * This in an inclusion test first, then the standard exclusion test.\r\n * This can be faster when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.\r\n * Anyway, it's as accurate as the standard strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the default culling strategy.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;\r\n /** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.\r\n * This in an inclusion test first, then the bounding sphere only exclusion test.\r\n * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.\r\n * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;\r\n\r\n /**\r\n * No logging while loading\r\n */\r\n public static readonly SCENELOADER_NO_LOGGING = 0;\r\n /**\r\n * Minimal logging while loading\r\n */\r\n public static readonly SCENELOADER_MINIMAL_LOGGING = 1;\r\n /**\r\n * Summary logging while loading\r\n */\r\n public static readonly SCENELOADER_SUMMARY_LOGGING = 2;\r\n /**\r\n * Detailed logging while loading\r\n */\r\n public static readonly SCENELOADER_DETAILED_LOGGING = 3;\r\n\r\n /**\r\n * Constant used to retrieve the irradiance texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_IRRADIANCE_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_IRRADIANCE_TEXTURE_TYPE = 0;\r\n /**\r\n * Constant used to retrieve the position texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_POSITION_TEXTURE_INDEX)\r\n */\r\n public static readonly PREPASS_POSITION_TEXTURE_TYPE = 1;\r\n /**\r\n * Constant used to retrieve the velocity texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_VELOCITY_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_VELOCITY_TEXTURE_TYPE = 2;\r\n /**\r\n * Constant used to retrieve the reflectivity texture index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_REFLECTIVITY_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_REFLECTIVITY_TEXTURE_TYPE = 3;\r\n /**\r\n * Constant used to retrieve the lit color texture index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_COLOR_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_COLOR_TEXTURE_TYPE = 4;\r\n /**\r\n * Constant used to retrieve depth index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_DEPTH_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_DEPTH_TEXTURE_TYPE = 5;\r\n /**\r\n * Constant used to retrieve normal index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_NORMAL_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_NORMAL_TEXTURE_TYPE = 6;\r\n /**\r\n * Constant used to retrieve albedo index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_ALBEDO_SQRT_TEXTURE_TYPE = 7;\r\n\r\n /**\r\n * Constant used to retrieve world normal index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_WORLD_NORMAL_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_WORLD_NORMAL_TEXTURE_TYPE = 8;\r\n\r\n /**\r\n * Constant used to retrieve the local position texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_LOCAL_POSITION_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_LOCAL_POSITION_TEXTURE_TYPE = 9;\r\n\r\n /**\r\n * Constant used to retrieve screen-space (non-linear) depth index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE = 10;\r\n\r\n /**\r\n * Constant used to retrieve the velocity texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE = 11;\r\n\r\n /** Flag to create a readable buffer (the buffer can be the source of a copy) */\r\n public static readonly BUFFER_CREATIONFLAG_READ = 1;\r\n /** Flag to create a writable buffer (the buffer can be the destination of a copy) */\r\n public static readonly BUFFER_CREATIONFLAG_WRITE = 2;\r\n /** Flag to create a readable and writable buffer */\r\n public static readonly BUFFER_CREATIONFLAG_READWRITE = 3;\r\n /** Flag to create a buffer suitable to be used as a uniform buffer */\r\n public static readonly BUFFER_CREATIONFLAG_UNIFORM = 4;\r\n /** Flag to create a buffer suitable to be used as a vertex buffer */\r\n public static readonly BUFFER_CREATIONFLAG_VERTEX = 8;\r\n /** Flag to create a buffer suitable to be used as an index buffer */\r\n public static readonly BUFFER_CREATIONFLAG_INDEX = 16;\r\n /** Flag to create a buffer suitable to be used as a storage buffer */\r\n public static readonly BUFFER_CREATIONFLAG_STORAGE = 32;\r\n /** Flag to create a buffer suitable to be used for indirect calls, such as `dispatchIndirect` */\r\n public static readonly BUFFER_CREATIONFLAG_INDIRECT = 64;\r\n\r\n /**\r\n * Prefixes used by the engine for sub mesh draw wrappers\r\n */\r\n\r\n /** @internal */\r\n public static readonly RENDERPASS_MAIN = 0;\r\n\r\n /**\r\n * Constant used as key code for Alt key\r\n */\r\n public static readonly INPUT_ALT_KEY = 18;\r\n\r\n /**\r\n * Constant used as key code for Ctrl key\r\n */\r\n public static readonly INPUT_CTRL_KEY = 17;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Left Win, Left Cmd)\r\n */\r\n public static readonly INPUT_META_KEY1 = 91;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Right Win)\r\n */\r\n public static readonly INPUT_META_KEY2 = 92;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Right Win, Right Cmd)\r\n */\r\n public static readonly INPUT_META_KEY3 = 93;\r\n\r\n /**\r\n * Constant used as key code for Shift key\r\n */\r\n public static readonly INPUT_SHIFT_KEY = 16;\r\n\r\n /** Standard snapshot rendering. In this mode, some form of dynamic behavior is possible (for eg, uniform buffers are still updated) */\r\n public static readonly SNAPSHOTRENDERING_STANDARD = 0;\r\n\r\n /** Fast snapshot rendering. In this mode, everything is static and only some limited form of dynamic behaviour is possible */\r\n public static readonly SNAPSHOTRENDERING_FAST = 1;\r\n\r\n /**\r\n * This is the default projection mode used by the cameras.\r\n * It helps recreating a feeling of perspective and better appreciate depth.\r\n * This is the best way to simulate real life cameras.\r\n */\r\n public static readonly PERSPECTIVE_CAMERA = 0;\r\n /**\r\n * This helps creating camera with an orthographic mode.\r\n * Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.\r\n */\r\n public static readonly ORTHOGRAPHIC_CAMERA = 1;\r\n\r\n /**\r\n * This is the default FOV mode for perspective cameras.\r\n * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.\r\n */\r\n public static readonly FOVMODE_VERTICAL_FIXED = 0;\r\n /**\r\n * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.\r\n */\r\n public static readonly FOVMODE_HORIZONTAL_FIXED = 1;\r\n\r\n /**\r\n * This specifies there is no need for a camera rig.\r\n * Basically only one eye is rendered corresponding to the camera.\r\n */\r\n public static readonly RIG_MODE_NONE = 0;\r\n /**\r\n * Simulates a camera Rig with one blue eye and one red eye.\r\n * This can be use with 3d blue and red glasses.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;\r\n /**\r\n * Defines that both eyes of the camera will be rendered side by side with a parallel target.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;\r\n /**\r\n * Defines that both eyes of the camera will be rendered side by side with a none parallel target.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;\r\n /**\r\n * Defines that both eyes of the camera will be rendered over under each other.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;\r\n /**\r\n * Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_INTERLACED = 14;\r\n /**\r\n * Defines that both eyes of the camera should be renderered in a VR mode (carbox).\r\n */\r\n public static readonly RIG_MODE_VR = 20;\r\n /**\r\n * Custom rig mode allowing rig cameras to be populated manually with any number of cameras\r\n */\r\n public static readonly RIG_MODE_CUSTOM = 22;\r\n\r\n /**\r\n * Maximum number of uv sets supported\r\n */\r\n public static readonly MAX_SUPPORTED_UV_SETS = 6;\r\n\r\n /**\r\n * GL constants\r\n */\r\n /** Alpha blend equation: ADD */\r\n public static readonly GL_ALPHA_EQUATION_ADD = 0x8006;\r\n /** Alpha equation: MIN */\r\n public static readonly GL_ALPHA_EQUATION_MIN = 0x8007;\r\n /** Alpha equation: MAX */\r\n public static readonly GL_ALPHA_EQUATION_MAX = 0x8008;\r\n /** Alpha equation: SUBTRACT */\r\n public static readonly GL_ALPHA_EQUATION_SUBTRACT = 0x800a;\r\n /** Alpha equation: REVERSE_SUBTRACT */\r\n public static readonly GL_ALPHA_EQUATION_REVERSE_SUBTRACT = 0x800b;\r\n\r\n /** Alpha blend function: SRC */\r\n public static readonly GL_ALPHA_FUNCTION_SRC = 0x0300;\r\n /** Alpha blend function: ONE_MINUS_SRC */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR = 0x0301;\r\n /** Alpha blend function: SRC_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_SRC_ALPHA = 0x0302;\r\n /** Alpha blend function: ONE_MINUS_SRC_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA = 0x0303;\r\n /** Alpha blend function: DST_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_DST_ALPHA = 0x0304;\r\n /** Alpha blend function: ONE_MINUS_DST_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA = 0x0305;\r\n /** Alpha blend function: ONE_MINUS_DST */\r\n public static readonly GL_ALPHA_FUNCTION_DST_COLOR = 0x0306;\r\n /** Alpha blend function: ONE_MINUS_DST */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR = 0x0307;\r\n /** Alpha blend function: SRC_ALPHA_SATURATED */\r\n public static readonly GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED = 0x0308;\r\n /** Alpha blend function: CONSTANT */\r\n public static readonly GL_ALPHA_FUNCTION_CONSTANT_COLOR = 0x8001;\r\n /** Alpha blend function: ONE_MINUS_CONSTANT */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR = 0x8002;\r\n /** Alpha blend function: CONSTANT_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_CONSTANT_ALPHA = 0x8003;\r\n /** Alpha blend function: ONE_MINUS_CONSTANT_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA = 0x8004;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_SRC1_COLOR = 0x88f9;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_COLOR = 0x88fa;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_SRC1_ALPHA = 0x8589;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_ALPHA = 0x88fb;\r\n\r\n /** URL to the snippet server. Points to the public snippet server by default */\r\n public static SnippetUrl = \"https://snippet.babylonjs.com\";\r\n\r\n /** The fog is deactivated */\r\n public static FOGMODE_NONE = 0;\r\n /** The fog density is following an exponential function */\r\n public static FOGMODE_EXP = 1;\r\n /** The fog density is following an exponential function faster than FOGMODE_EXP */\r\n public static FOGMODE_EXP2 = 2;\r\n /** The fog density is following a linear function. */\r\n public static FOGMODE_LINEAR = 3;\r\n\r\n /**\r\n * The byte type.\r\n */\r\n public static BYTE = 5120;\r\n\r\n /**\r\n * The unsigned byte type.\r\n */\r\n public static UNSIGNED_BYTE = 5121;\r\n\r\n /**\r\n * The short type.\r\n */\r\n public static SHORT = 5122;\r\n\r\n /**\r\n * The unsigned short type.\r\n */\r\n public static UNSIGNED_SHORT = 5123;\r\n\r\n /**\r\n * The integer type.\r\n */\r\n public static INT = 5124;\r\n\r\n /**\r\n * The unsigned integer type.\r\n */\r\n public static UNSIGNED_INT = 5125;\r\n\r\n /**\r\n * The float type.\r\n */\r\n public static FLOAT = 5126;\r\n\r\n /**\r\n * Positions\r\n */\r\n public static PositionKind = \"position\";\r\n /**\r\n * Normals\r\n */\r\n public static NormalKind = \"normal\";\r\n /**\r\n * Tangents\r\n */\r\n public static TangentKind = \"tangent\";\r\n /**\r\n * Texture coordinates\r\n */\r\n public static UVKind = \"uv\";\r\n /**\r\n * Texture coordinates 2\r\n */\r\n public static UV2Kind = \"uv2\";\r\n /**\r\n * Texture coordinates 3\r\n */\r\n public static UV3Kind = \"uv3\";\r\n /**\r\n * Texture coordinates 4\r\n */\r\n public static UV4Kind = \"uv4\";\r\n /**\r\n * Texture coordinates 5\r\n */\r\n public static UV5Kind = \"uv5\";\r\n /**\r\n * Texture coordinates 6\r\n */\r\n public static UV6Kind = \"uv6\";\r\n /**\r\n * Colors\r\n */\r\n public static ColorKind = \"color\";\r\n /**\r\n * Instance Colors\r\n */\r\n public static ColorInstanceKind = \"instanceColor\";\r\n /**\r\n * Matrix indices (for bones)\r\n */\r\n public static MatricesIndicesKind = \"matricesIndices\";\r\n /**\r\n * Matrix weights (for bones)\r\n */\r\n public static MatricesWeightsKind = \"matricesWeights\";\r\n /**\r\n * Additional matrix indices (for bones)\r\n */\r\n public static MatricesIndicesExtraKind = \"matricesIndicesExtra\";\r\n /**\r\n * Additional matrix weights (for bones)\r\n */\r\n public static MatricesWeightsExtraKind = \"matricesWeightsExtra\";\r\n}\r\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/constants.ts"],"names":[],"mappings":"AAAA,yDAA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** Defines the cross module used constants to avoid circular dependencies */\r\nexport class Constants {\r\n /** Sampler suffix when associated with a texture name */\r\n public static readonly AUTOSAMPLERSUFFIX = \"Sampler\";\r\n /** Flag used to disable diagnostics for WebGPU */\r\n public static readonly DISABLEUA = \"#define DISABLE_UNIFORMITY_ANALYSIS\";\r\n /** Defines that alpha blending is disabled */\r\n public static readonly ALPHA_DISABLE = 0;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + DEST */\r\n public static readonly ALPHA_ADD = 1;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\r\n public static readonly ALPHA_COMBINE = 2;\r\n /** Defines that alpha blending is DEST - SRC * DEST */\r\n public static readonly ALPHA_SUBTRACT = 3;\r\n /** Defines that alpha blending is SRC * DEST */\r\n public static readonly ALPHA_MULTIPLY = 4;\r\n /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC) * DEST */\r\n public static readonly ALPHA_MAXIMIZED = 5;\r\n /** Defines that alpha blending is SRC + DEST */\r\n public static readonly ALPHA_ONEONE = 6;\r\n /** Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST */\r\n public static readonly ALPHA_PREMULTIPLIED = 7;\r\n /**\r\n * Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST\r\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n public static readonly ALPHA_PREMULTIPLIED_PORTERDUFF = 8;\r\n /** Defines that alpha blending is CST * SRC + (1 - CST) * DEST */\r\n public static readonly ALPHA_INTERPOLATE = 9;\r\n /**\r\n * Defines that alpha blending is SRC + (1 - SRC) * DEST\r\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\r\n */\r\n public static readonly ALPHA_SCREENMODE = 10;\r\n /**\r\n * Defines that alpha blending is SRC + DST\r\n * Alpha will be set to SRC ALPHA + DST ALPHA\r\n */\r\n public static readonly ALPHA_ONEONE_ONEONE = 11;\r\n /**\r\n * Defines that alpha blending is SRC * DST ALPHA + DST\r\n * Alpha will be set to 0\r\n */\r\n public static readonly ALPHA_ALPHATOCOLOR = 12;\r\n /**\r\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\r\n */\r\n public static readonly ALPHA_REVERSEONEMINUS = 13;\r\n /**\r\n * Defines that alpha blending is SRC + DST * (1 - SRC ALPHA)\r\n * Alpha will be set to SRC ALPHA + DST ALPHA * (1 - SRC ALPHA)\r\n */\r\n public static readonly ALPHA_SRC_DSTONEMINUSSRCALPHA = 14;\r\n /**\r\n * Defines that alpha blending is SRC + DST\r\n * Alpha will be set to SRC ALPHA\r\n */\r\n public static readonly ALPHA_ONEONE_ONEZERO = 15;\r\n /**\r\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\r\n * Alpha will be set to DST ALPHA\r\n */\r\n public static readonly ALPHA_EXCLUSION = 16;\r\n /**\r\n * Defines that alpha blending is SRC * SRC ALPHA + DST * (1 - SRC ALPHA)\r\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DST ALPHA\r\n */\r\n public static readonly ALPHA_LAYER_ACCUMULATE = 17;\r\n\r\n /** Defines that alpha blending equation a SUM */\r\n public static readonly ALPHA_EQUATION_ADD = 0;\r\n /** Defines that alpha blending equation a SUBSTRACTION */\r\n public static readonly ALPHA_EQUATION_SUBSTRACT = 1;\r\n /** Defines that alpha blending equation a REVERSE SUBSTRACTION */\r\n public static readonly ALPHA_EQUATION_REVERSE_SUBTRACT = 2;\r\n /** Defines that alpha blending equation a MAX operation */\r\n public static readonly ALPHA_EQUATION_MAX = 3;\r\n /** Defines that alpha blending equation a MIN operation */\r\n public static readonly ALPHA_EQUATION_MIN = 4;\r\n /**\r\n * Defines that alpha blending equation a DARKEN operation:\r\n * It takes the min of the src and sums the alpha channels.\r\n */\r\n public static readonly ALPHA_EQUATION_DARKEN = 5;\r\n\r\n /** Defines that the resource is not delayed*/\r\n public static readonly DELAYLOADSTATE_NONE = 0;\r\n /** Defines that the resource was successfully delay loaded */\r\n public static readonly DELAYLOADSTATE_LOADED = 1;\r\n /** Defines that the resource is currently delay loading */\r\n public static readonly DELAYLOADSTATE_LOADING = 2;\r\n /** Defines that the resource is delayed and has not started loading */\r\n public static readonly DELAYLOADSTATE_NOTLOADED = 4;\r\n\r\n // Depth or Stencil test Constants.\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\r\n public static readonly NEVER = 0x0200;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\r\n public static readonly ALWAYS = 0x0207;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\r\n public static readonly LESS = 0x0201;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\r\n public static readonly EQUAL = 0x0202;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\r\n public static readonly LEQUAL = 0x0203;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\r\n public static readonly GREATER = 0x0204;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\r\n public static readonly GEQUAL = 0x0206;\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\r\n public static readonly NOTEQUAL = 0x0205;\r\n\r\n // Stencil Actions Constants.\r\n /** Passed to stencilOperation to specify that stencil value must be kept */\r\n public static readonly KEEP = 0x1e00;\r\n /** Passed to stencilOperation to specify that stencil value must be zero */\r\n public static readonly ZERO = 0x0000;\r\n /** Passed to stencilOperation to specify that stencil value must be replaced */\r\n public static readonly REPLACE = 0x1e01;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented */\r\n public static readonly INCR = 0x1e02;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented */\r\n public static readonly DECR = 0x1e03;\r\n /** Passed to stencilOperation to specify that stencil value must be inverted */\r\n public static readonly INVERT = 0x150a;\r\n /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\r\n public static readonly INCR_WRAP = 0x8507;\r\n /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\r\n public static readonly DECR_WRAP = 0x8508;\r\n\r\n /** Texture is not repeating outside of 0..1 UVs */\r\n public static readonly TEXTURE_CLAMP_ADDRESSMODE = 0;\r\n /** Texture is repeating outside of 0..1 UVs */\r\n public static readonly TEXTURE_WRAP_ADDRESSMODE = 1;\r\n /** Texture is repeating and mirrored */\r\n public static readonly TEXTURE_MIRROR_ADDRESSMODE = 2;\r\n\r\n /** Flag to create a storage texture */\r\n public static readonly TEXTURE_CREATIONFLAG_STORAGE = 1;\r\n\r\n /** ALPHA */\r\n public static readonly TEXTUREFORMAT_ALPHA = 0;\r\n /** LUMINANCE */\r\n public static readonly TEXTUREFORMAT_LUMINANCE = 1;\r\n /** LUMINANCE_ALPHA */\r\n public static readonly TEXTUREFORMAT_LUMINANCE_ALPHA = 2;\r\n /** RGB */\r\n public static readonly TEXTUREFORMAT_RGB = 4;\r\n /** RGBA */\r\n public static readonly TEXTUREFORMAT_RGBA = 5;\r\n /** RED */\r\n public static readonly TEXTUREFORMAT_RED = 6;\r\n /** RED (2nd reference) */\r\n public static readonly TEXTUREFORMAT_R = 6;\r\n /** RG */\r\n public static readonly TEXTUREFORMAT_RG = 7;\r\n /** RED_INTEGER */\r\n public static readonly TEXTUREFORMAT_RED_INTEGER = 8;\r\n /** RED_INTEGER (2nd reference) */\r\n public static readonly TEXTUREFORMAT_R_INTEGER = 8;\r\n /** RG_INTEGER */\r\n public static readonly TEXTUREFORMAT_RG_INTEGER = 9;\r\n /** RGB_INTEGER */\r\n public static readonly TEXTUREFORMAT_RGB_INTEGER = 10;\r\n /** RGBA_INTEGER */\r\n public static readonly TEXTUREFORMAT_RGBA_INTEGER = 11;\r\n /** BGRA */\r\n public static readonly TEXTUREFORMAT_BGRA = 12;\r\n\r\n /** Depth 24 bits + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24_STENCIL8 = 13;\r\n /** Depth 32 bits float */\r\n public static readonly TEXTUREFORMAT_DEPTH32_FLOAT = 14;\r\n /** Depth 16 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH16 = 15;\r\n /** Depth 24 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24 = 16;\r\n /** Depth 24 bits unorm + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH24UNORM_STENCIL8 = 17;\r\n /** Depth 32 bits float + Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8 = 18;\r\n /** Stencil 8 bits */\r\n public static readonly TEXTUREFORMAT_STENCIL8 = 19;\r\n /** UNDEFINED */\r\n public static readonly TEXTUREFORMAT_UNDEFINED = 0xffffffff;\r\n\r\n /** Compressed BC7 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM = 36492;\r\n /** Compressed BC7 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 36493;\r\n /** Compressed BC6 unsigned float */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 36495;\r\n /** Compressed BC6 signed float */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 36494;\r\n /** Compressed BC3 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5 = 33779;\r\n /** Compressed BC3 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919;\r\n /** Compressed BC2 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3 = 33778;\r\n /** Compressed BC2 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918;\r\n /** Compressed BC1 (RGBA) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1 = 33777;\r\n /** Compressed BC1 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1 = 33776;\r\n /** Compressed BC1 (SRGB+A) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917;\r\n /** Compressed BC1 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916;\r\n /** Compressed ASTC 4x4 */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4 = 37808;\r\n /** Compressed ASTC 4x4 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 37840;\r\n /** Compressed ETC1 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL = 36196;\r\n /** Compressed ETC2 (RGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB8_ETC2 = 37492;\r\n /** Compressed ETC2 (SRGB) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2 = 37493;\r\n /** Compressed ETC2 (RGB+A1) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494;\r\n /** Compressed ETC2 (SRGB+A1)*/\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495;\r\n /** Compressed ETC2 (RGB+A) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC = 37496;\r\n /** Compressed ETC2 (SRGB+1) */\r\n public static readonly TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497;\r\n\r\n /** UNSIGNED_BYTE */\r\n public static readonly TEXTURETYPE_UNSIGNED_BYTE = 0;\r\n /** UNSIGNED_BYTE (2nd reference) */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT = 0;\r\n /** FLOAT */\r\n public static readonly TEXTURETYPE_FLOAT = 1;\r\n /** HALF_FLOAT */\r\n public static readonly TEXTURETYPE_HALF_FLOAT = 2;\r\n /** BYTE */\r\n public static readonly TEXTURETYPE_BYTE = 3;\r\n /** SHORT */\r\n public static readonly TEXTURETYPE_SHORT = 4;\r\n /** UNSIGNED_SHORT */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT = 5;\r\n /** INT */\r\n public static readonly TEXTURETYPE_INT = 6;\r\n /** UNSIGNED_INT */\r\n public static readonly TEXTURETYPE_UNSIGNED_INTEGER = 7;\r\n /** UNSIGNED_SHORT_4_4_4_4 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;\r\n /** UNSIGNED_SHORT_5_5_5_1 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;\r\n /** UNSIGNED_SHORT_5_6_5 */\r\n public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;\r\n /** UNSIGNED_INT_2_10_10_10_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;\r\n /** UNSIGNED_INT_24_8 */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_24_8 = 12;\r\n /** UNSIGNED_INT_10F_11F_11F_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;\r\n /** UNSIGNED_INT_5_9_9_9_REV */\r\n public static readonly TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;\r\n /** FLOAT_32_UNSIGNED_INT_24_8_REV */\r\n public static readonly TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;\r\n /** UNDEFINED */\r\n public static readonly TEXTURETYPE_UNDEFINED = 16;\r\n\r\n /** 2D Texture target*/\r\n public static readonly TEXTURE_2D = 3553;\r\n /** 2D Array Texture target */\r\n public static readonly TEXTURE_2D_ARRAY = 35866;\r\n /** Cube Map Texture target */\r\n public static readonly TEXTURE_CUBE_MAP = 34067;\r\n /** Cube Map Array Texture target */\r\n public static readonly TEXTURE_CUBE_MAP_ARRAY = 0xdeadbeef;\r\n /** 3D Texture target */\r\n public static readonly TEXTURE_3D = 32879;\r\n\r\n /** nearest is mag = nearest and min = nearest and no mip */\r\n public static readonly TEXTURE_NEAREST_SAMPLINGMODE = 1;\r\n /** mag = nearest and min = nearest and mip = none */\r\n public static readonly TEXTURE_NEAREST_NEAREST = 1;\r\n\r\n /** Bilinear is mag = linear and min = linear and no mip */\r\n public static readonly TEXTURE_BILINEAR_SAMPLINGMODE = 2;\r\n /** mag = linear and min = linear and mip = none */\r\n public static readonly TEXTURE_LINEAR_LINEAR = 2;\r\n\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n public static readonly TEXTURE_TRILINEAR_SAMPLINGMODE = 3;\r\n /** Trilinear is mag = linear and min = linear and mip = linear */\r\n public static readonly TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;\r\n\r\n /** mag = nearest and min = nearest and mip = nearest */\r\n public static readonly TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;\r\n /** mag = nearest and min = linear and mip = nearest */\r\n public static readonly TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;\r\n /** mag = nearest and min = linear and mip = linear */\r\n public static readonly TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;\r\n /** mag = nearest and min = linear and mip = none */\r\n public static readonly TEXTURE_NEAREST_LINEAR = 7;\r\n /** nearest is mag = nearest and min = nearest and mip = linear */\r\n public static readonly TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8;\r\n /** mag = linear and min = nearest and mip = nearest */\r\n public static readonly TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;\r\n /** mag = linear and min = nearest and mip = linear */\r\n public static readonly TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;\r\n /** Bilinear is mag = linear and min = linear and mip = nearest */\r\n public static readonly TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11;\r\n /** mag = linear and min = nearest and mip = none */\r\n public static readonly TEXTURE_LINEAR_NEAREST = 12;\r\n\r\n /** Explicit coordinates mode */\r\n public static readonly TEXTURE_EXPLICIT_MODE = 0;\r\n /** Spherical coordinates mode */\r\n public static readonly TEXTURE_SPHERICAL_MODE = 1;\r\n /** Planar coordinates mode */\r\n public static readonly TEXTURE_PLANAR_MODE = 2;\r\n /** Cubic coordinates mode */\r\n public static readonly TEXTURE_CUBIC_MODE = 3;\r\n /** Projection coordinates mode */\r\n public static readonly TEXTURE_PROJECTION_MODE = 4;\r\n /** Skybox coordinates mode */\r\n public static readonly TEXTURE_SKYBOX_MODE = 5;\r\n /** Inverse Cubic coordinates mode */\r\n public static readonly TEXTURE_INVCUBIC_MODE = 6;\r\n /** Equirectangular coordinates mode */\r\n public static readonly TEXTURE_EQUIRECTANGULAR_MODE = 7;\r\n /** Equirectangular Fixed coordinates mode */\r\n public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;\r\n /** Equirectangular Fixed Mirrored coordinates mode */\r\n public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\r\n\r\n /** Offline (baking) quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_OFFLINE = 4096;\r\n\r\n /** High quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_HIGH = 64;\r\n\r\n /** Medium quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_MEDIUM = 16;\r\n\r\n /** Low quality for texture filtering */\r\n public static readonly TEXTURE_FILTERING_QUALITY_LOW = 8;\r\n\r\n // Texture rescaling mode\r\n /** Defines that texture rescaling will use a floor to find the closer power of 2 size */\r\n public static readonly SCALEMODE_FLOOR = 1;\r\n /** Defines that texture rescaling will look for the nearest power of 2 size */\r\n public static readonly SCALEMODE_NEAREST = 2;\r\n /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\r\n public static readonly SCALEMODE_CEILING = 3;\r\n\r\n /**\r\n * The dirty texture flag value\r\n */\r\n public static readonly MATERIAL_TextureDirtyFlag = 1;\r\n /**\r\n * The dirty light flag value\r\n */\r\n public static readonly MATERIAL_LightDirtyFlag = 2;\r\n /**\r\n * The dirty fresnel flag value\r\n */\r\n public static readonly MATERIAL_FresnelDirtyFlag = 4;\r\n /**\r\n * The dirty attribute flag value\r\n */\r\n public static readonly MATERIAL_AttributesDirtyFlag = 8;\r\n /**\r\n * The dirty misc flag value\r\n */\r\n public static readonly MATERIAL_MiscDirtyFlag = 16;\r\n /**\r\n * The dirty prepass flag value\r\n */\r\n public static readonly MATERIAL_PrePassDirtyFlag = 32;\r\n /**\r\n * The all dirty flag value\r\n */\r\n public static readonly MATERIAL_AllDirtyFlag = 63;\r\n\r\n /**\r\n * Returns the triangle fill mode\r\n */\r\n public static readonly MATERIAL_TriangleFillMode = 0;\r\n /**\r\n * Returns the wireframe mode\r\n */\r\n public static readonly MATERIAL_WireFrameFillMode = 1;\r\n /**\r\n * Returns the point fill mode\r\n */\r\n public static readonly MATERIAL_PointFillMode = 2;\r\n /**\r\n * Returns the point list draw mode\r\n */\r\n public static readonly MATERIAL_PointListDrawMode = 3;\r\n /**\r\n * Returns the line list draw mode\r\n */\r\n public static readonly MATERIAL_LineListDrawMode = 4;\r\n /**\r\n * Returns the line loop draw mode\r\n */\r\n public static readonly MATERIAL_LineLoopDrawMode = 5;\r\n /**\r\n * Returns the line strip draw mode\r\n */\r\n public static readonly MATERIAL_LineStripDrawMode = 6;\r\n\r\n /**\r\n * Returns the triangle strip draw mode\r\n */\r\n public static readonly MATERIAL_TriangleStripDrawMode = 7;\r\n /**\r\n * Returns the triangle fan draw mode\r\n */\r\n public static readonly MATERIAL_TriangleFanDrawMode = 8;\r\n\r\n /**\r\n * Stores the clock-wise side orientation\r\n */\r\n public static readonly MATERIAL_ClockWiseSideOrientation = 0;\r\n /**\r\n * Stores the counter clock-wise side orientation\r\n */\r\n public static readonly MATERIAL_CounterClockWiseSideOrientation = 1;\r\n\r\n /**\r\n * Nothing\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_NothingTrigger = 0;\r\n /**\r\n * On pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickTrigger = 1;\r\n /**\r\n * On left pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnLeftPickTrigger = 2;\r\n /**\r\n * On right pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnRightPickTrigger = 3;\r\n /**\r\n * On center pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnCenterPickTrigger = 4;\r\n /**\r\n * On pick down\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickDownTrigger = 5;\r\n /**\r\n * On double pick\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnDoublePickTrigger = 6;\r\n /**\r\n * On pick up\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickUpTrigger = 7;\r\n /**\r\n * On pick out.\r\n * This trigger will only be raised if you also declared a OnPickDown\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPickOutTrigger = 16;\r\n /**\r\n * On long press\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnLongPressTrigger = 8;\r\n /**\r\n * On pointer over\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPointerOverTrigger = 9;\r\n /**\r\n * On pointer out\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnPointerOutTrigger = 10;\r\n /**\r\n * On every frame\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnEveryFrameTrigger = 11;\r\n /**\r\n * On intersection enter\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnIntersectionEnterTrigger = 12;\r\n /**\r\n * On intersection exit\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnIntersectionExitTrigger = 13;\r\n /**\r\n * On key down\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnKeyDownTrigger = 14;\r\n /**\r\n * On key up\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\r\n */\r\n public static readonly ACTION_OnKeyUpTrigger = 15;\r\n\r\n /**\r\n * Billboard mode will only apply to Y axis\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_Y = 2;\r\n /**\r\n * Billboard mode will apply to all axes\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_ALL = 7;\r\n /**\r\n * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_STRETCHED = 8;\r\n /**\r\n * Special billboard mode where the particle will be billboard to the camera but only around the axis of the direction of particle emission\r\n */\r\n public static readonly PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL = 9;\r\n\r\n /** Default culling strategy : this is an exclusion test and it's the more accurate.\r\n * Test order :\r\n * Is the bounding sphere outside the frustum ?\r\n * If not, are the bounding box vertices outside the frustum ?\r\n * It not, then the cullable object is in the frustum.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_STANDARD = 0;\r\n /** Culling strategy : Bounding Sphere Only.\r\n * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.\r\n * It's also less accurate than the standard because some not visible objects can still be selected.\r\n * Test : is the bounding sphere outside the frustum ?\r\n * If not, then the cullable object is in the frustum.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;\r\n /** Culling strategy : Optimistic Inclusion.\r\n * This in an inclusion test first, then the standard exclusion test.\r\n * This can be faster when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.\r\n * Anyway, it's as accurate as the standard strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the default culling strategy.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;\r\n /** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.\r\n * This in an inclusion test first, then the bounding sphere only exclusion test.\r\n * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.\r\n * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.\r\n * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.\r\n * Test :\r\n * Is the cullable object bounding sphere center in the frustum ?\r\n * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.\r\n */\r\n public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;\r\n\r\n /**\r\n * No logging while loading\r\n */\r\n public static readonly SCENELOADER_NO_LOGGING = 0;\r\n /**\r\n * Minimal logging while loading\r\n */\r\n public static readonly SCENELOADER_MINIMAL_LOGGING = 1;\r\n /**\r\n * Summary logging while loading\r\n */\r\n public static readonly SCENELOADER_SUMMARY_LOGGING = 2;\r\n /**\r\n * Detailed logging while loading\r\n */\r\n public static readonly SCENELOADER_DETAILED_LOGGING = 3;\r\n\r\n /**\r\n * Constant used to retrieve the irradiance texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_IRRADIANCE_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_IRRADIANCE_TEXTURE_TYPE = 0;\r\n /**\r\n * Constant used to retrieve the position texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_POSITION_TEXTURE_INDEX)\r\n */\r\n public static readonly PREPASS_POSITION_TEXTURE_TYPE = 1;\r\n /**\r\n * Constant used to retrieve the velocity texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_VELOCITY_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_VELOCITY_TEXTURE_TYPE = 2;\r\n /**\r\n * Constant used to retrieve the reflectivity texture index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_REFLECTIVITY_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_REFLECTIVITY_TEXTURE_TYPE = 3;\r\n /**\r\n * Constant used to retrieve the lit color texture index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_COLOR_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_COLOR_TEXTURE_TYPE = 4;\r\n /**\r\n * Constant used to retrieve depth index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_DEPTH_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_DEPTH_TEXTURE_TYPE = 5;\r\n /**\r\n * Constant used to retrieve normal index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_NORMAL_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_NORMAL_TEXTURE_TYPE = 6;\r\n /**\r\n * Constant used to retrieve (sqrt) albedo index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_ALBEDO_SQRT_TEXTURE_TYPE = 7;\r\n\r\n /**\r\n * Constant used to retrieve world normal index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_WORLD_NORMAL_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_WORLD_NORMAL_TEXTURE_TYPE = 8;\r\n\r\n /**\r\n * Constant used to retrieve the local position texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_LOCAL_POSITION_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_LOCAL_POSITION_TEXTURE_TYPE = 9;\r\n\r\n /**\r\n * Constant used to retrieve screen-space (non-linear) depth index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE = 10;\r\n\r\n /**\r\n * Constant used to retrieve the velocity texture index in the textures array in the prepass\r\n * using getIndex(Constants.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE = 11;\r\n\r\n /**\r\n * Constant used to retrieve albedo index in the textures array in the prepass\r\n * using the getIndex(Constants.PREPASS_ALBEDO_TEXTURE_TYPE)\r\n */\r\n public static readonly PREPASS_ALBEDO_TEXTURE_TYPE = 12;\r\n\r\n /** Flag to create a readable buffer (the buffer can be the source of a copy) */\r\n public static readonly BUFFER_CREATIONFLAG_READ = 1;\r\n /** Flag to create a writable buffer (the buffer can be the destination of a copy) */\r\n public static readonly BUFFER_CREATIONFLAG_WRITE = 2;\r\n /** Flag to create a readable and writable buffer */\r\n public static readonly BUFFER_CREATIONFLAG_READWRITE = 3;\r\n /** Flag to create a buffer suitable to be used as a uniform buffer */\r\n public static readonly BUFFER_CREATIONFLAG_UNIFORM = 4;\r\n /** Flag to create a buffer suitable to be used as a vertex buffer */\r\n public static readonly BUFFER_CREATIONFLAG_VERTEX = 8;\r\n /** Flag to create a buffer suitable to be used as an index buffer */\r\n public static readonly BUFFER_CREATIONFLAG_INDEX = 16;\r\n /** Flag to create a buffer suitable to be used as a storage buffer */\r\n public static readonly BUFFER_CREATIONFLAG_STORAGE = 32;\r\n /** Flag to create a buffer suitable to be used for indirect calls, such as `dispatchIndirect` */\r\n public static readonly BUFFER_CREATIONFLAG_INDIRECT = 64;\r\n\r\n /**\r\n * Prefixes used by the engine for sub mesh draw wrappers\r\n */\r\n\r\n /** @internal */\r\n public static readonly RENDERPASS_MAIN = 0;\r\n\r\n /**\r\n * Constant used as key code for Alt key\r\n */\r\n public static readonly INPUT_ALT_KEY = 18;\r\n\r\n /**\r\n * Constant used as key code for Ctrl key\r\n */\r\n public static readonly INPUT_CTRL_KEY = 17;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Left Win, Left Cmd)\r\n */\r\n public static readonly INPUT_META_KEY1 = 91;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Right Win)\r\n */\r\n public static readonly INPUT_META_KEY2 = 92;\r\n\r\n /**\r\n * Constant used as key code for Meta key (Right Win, Right Cmd)\r\n */\r\n public static readonly INPUT_META_KEY3 = 93;\r\n\r\n /**\r\n * Constant used as key code for Shift key\r\n */\r\n public static readonly INPUT_SHIFT_KEY = 16;\r\n\r\n /** Standard snapshot rendering. In this mode, some form of dynamic behavior is possible (for eg, uniform buffers are still updated) */\r\n public static readonly SNAPSHOTRENDERING_STANDARD = 0;\r\n\r\n /** Fast snapshot rendering. In this mode, everything is static and only some limited form of dynamic behaviour is possible */\r\n public static readonly SNAPSHOTRENDERING_FAST = 1;\r\n\r\n /**\r\n * This is the default projection mode used by the cameras.\r\n * It helps recreating a feeling of perspective and better appreciate depth.\r\n * This is the best way to simulate real life cameras.\r\n */\r\n public static readonly PERSPECTIVE_CAMERA = 0;\r\n /**\r\n * This helps creating camera with an orthographic mode.\r\n * Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.\r\n */\r\n public static readonly ORTHOGRAPHIC_CAMERA = 1;\r\n\r\n /**\r\n * This is the default FOV mode for perspective cameras.\r\n * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.\r\n */\r\n public static readonly FOVMODE_VERTICAL_FIXED = 0;\r\n /**\r\n * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.\r\n */\r\n public static readonly FOVMODE_HORIZONTAL_FIXED = 1;\r\n\r\n /**\r\n * This specifies there is no need for a camera rig.\r\n * Basically only one eye is rendered corresponding to the camera.\r\n */\r\n public static readonly RIG_MODE_NONE = 0;\r\n /**\r\n * Simulates a camera Rig with one blue eye and one red eye.\r\n * This can be use with 3d blue and red glasses.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;\r\n /**\r\n * Defines that both eyes of the camera will be rendered side by side with a parallel target.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;\r\n /**\r\n * Defines that both eyes of the camera will be rendered side by side with a none parallel target.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;\r\n /**\r\n * Defines that both eyes of the camera will be rendered over under each other.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;\r\n /**\r\n * Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.\r\n */\r\n public static readonly RIG_MODE_STEREOSCOPIC_INTERLACED = 14;\r\n /**\r\n * Defines that both eyes of the camera should be renderered in a VR mode (carbox).\r\n */\r\n public static readonly RIG_MODE_VR = 20;\r\n /**\r\n * Custom rig mode allowing rig cameras to be populated manually with any number of cameras\r\n */\r\n public static readonly RIG_MODE_CUSTOM = 22;\r\n\r\n /**\r\n * Maximum number of uv sets supported\r\n */\r\n public static readonly MAX_SUPPORTED_UV_SETS = 6;\r\n\r\n /**\r\n * GL constants\r\n */\r\n /** Alpha blend equation: ADD */\r\n public static readonly GL_ALPHA_EQUATION_ADD = 0x8006;\r\n /** Alpha equation: MIN */\r\n public static readonly GL_ALPHA_EQUATION_MIN = 0x8007;\r\n /** Alpha equation: MAX */\r\n public static readonly GL_ALPHA_EQUATION_MAX = 0x8008;\r\n /** Alpha equation: SUBTRACT */\r\n public static readonly GL_ALPHA_EQUATION_SUBTRACT = 0x800a;\r\n /** Alpha equation: REVERSE_SUBTRACT */\r\n public static readonly GL_ALPHA_EQUATION_REVERSE_SUBTRACT = 0x800b;\r\n\r\n /** Alpha blend function: SRC */\r\n public static readonly GL_ALPHA_FUNCTION_SRC = 0x0300;\r\n /** Alpha blend function: ONE_MINUS_SRC */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR = 0x0301;\r\n /** Alpha blend function: SRC_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_SRC_ALPHA = 0x0302;\r\n /** Alpha blend function: ONE_MINUS_SRC_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA = 0x0303;\r\n /** Alpha blend function: DST_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_DST_ALPHA = 0x0304;\r\n /** Alpha blend function: ONE_MINUS_DST_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA = 0x0305;\r\n /** Alpha blend function: ONE_MINUS_DST */\r\n public static readonly GL_ALPHA_FUNCTION_DST_COLOR = 0x0306;\r\n /** Alpha blend function: ONE_MINUS_DST */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR = 0x0307;\r\n /** Alpha blend function: SRC_ALPHA_SATURATED */\r\n public static readonly GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED = 0x0308;\r\n /** Alpha blend function: CONSTANT */\r\n public static readonly GL_ALPHA_FUNCTION_CONSTANT_COLOR = 0x8001;\r\n /** Alpha blend function: ONE_MINUS_CONSTANT */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR = 0x8002;\r\n /** Alpha blend function: CONSTANT_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_CONSTANT_ALPHA = 0x8003;\r\n /** Alpha blend function: ONE_MINUS_CONSTANT_ALPHA */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA = 0x8004;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_SRC1_COLOR = 0x88f9;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_COLOR = 0x88fa;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_SRC1_ALPHA = 0x8589;\r\n /** Alpha blend function: SRC1 */\r\n public static readonly GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_ALPHA = 0x88fb;\r\n\r\n /** URL to the snippet server. Points to the public snippet server by default */\r\n public static SnippetUrl = \"https://snippet.babylonjs.com\";\r\n\r\n /** The fog is deactivated */\r\n public static FOGMODE_NONE = 0;\r\n /** The fog density is following an exponential function */\r\n public static FOGMODE_EXP = 1;\r\n /** The fog density is following an exponential function faster than FOGMODE_EXP */\r\n public static FOGMODE_EXP2 = 2;\r\n /** The fog density is following a linear function. */\r\n public static FOGMODE_LINEAR = 3;\r\n\r\n /**\r\n * The byte type.\r\n */\r\n public static BYTE = 5120;\r\n\r\n /**\r\n * The unsigned byte type.\r\n */\r\n public static UNSIGNED_BYTE = 5121;\r\n\r\n /**\r\n * The short type.\r\n */\r\n public static SHORT = 5122;\r\n\r\n /**\r\n * The unsigned short type.\r\n */\r\n public static UNSIGNED_SHORT = 5123;\r\n\r\n /**\r\n * The integer type.\r\n */\r\n public static INT = 5124;\r\n\r\n /**\r\n * The unsigned integer type.\r\n */\r\n public static UNSIGNED_INT = 5125;\r\n\r\n /**\r\n * The float type.\r\n */\r\n public static FLOAT = 5126;\r\n\r\n /**\r\n * Positions\r\n */\r\n public static PositionKind = \"position\";\r\n /**\r\n * Normals\r\n */\r\n public static NormalKind = \"normal\";\r\n /**\r\n * Tangents\r\n */\r\n public static TangentKind = \"tangent\";\r\n /**\r\n * Texture coordinates\r\n */\r\n public static UVKind = \"uv\";\r\n /**\r\n * Texture coordinates 2\r\n */\r\n public static UV2Kind = \"uv2\";\r\n /**\r\n * Texture coordinates 3\r\n */\r\n public static UV3Kind = \"uv3\";\r\n /**\r\n * Texture coordinates 4\r\n */\r\n public static UV4Kind = \"uv4\";\r\n /**\r\n * Texture coordinates 5\r\n */\r\n public static UV5Kind = \"uv5\";\r\n /**\r\n * Texture coordinates 6\r\n */\r\n public static UV6Kind = \"uv6\";\r\n /**\r\n * Colors\r\n */\r\n public static ColorKind = \"color\";\r\n /**\r\n * Instance Colors\r\n */\r\n public static ColorInstanceKind = \"instanceColor\";\r\n /**\r\n * Matrix indices (for bones)\r\n */\r\n public static MatricesIndicesKind = \"matricesIndices\";\r\n /**\r\n * Matrix weights (for bones)\r\n */\r\n public static MatricesWeightsKind = \"matricesWeights\";\r\n /**\r\n * Additional matrix indices (for bones)\r\n */\r\n public static MatricesIndicesExtraKind = \"matricesIndicesExtra\";\r\n /**\r\n * Additional matrix weights (for bones)\r\n */\r\n public static MatricesWeightsExtraKind = \"matricesWeightsExtra\";\r\n}\r\n"]}
@@ -99,6 +99,13 @@ export declare class RenderTargetWrapper {
99
99
  * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
100
100
  */
101
101
  get layerIndices(): Nullable<number[]>;
102
+ /**
103
+ * Gets the base array layer of a texture in the textures array
104
+ * This is an number that is calculated based on the layer and face indices set for this texture at that index
105
+ * @param index The index of the texture in the textures array to get the base array layer for
106
+ * @returns the base array layer of the texture at the given index
107
+ */
108
+ getBaseArrayLayer(index: number): number;
102
109
  /**
103
110
  * Gets the sample count of the render target
104
111
  */
@@ -93,6 +93,21 @@ export class RenderTargetWrapper {
93
93
  get layerIndices() {
94
94
  return this._layerIndices;
95
95
  }
96
+ /**
97
+ * Gets the base array layer of a texture in the textures array
98
+ * This is an number that is calculated based on the layer and face indices set for this texture at that index
99
+ * @param index The index of the texture in the textures array to get the base array layer for
100
+ * @returns the base array layer of the texture at the given index
101
+ */
102
+ getBaseArrayLayer(index) {
103
+ if (!this._textures) {
104
+ return -1;
105
+ }
106
+ const texture = this._textures[index];
107
+ const layerIndex = this._layerIndices?.[index] ?? 0;
108
+ const faceIndex = this._faceIndices?.[index] ?? 0;
109
+ return texture.isCube ? layerIndex * 6 + faceIndex : texture.is3D ? 0 : layerIndex;
110
+ }
96
111
  /**
97
112
  * Gets the sample count of the render target
98
113
  */
@@ -1 +1 @@
1
- {"version":3,"file":"renderTargetWrapper.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/renderTargetWrapper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAcxC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IA6B5B;;OAEG;IACH,IAAW,mBAAmB;QAC1B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,8BAA8B;QACrC,OAAO,IAAI,CAAC,+BAA+B,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAA2C,IAAI,CAAC,KAAM,CAAC,KAAK,IAAY,IAAI,CA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AE,CAAC;aAC/B;SACJ;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,uBAAuB,GAAG,KAAK;QAC1C,IAAI,CAAC,uBAAuB,EAAE;YAC1B,IAAI,CAAC,oBAAoB,EAAE,OAAO,EAAE,CAAC;YACrC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;YACjC,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B;QAED,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;CACJ","sourcesContent":["import type { InternalTexture } from \"../Materials/Textures/internalTexture\";\r\nimport { InternalTextureSource } from \"../Materials/Textures/internalTexture\";\r\nimport type { RenderTargetCreationOptions, TextureSize } from \"../Materials/Textures/textureCreationOptions\";\r\nimport type { Nullable } from \"../types\";\r\nimport { Constants } from \"./constants\";\r\nimport type { AbstractEngine } from \"./abstractEngine\";\r\nimport type { IMultiRenderTargetOptions } from \"../Materials/Textures/multiRenderTarget\";\r\n\r\n/**\r\n * An interface enforcing the renderTarget accessor to used by render target textures.\r\n */\r\nexport interface IRenderTargetTexture {\r\n /**\r\n * Entry point to access the wrapper on a texture.\r\n */\r\n renderTarget: Nullable<RenderTargetWrapper>;\r\n}\r\n\r\n/**\r\n * Wrapper around a render target (either single or multi textures)\r\n */\r\nexport class RenderTargetWrapper {\r\n protected _engine: AbstractEngine;\r\n private _size: TextureSize;\r\n private _isCube: boolean;\r\n private _isMulti: boolean;\r\n private _textures: Nullable<InternalTexture[]> = null;\r\n private _faceIndices: Nullable<number[]> = null;\r\n private _layerIndices: Nullable<number[]> = null;\r\n private _depthStencilTextureLabel?: string;\r\n /** @internal */\r\n public _samples = 1;\r\n\r\n /** @internal */\r\n public _attachments: Nullable<number[]> = null;\r\n /** @internal */\r\n public _generateStencilBuffer: boolean = false;\r\n /** @internal */\r\n public _generateDepthBuffer: boolean = false;\r\n\r\n /** @internal */\r\n public _depthStencilTexture: Nullable<InternalTexture>;\r\n /** @internal */\r\n public _depthStencilTextureWithStencil: boolean = false;\r\n\r\n /**\r\n * Gets or sets the label of the render target wrapper (optional, for debugging purpose)\r\n */\r\n public label?: string;\r\n\r\n /**\r\n * Gets the depth/stencil texture (if created by a createDepthStencilTexture() call)\r\n */\r\n public get depthStencilTexture() {\r\n return this._depthStencilTexture;\r\n }\r\n\r\n /**\r\n * Indicates if the depth/stencil texture has a stencil aspect\r\n */\r\n public get depthStencilTextureWithStencil() {\r\n return this._depthStencilTextureWithStencil;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a cube texture or if false a 2d texture\r\n */\r\n public get isCube(): boolean {\r\n return this._isCube;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a single or multi target render wrapper\r\n */\r\n public get isMulti(): boolean {\r\n return this._isMulti;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a single or an array of textures\r\n */\r\n public get is2DArray(): boolean {\r\n return this.layers > 0;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a 3D texture\r\n */\r\n public get is3D(): boolean {\r\n return this.depth > 0;\r\n }\r\n\r\n /**\r\n * Gets the size of the render target wrapper (used for cubes, as width=height in this case)\r\n */\r\n public get size(): number {\r\n return this.width;\r\n }\r\n\r\n /**\r\n * Gets the width of the render target wrapper\r\n */\r\n public get width(): number {\r\n return (<{ width: number; height: number }>this._size).width || <number>this._size;\r\n }\r\n\r\n /**\r\n * Gets the height of the render target wrapper\r\n */\r\n public get height(): number {\r\n return (<{ width: number; height: number }>this._size).height || <number>this._size;\r\n }\r\n\r\n /**\r\n * Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)\r\n */\r\n public get layers(): number {\r\n return (<{ width: number; height: number; depth?: number; layers?: number }>this._size).layers || 0;\r\n }\r\n\r\n /**\r\n * Gets the depth of the render target wrapper (only used if is3D is true and wrapper is not a multi render target)\r\n */\r\n public get depth(): number {\r\n return (<{ width: number; height: number; depth?: number; layers?: number }>this._size).depth || 0;\r\n }\r\n\r\n /**\r\n * Gets the render texture. If this is a multi render target, gets the first texture\r\n */\r\n public get texture(): Nullable<InternalTexture> {\r\n return this._textures?.[0] ?? null;\r\n }\r\n\r\n /**\r\n * Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)\r\n */\r\n public get textures(): Nullable<InternalTexture[]> {\r\n return this._textures;\r\n }\r\n\r\n /**\r\n * Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\r\n */\r\n public get faceIndices(): Nullable<number[]> {\r\n return this._faceIndices;\r\n }\r\n\r\n /**\r\n * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\r\n */\r\n public get layerIndices(): Nullable<number[]> {\r\n return this._layerIndices;\r\n }\r\n\r\n /**\r\n * Gets the sample count of the render target\r\n */\r\n public get samples(): number {\r\n return this._samples;\r\n }\r\n\r\n /**\r\n * Sets the sample count of the render target\r\n * @param value sample count\r\n * @param initializeBuffers If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).\r\n * @param force true to force calling the update sample count engine function even if the current sample count is equal to value\r\n * @returns the sample count that has been set\r\n */\r\n public setSamples(value: number, initializeBuffers = true, force = false): number {\r\n if (this.samples === value && !force) {\r\n return value;\r\n }\r\n\r\n const result = this._isMulti\r\n ? this._engine.updateMultipleRenderTargetTextureSampleCount(this, value, initializeBuffers)\r\n : this._engine.updateRenderTargetTextureSampleCount(this, value);\r\n this._samples = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes the render target wrapper\r\n * @param isMulti true if the wrapper is a multi render target\r\n * @param isCube true if the wrapper should render to a cube texture\r\n * @param size size of the render target (width/height/layers)\r\n * @param engine engine used to create the render target\r\n * @param label defines the label to use for the wrapper (for debugging purpose only)\r\n */\r\n constructor(isMulti: boolean, isCube: boolean, size: TextureSize, engine: AbstractEngine, label?: string) {\r\n this._isMulti = isMulti;\r\n this._isCube = isCube;\r\n this._size = size;\r\n this._engine = engine;\r\n this._depthStencilTexture = null;\r\n this.label = label;\r\n }\r\n\r\n /**\r\n * Sets the render target texture(s)\r\n * @param textures texture(s) to set\r\n */\r\n public setTextures(textures: Nullable<InternalTexture> | Nullable<InternalTexture[]>): void {\r\n if (Array.isArray(textures)) {\r\n this._textures = textures;\r\n } else if (textures) {\r\n this._textures = [textures];\r\n } else {\r\n this._textures = null;\r\n }\r\n }\r\n\r\n /**\r\n * Set a texture in the textures array\r\n * @param texture The texture to set\r\n * @param index The index in the textures array to set\r\n * @param disposePrevious If this function should dispose the previous texture\r\n */\r\n public setTexture(texture: InternalTexture, index: number = 0, disposePrevious: boolean = true): void {\r\n if (!this._textures) {\r\n this._textures = [];\r\n }\r\n if (this._textures[index] === texture) {\r\n return;\r\n }\r\n\r\n if (this._textures[index] && disposePrevious) {\r\n this._textures[index].dispose();\r\n }\r\n\r\n this._textures[index] = texture;\r\n }\r\n\r\n /**\r\n * Sets the layer and face indices of every render target texture bound to each color attachment\r\n * @param layers The layers of each texture to be set\r\n * @param faces The faces of each texture to be set\r\n */\r\n public setLayerAndFaceIndices(layers: number[], faces: number[]) {\r\n this._layerIndices = layers;\r\n this._faceIndices = faces;\r\n }\r\n\r\n /**\r\n * Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment\r\n * @param index The index of the texture in the textures array to modify\r\n * @param layer The layer of the texture to be set\r\n * @param face The face of the texture to be set\r\n */\r\n public setLayerAndFaceIndex(index: number = 0, layer?: number, face?: number): void {\r\n if (!this._layerIndices) {\r\n this._layerIndices = [];\r\n }\r\n if (!this._faceIndices) {\r\n this._faceIndices = [];\r\n }\r\n\r\n if (layer !== undefined && layer >= 0) {\r\n this._layerIndices[index] = layer;\r\n }\r\n if (face !== undefined && face >= 0) {\r\n this._faceIndices[index] = face;\r\n }\r\n }\r\n\r\n /**\r\n * Creates the depth/stencil texture\r\n * @param comparisonFunction Comparison function to use for the texture\r\n * @param bilinearFiltering true if bilinear filtering should be used when sampling the texture\r\n * @param generateStencil Not used anymore. \"format\" will be used to determine if stencil should be created\r\n * @param samples sample count to use when creating the texture (default: 1)\r\n * @param format format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH32_FLOAT)\r\n * @param label defines the label to use for the texture (for debugging purpose only)\r\n * @returns the depth/stencil created texture\r\n */\r\n public createDepthStencilTexture(\r\n comparisonFunction: number = 0,\r\n bilinearFiltering: boolean = true,\r\n generateStencil: boolean = false,\r\n samples: number = 1,\r\n format: number = Constants.TEXTUREFORMAT_DEPTH32_FLOAT,\r\n label?: string\r\n ): InternalTexture {\r\n this._depthStencilTexture?.dispose();\r\n\r\n this._depthStencilTextureWithStencil = generateStencil;\r\n this._depthStencilTextureLabel = label;\r\n this._depthStencilTexture = this._engine.createDepthStencilTexture(\r\n this._size,\r\n {\r\n bilinearFiltering,\r\n comparisonFunction,\r\n generateStencil,\r\n isCube: this._isCube,\r\n samples,\r\n depthTextureFormat: format,\r\n label,\r\n },\r\n this\r\n );\r\n\r\n return this._depthStencilTexture;\r\n }\r\n\r\n /**\r\n * @deprecated Use shareDepth instead\r\n * @param renderTarget Destination renderTarget\r\n */\r\n public _shareDepth(renderTarget: RenderTargetWrapper): void {\r\n this.shareDepth(renderTarget);\r\n }\r\n\r\n /**\r\n * Shares the depth buffer of this render target with another render target.\r\n * @param renderTarget Destination renderTarget\r\n */\r\n public shareDepth(renderTarget: RenderTargetWrapper): void {\r\n if (this._depthStencilTexture) {\r\n if (renderTarget._depthStencilTexture) {\r\n renderTarget._depthStencilTexture.dispose();\r\n }\r\n\r\n renderTarget._depthStencilTexture = this._depthStencilTexture;\r\n renderTarget._depthStencilTextureWithStencil = this._depthStencilTextureWithStencil;\r\n this._depthStencilTexture.incrementReferences();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _swapAndDie(target: InternalTexture): void {\r\n if (this.texture) {\r\n this.texture._swapAndDie(target);\r\n }\r\n this._textures = null;\r\n this.dispose(true);\r\n }\r\n\r\n protected _cloneRenderTargetWrapper(): Nullable<RenderTargetWrapper> {\r\n let rtw: Nullable<RenderTargetWrapper> = null;\r\n\r\n if (this._isMulti) {\r\n const textureArray = this.textures;\r\n if (textureArray && textureArray.length > 0) {\r\n let generateDepthTexture = false;\r\n let textureCount = textureArray.length;\r\n let depthTextureFormat = -1;\r\n\r\n const lastTextureSource = textureArray[textureArray.length - 1]._source;\r\n if (lastTextureSource === InternalTextureSource.Depth || lastTextureSource === InternalTextureSource.DepthStencil) {\r\n generateDepthTexture = true;\r\n depthTextureFormat = textureArray[textureArray.length - 1].format;\r\n textureCount--;\r\n }\r\n\r\n const samplingModes: number[] = [];\r\n const types: number[] = [];\r\n const formats: number[] = [];\r\n const targetTypes: number[] = [];\r\n const faceIndex: number[] = [];\r\n const layerIndex: number[] = [];\r\n const layerCounts: number[] = [];\r\n const internalTexture2Index: { [id: number]: number } = {};\r\n\r\n for (let i = 0; i < textureCount; ++i) {\r\n const texture = textureArray[i];\r\n\r\n samplingModes.push(texture.samplingMode);\r\n types.push(texture.type);\r\n formats.push(texture.format);\r\n\r\n const index = internalTexture2Index[texture.uniqueId];\r\n if (index !== undefined) {\r\n targetTypes.push(-1);\r\n layerCounts.push(0);\r\n } else {\r\n internalTexture2Index[texture.uniqueId] = i;\r\n if (texture.is2DArray) {\r\n targetTypes.push(Constants.TEXTURE_2D_ARRAY);\r\n layerCounts.push(texture.depth);\r\n } else if (texture.isCube) {\r\n targetTypes.push(Constants.TEXTURE_CUBE_MAP);\r\n layerCounts.push(0);\r\n } /*else if (texture.isCubeArray) {\r\n targetTypes.push(Constants.TEXTURE_CUBE_MAP_ARRAY);\r\n layerCounts.push(texture.depth);\r\n }*/ else if (texture.is3D) {\r\n targetTypes.push(Constants.TEXTURE_3D);\r\n layerCounts.push(texture.depth);\r\n } else {\r\n targetTypes.push(Constants.TEXTURE_2D);\r\n layerCounts.push(0);\r\n }\r\n }\r\n\r\n if (this._faceIndices) {\r\n faceIndex.push(this._faceIndices[i] ?? 0);\r\n }\r\n if (this._layerIndices) {\r\n layerIndex.push(this._layerIndices[i] ?? 0);\r\n }\r\n }\r\n\r\n const optionsMRT: IMultiRenderTargetOptions = {\r\n samplingModes,\r\n generateMipMaps: textureArray[0].generateMipMaps,\r\n generateDepthBuffer: this._generateDepthBuffer,\r\n generateStencilBuffer: this._generateStencilBuffer,\r\n generateDepthTexture,\r\n depthTextureFormat,\r\n types,\r\n formats,\r\n textureCount,\r\n targetTypes,\r\n faceIndex,\r\n layerIndex,\r\n layerCounts,\r\n label: this.label,\r\n };\r\n const size = {\r\n width: this.width,\r\n height: this.height,\r\n depth: this.depth,\r\n };\r\n\r\n rtw = this._engine.createMultipleRenderTarget(size, optionsMRT);\r\n\r\n for (let i = 0; i < textureCount; ++i) {\r\n if (targetTypes[i] !== -1) {\r\n continue;\r\n }\r\n const index = internalTexture2Index[textureArray[i].uniqueId];\r\n rtw.setTexture(rtw.textures![index], i);\r\n }\r\n }\r\n } else {\r\n const options: RenderTargetCreationOptions = {};\r\n\r\n options.generateDepthBuffer = this._generateDepthBuffer;\r\n options.generateMipMaps = this.texture?.generateMipMaps ?? false;\r\n options.generateStencilBuffer = this._generateStencilBuffer;\r\n options.samplingMode = this.texture?.samplingMode;\r\n options.type = this.texture?.type;\r\n options.format = this.texture?.format;\r\n options.noColorAttachment = !this._textures;\r\n options.label = this.label;\r\n\r\n if (this.isCube) {\r\n rtw = this._engine.createRenderTargetCubeTexture(this.width, options);\r\n } else {\r\n const size = {\r\n width: this.width,\r\n height: this.height,\r\n layers: this.is2DArray || this.is3D ? this.texture?.depth : undefined,\r\n };\r\n\r\n rtw = this._engine.createRenderTargetTexture(size, options);\r\n }\r\n if (rtw.texture) {\r\n rtw.texture!.isReady = true;\r\n }\r\n }\r\n\r\n return rtw;\r\n }\r\n\r\n protected _swapRenderTargetWrapper(target: RenderTargetWrapper): void {\r\n if (this._textures && target._textures) {\r\n for (let i = 0; i < this._textures.length; ++i) {\r\n this._textures[i]._swapAndDie(target._textures[i], false);\r\n target._textures[i].isReady = true;\r\n }\r\n }\r\n if (this._depthStencilTexture && target._depthStencilTexture) {\r\n this._depthStencilTexture._swapAndDie(target._depthStencilTexture);\r\n target._depthStencilTexture.isReady = true;\r\n }\r\n\r\n this._textures = null;\r\n this._depthStencilTexture = null;\r\n }\r\n\r\n /** @internal */\r\n public _rebuild(): void {\r\n const rtw = this._cloneRenderTargetWrapper();\r\n if (!rtw) {\r\n return;\r\n }\r\n\r\n if (this._depthStencilTexture) {\r\n const samplingMode = this._depthStencilTexture.samplingMode;\r\n const format = this._depthStencilTexture.format;\r\n const bilinear =\r\n samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE ||\r\n samplingMode === Constants.TEXTURE_TRILINEAR_SAMPLINGMODE ||\r\n samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST;\r\n\r\n rtw.createDepthStencilTexture(\r\n this._depthStencilTexture._comparisonFunction,\r\n bilinear,\r\n this._depthStencilTextureWithStencil,\r\n this._depthStencilTexture.samples,\r\n format,\r\n this._depthStencilTextureLabel\r\n );\r\n }\r\n\r\n if (this.samples > 1) {\r\n rtw.setSamples(this.samples);\r\n }\r\n\r\n rtw._swapRenderTargetWrapper(this);\r\n rtw.dispose();\r\n }\r\n\r\n /**\r\n * Releases the internal render textures\r\n */\r\n public releaseTextures(): void {\r\n if (this._textures) {\r\n for (let i = 0; i < this._textures?.length ?? 0; ++i) {\r\n this._textures[i].dispose();\r\n }\r\n }\r\n this._textures = null;\r\n }\r\n\r\n /**\r\n * Disposes the whole render target wrapper\r\n * @param disposeOnlyFramebuffers true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released\r\n */\r\n public dispose(disposeOnlyFramebuffers = false): void {\r\n if (!disposeOnlyFramebuffers) {\r\n this._depthStencilTexture?.dispose();\r\n this._depthStencilTexture = null;\r\n this.releaseTextures();\r\n }\r\n\r\n this._engine._releaseRenderTargetWrapper(this);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"renderTargetWrapper.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/renderTargetWrapper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAcxC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IA6B5B;;OAEG;IACH,IAAW,mBAAmB;QAC1B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,8BAA8B;QACrC,OAAO,IAAI,CAAC,+BAA+B,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAA2C,IAAI,CAAC,KAAM,CAAC,KAAK,IAAY,IAAI,CAAC,KAAK,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAA2C,IAAI,CAAC,KAAM,CAAC,MAAM,IAAY,IAAI,CAAC,KAAK,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAA4E,IAAI,CAAC,KAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IACxG,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAA4E,IAAI,CAAC,KAAM,CAAC,KAAK,IAAI,CAAC,CAAC;IACvG,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,SAAS,E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AG,IAAI,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE;gBAClD,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aAC/B;SACJ;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,uBAAuB,GAAG,KAAK;QAC1C,IAAI,CAAC,uBAAuB,EAAE;YAC1B,IAAI,CAAC,oBAAoB,EAAE,OAAO,EAAE,CAAC;YACrC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;YACjC,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B;QAED,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;CACJ","sourcesContent":["import type { InternalTexture } from \"../Materials/Textures/internalTexture\";\r\nimport { InternalTextureSource } from \"../Materials/Textures/internalTexture\";\r\nimport type { RenderTargetCreationOptions, TextureSize } from \"../Materials/Textures/textureCreationOptions\";\r\nimport type { Nullable } from \"../types\";\r\nimport { Constants } from \"./constants\";\r\nimport type { AbstractEngine } from \"./abstractEngine\";\r\nimport type { IMultiRenderTargetOptions } from \"../Materials/Textures/multiRenderTarget\";\r\n\r\n/**\r\n * An interface enforcing the renderTarget accessor to used by render target textures.\r\n */\r\nexport interface IRenderTargetTexture {\r\n /**\r\n * Entry point to access the wrapper on a texture.\r\n */\r\n renderTarget: Nullable<RenderTargetWrapper>;\r\n}\r\n\r\n/**\r\n * Wrapper around a render target (either single or multi textures)\r\n */\r\nexport class RenderTargetWrapper {\r\n protected _engine: AbstractEngine;\r\n private _size: TextureSize;\r\n private _isCube: boolean;\r\n private _isMulti: boolean;\r\n private _textures: Nullable<InternalTexture[]> = null;\r\n private _faceIndices: Nullable<number[]> = null;\r\n private _layerIndices: Nullable<number[]> = null;\r\n private _depthStencilTextureLabel?: string;\r\n /** @internal */\r\n public _samples = 1;\r\n\r\n /** @internal */\r\n public _attachments: Nullable<number[]> = null;\r\n /** @internal */\r\n public _generateStencilBuffer: boolean = false;\r\n /** @internal */\r\n public _generateDepthBuffer: boolean = false;\r\n\r\n /** @internal */\r\n public _depthStencilTexture: Nullable<InternalTexture>;\r\n /** @internal */\r\n public _depthStencilTextureWithStencil: boolean = false;\r\n\r\n /**\r\n * Gets or sets the label of the render target wrapper (optional, for debugging purpose)\r\n */\r\n public label?: string;\r\n\r\n /**\r\n * Gets the depth/stencil texture (if created by a createDepthStencilTexture() call)\r\n */\r\n public get depthStencilTexture() {\r\n return this._depthStencilTexture;\r\n }\r\n\r\n /**\r\n * Indicates if the depth/stencil texture has a stencil aspect\r\n */\r\n public get depthStencilTextureWithStencil() {\r\n return this._depthStencilTextureWithStencil;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a cube texture or if false a 2d texture\r\n */\r\n public get isCube(): boolean {\r\n return this._isCube;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a single or multi target render wrapper\r\n */\r\n public get isMulti(): boolean {\r\n return this._isMulti;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a single or an array of textures\r\n */\r\n public get is2DArray(): boolean {\r\n return this.layers > 0;\r\n }\r\n\r\n /**\r\n * Defines if the render target wrapper is for a 3D texture\r\n */\r\n public get is3D(): boolean {\r\n return this.depth > 0;\r\n }\r\n\r\n /**\r\n * Gets the size of the render target wrapper (used for cubes, as width=height in this case)\r\n */\r\n public get size(): number {\r\n return this.width;\r\n }\r\n\r\n /**\r\n * Gets the width of the render target wrapper\r\n */\r\n public get width(): number {\r\n return (<{ width: number; height: number }>this._size).width || <number>this._size;\r\n }\r\n\r\n /**\r\n * Gets the height of the render target wrapper\r\n */\r\n public get height(): number {\r\n return (<{ width: number; height: number }>this._size).height || <number>this._size;\r\n }\r\n\r\n /**\r\n * Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)\r\n */\r\n public get layers(): number {\r\n return (<{ width: number; height: number; depth?: number; layers?: number }>this._size).layers || 0;\r\n }\r\n\r\n /**\r\n * Gets the depth of the render target wrapper (only used if is3D is true and wrapper is not a multi render target)\r\n */\r\n public get depth(): number {\r\n return (<{ width: number; height: number; depth?: number; layers?: number }>this._size).depth || 0;\r\n }\r\n\r\n /**\r\n * Gets the render texture. If this is a multi render target, gets the first texture\r\n */\r\n public get texture(): Nullable<InternalTexture> {\r\n return this._textures?.[0] ?? null;\r\n }\r\n\r\n /**\r\n * Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)\r\n */\r\n public get textures(): Nullable<InternalTexture[]> {\r\n return this._textures;\r\n }\r\n\r\n /**\r\n * Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\r\n */\r\n public get faceIndices(): Nullable<number[]> {\r\n return this._faceIndices;\r\n }\r\n\r\n /**\r\n * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\r\n */\r\n public get layerIndices(): Nullable<number[]> {\r\n return this._layerIndices;\r\n }\r\n\r\n /**\r\n * Gets the base array layer of a texture in the textures array\r\n * This is an number that is calculated based on the layer and face indices set for this texture at that index\r\n * @param index The index of the texture in the textures array to get the base array layer for\r\n * @returns the base array layer of the texture at the given index\r\n */\r\n public getBaseArrayLayer(index: number): number {\r\n if (!this._textures) {\r\n return -1;\r\n }\r\n\r\n const texture = this._textures[index];\r\n const layerIndex = this._layerIndices?.[index] ?? 0;\r\n const faceIndex = this._faceIndices?.[index] ?? 0;\r\n\r\n return texture.isCube ? layerIndex * 6 + faceIndex : texture.is3D ? 0 : layerIndex;\r\n }\r\n\r\n /**\r\n * Gets the sample count of the render target\r\n */\r\n public get samples(): number {\r\n return this._samples;\r\n }\r\n\r\n /**\r\n * Sets the sample count of the render target\r\n * @param value sample count\r\n * @param initializeBuffers If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).\r\n * @param force true to force calling the update sample count engine function even if the current sample count is equal to value\r\n * @returns the sample count that has been set\r\n */\r\n public setSamples(value: number, initializeBuffers = true, force = false): number {\r\n if (this.samples === value && !force) {\r\n return value;\r\n }\r\n\r\n const result = this._isMulti\r\n ? this._engine.updateMultipleRenderTargetTextureSampleCount(this, value, initializeBuffers)\r\n : this._engine.updateRenderTargetTextureSampleCount(this, value);\r\n this._samples = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes the render target wrapper\r\n * @param isMulti true if the wrapper is a multi render target\r\n * @param isCube true if the wrapper should render to a cube texture\r\n * @param size size of the render target (width/height/layers)\r\n * @param engine engine used to create the render target\r\n * @param label defines the label to use for the wrapper (for debugging purpose only)\r\n */\r\n constructor(isMulti: boolean, isCube: boolean, size: TextureSize, engine: AbstractEngine, label?: string) {\r\n this._isMulti = isMulti;\r\n this._isCube = isCube;\r\n this._size = size;\r\n this._engine = engine;\r\n this._depthStencilTexture = null;\r\n this.label = label;\r\n }\r\n\r\n /**\r\n * Sets the render target texture(s)\r\n * @param textures texture(s) to set\r\n */\r\n public setTextures(textures: Nullable<InternalTexture> | Nullable<InternalTexture[]>): void {\r\n if (Array.isArray(textures)) {\r\n this._textures = textures;\r\n } else if (textures) {\r\n this._textures = [textures];\r\n } else {\r\n this._textures = null;\r\n }\r\n }\r\n\r\n /**\r\n * Set a texture in the textures array\r\n * @param texture The texture to set\r\n * @param index The index in the textures array to set\r\n * @param disposePrevious If this function should dispose the previous texture\r\n */\r\n public setTexture(texture: InternalTexture, index: number = 0, disposePrevious: boolean = true): void {\r\n if (!this._textures) {\r\n this._textures = [];\r\n }\r\n if (this._textures[index] === texture) {\r\n return;\r\n }\r\n\r\n if (this._textures[index] && disposePrevious) {\r\n this._textures[index].dispose();\r\n }\r\n\r\n this._textures[index] = texture;\r\n }\r\n\r\n /**\r\n * Sets the layer and face indices of every render target texture bound to each color attachment\r\n * @param layers The layers of each texture to be set\r\n * @param faces The faces of each texture to be set\r\n */\r\n public setLayerAndFaceIndices(layers: number[], faces: number[]) {\r\n this._layerIndices = layers;\r\n this._faceIndices = faces;\r\n }\r\n\r\n /**\r\n * Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment\r\n * @param index The index of the texture in the textures array to modify\r\n * @param layer The layer of the texture to be set\r\n * @param face The face of the texture to be set\r\n */\r\n public setLayerAndFaceIndex(index: number = 0, layer?: number, face?: number): void {\r\n if (!this._layerIndices) {\r\n this._layerIndices = [];\r\n }\r\n if (!this._faceIndices) {\r\n this._faceIndices = [];\r\n }\r\n\r\n if (layer !== undefined && layer >= 0) {\r\n this._layerIndices[index] = layer;\r\n }\r\n if (face !== undefined && face >= 0) {\r\n this._faceIndices[index] = face;\r\n }\r\n }\r\n\r\n /**\r\n * Creates the depth/stencil texture\r\n * @param comparisonFunction Comparison function to use for the texture\r\n * @param bilinearFiltering true if bilinear filtering should be used when sampling the texture\r\n * @param generateStencil Not used anymore. \"format\" will be used to determine if stencil should be created\r\n * @param samples sample count to use when creating the texture (default: 1)\r\n * @param format format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH32_FLOAT)\r\n * @param label defines the label to use for the texture (for debugging purpose only)\r\n * @returns the depth/stencil created texture\r\n */\r\n public createDepthStencilTexture(\r\n comparisonFunction: number = 0,\r\n bilinearFiltering: boolean = true,\r\n generateStencil: boolean = false,\r\n samples: number = 1,\r\n format: number = Constants.TEXTUREFORMAT_DEPTH32_FLOAT,\r\n label?: string\r\n ): InternalTexture {\r\n this._depthStencilTexture?.dispose();\r\n\r\n this._depthStencilTextureWithStencil = generateStencil;\r\n this._depthStencilTextureLabel = label;\r\n this._depthStencilTexture = this._engine.createDepthStencilTexture(\r\n this._size,\r\n {\r\n bilinearFiltering,\r\n comparisonFunction,\r\n generateStencil,\r\n isCube: this._isCube,\r\n samples,\r\n depthTextureFormat: format,\r\n label,\r\n },\r\n this\r\n );\r\n\r\n return this._depthStencilTexture;\r\n }\r\n\r\n /**\r\n * @deprecated Use shareDepth instead\r\n * @param renderTarget Destination renderTarget\r\n */\r\n public _shareDepth(renderTarget: RenderTargetWrapper): void {\r\n this.shareDepth(renderTarget);\r\n }\r\n\r\n /**\r\n * Shares the depth buffer of this render target with another render target.\r\n * @param renderTarget Destination renderTarget\r\n */\r\n public shareDepth(renderTarget: RenderTargetWrapper): void {\r\n if (this._depthStencilTexture) {\r\n if (renderTarget._depthStencilTexture) {\r\n renderTarget._depthStencilTexture.dispose();\r\n }\r\n\r\n renderTarget._depthStencilTexture = this._depthStencilTexture;\r\n renderTarget._depthStencilTextureWithStencil = this._depthStencilTextureWithStencil;\r\n this._depthStencilTexture.incrementReferences();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _swapAndDie(target: InternalTexture): void {\r\n if (this.texture) {\r\n this.texture._swapAndDie(target);\r\n }\r\n this._textures = null;\r\n this.dispose(true);\r\n }\r\n\r\n protected _cloneRenderTargetWrapper(): Nullable<RenderTargetWrapper> {\r\n let rtw: Nullable<RenderTargetWrapper> = null;\r\n\r\n if (this._isMulti) {\r\n const textureArray = this.textures;\r\n if (textureArray && textureArray.length > 0) {\r\n let generateDepthTexture = false;\r\n let textureCount = textureArray.length;\r\n let depthTextureFormat = -1;\r\n\r\n const lastTextureSource = textureArray[textureArray.length - 1]._source;\r\n if (lastTextureSource === InternalTextureSource.Depth || lastTextureSource === InternalTextureSource.DepthStencil) {\r\n generateDepthTexture = true;\r\n depthTextureFormat = textureArray[textureArray.length - 1].format;\r\n textureCount--;\r\n }\r\n\r\n const samplingModes: number[] = [];\r\n const types: number[] = [];\r\n const formats: number[] = [];\r\n const targetTypes: number[] = [];\r\n const faceIndex: number[] = [];\r\n const layerIndex: number[] = [];\r\n const layerCounts: number[] = [];\r\n const internalTexture2Index: { [id: number]: number } = {};\r\n\r\n for (let i = 0; i < textureCount; ++i) {\r\n const texture = textureArray[i];\r\n\r\n samplingModes.push(texture.samplingMode);\r\n types.push(texture.type);\r\n formats.push(texture.format);\r\n\r\n const index = internalTexture2Index[texture.uniqueId];\r\n if (index !== undefined) {\r\n targetTypes.push(-1);\r\n layerCounts.push(0);\r\n } else {\r\n internalTexture2Index[texture.uniqueId] = i;\r\n if (texture.is2DArray) {\r\n targetTypes.push(Constants.TEXTURE_2D_ARRAY);\r\n layerCounts.push(texture.depth);\r\n } else if (texture.isCube) {\r\n targetTypes.push(Constants.TEXTURE_CUBE_MAP);\r\n layerCounts.push(0);\r\n } /*else if (texture.isCubeArray) {\r\n targetTypes.push(Constants.TEXTURE_CUBE_MAP_ARRAY);\r\n layerCounts.push(texture.depth);\r\n }*/ else if (texture.is3D) {\r\n targetTypes.push(Constants.TEXTURE_3D);\r\n layerCounts.push(texture.depth);\r\n } else {\r\n targetTypes.push(Constants.TEXTURE_2D);\r\n layerCounts.push(0);\r\n }\r\n }\r\n\r\n if (this._faceIndices) {\r\n faceIndex.push(this._faceIndices[i] ?? 0);\r\n }\r\n if (this._layerIndices) {\r\n layerIndex.push(this._layerIndices[i] ?? 0);\r\n }\r\n }\r\n\r\n const optionsMRT: IMultiRenderTargetOptions = {\r\n samplingModes,\r\n generateMipMaps: textureArray[0].generateMipMaps,\r\n generateDepthBuffer: this._generateDepthBuffer,\r\n generateStencilBuffer: this._generateStencilBuffer,\r\n generateDepthTexture,\r\n depthTextureFormat,\r\n types,\r\n formats,\r\n textureCount,\r\n targetTypes,\r\n faceIndex,\r\n layerIndex,\r\n layerCounts,\r\n label: this.label,\r\n };\r\n const size = {\r\n width: this.width,\r\n height: this.height,\r\n depth: this.depth,\r\n };\r\n\r\n rtw = this._engine.createMultipleRenderTarget(size, optionsMRT);\r\n\r\n for (let i = 0; i < textureCount; ++i) {\r\n if (targetTypes[i] !== -1) {\r\n continue;\r\n }\r\n const index = internalTexture2Index[textureArray[i].uniqueId];\r\n rtw.setTexture(rtw.textures![index], i);\r\n }\r\n }\r\n } else {\r\n const options: RenderTargetCreationOptions = {};\r\n\r\n options.generateDepthBuffer = this._generateDepthBuffer;\r\n options.generateMipMaps = this.texture?.generateMipMaps ?? false;\r\n options.generateStencilBuffer = this._generateStencilBuffer;\r\n options.samplingMode = this.texture?.samplingMode;\r\n options.type = this.texture?.type;\r\n options.format = this.texture?.format;\r\n options.noColorAttachment = !this._textures;\r\n options.label = this.label;\r\n\r\n if (this.isCube) {\r\n rtw = this._engine.createRenderTargetCubeTexture(this.width, options);\r\n } else {\r\n const size = {\r\n width: this.width,\r\n height: this.height,\r\n layers: this.is2DArray || this.is3D ? this.texture?.depth : undefined,\r\n };\r\n\r\n rtw = this._engine.createRenderTargetTexture(size, options);\r\n }\r\n if (rtw.texture) {\r\n rtw.texture!.isReady = true;\r\n }\r\n }\r\n\r\n return rtw;\r\n }\r\n\r\n protected _swapRenderTargetWrapper(target: RenderTargetWrapper): void {\r\n if (this._textures && target._textures) {\r\n for (let i = 0; i < this._textures.length; ++i) {\r\n this._textures[i]._swapAndDie(target._textures[i], false);\r\n target._textures[i].isReady = true;\r\n }\r\n }\r\n if (this._depthStencilTexture && target._depthStencilTexture) {\r\n this._depthStencilTexture._swapAndDie(target._depthStencilTexture);\r\n target._depthStencilTexture.isReady = true;\r\n }\r\n\r\n this._textures = null;\r\n this._depthStencilTexture = null;\r\n }\r\n\r\n /** @internal */\r\n public _rebuild(): void {\r\n const rtw = this._cloneRenderTargetWrapper();\r\n if (!rtw) {\r\n return;\r\n }\r\n\r\n if (this._depthStencilTexture) {\r\n const samplingMode = this._depthStencilTexture.samplingMode;\r\n const format = this._depthStencilTexture.format;\r\n const bilinear =\r\n samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE ||\r\n samplingMode === Constants.TEXTURE_TRILINEAR_SAMPLINGMODE ||\r\n samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST;\r\n\r\n rtw.createDepthStencilTexture(\r\n this._depthStencilTexture._comparisonFunction,\r\n bilinear,\r\n this._depthStencilTextureWithStencil,\r\n this._depthStencilTexture.samples,\r\n format,\r\n this._depthStencilTextureLabel\r\n );\r\n }\r\n\r\n if (this.samples > 1) {\r\n rtw.setSamples(this.samples);\r\n }\r\n\r\n rtw._swapRenderTargetWrapper(this);\r\n rtw.dispose();\r\n }\r\n\r\n /**\r\n * Releases the internal render textures\r\n */\r\n public releaseTextures(): void {\r\n if (this._textures) {\r\n for (let i = 0; i < this._textures?.length ?? 0; ++i) {\r\n this._textures[i].dispose();\r\n }\r\n }\r\n this._textures = null;\r\n }\r\n\r\n /**\r\n * Disposes the whole render target wrapper\r\n * @param disposeOnlyFramebuffers true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released\r\n */\r\n public dispose(disposeOnlyFramebuffers = false): void {\r\n if (!disposeOnlyFramebuffers) {\r\n this._depthStencilTexture?.dispose();\r\n this._depthStencilTexture = null;\r\n this.releaseTextures();\r\n }\r\n\r\n this._engine._releaseRenderTargetWrapper(this);\r\n }\r\n}\r\n"]}
@@ -210,7 +210,9 @@ export declare class WebGPUEngine extends ThinWebGPUEngine {
210
210
  private _mainRenderPassWrapper;
211
211
  private _rttRenderPassWrapper;
212
212
  /** @internal */
213
- _pendingDebugCommands: Array<[string, Nullable<string>]>;
213
+ _pendingDebugCommands: Array<[string, Nullable<string>, number?]>;
214
+ /** @internal */
215
+ _debugStackRenderPass: string[];
214
216
  private _defaultDrawContext;
215
217
  private _defaultMaterialContext;
216
218
  /** @internal */
@@ -312,6 +312,8 @@ export class WebGPUEngine extends ThinWebGPUEngine {
312
312
  };
313
313
  /** @internal */
314
314
  this._pendingDebugCommands = [];
315
+ /** @internal */
316
+ this._debugStackRenderPass = [];
315
317
  this._currentOverrideVertexBuffers = null;
316
318
  this._currentIndexBuffer = null;
317
319
  this._colorWriteLocal = true;
@@ -2318,7 +2320,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
2318
2320
  const depthStencilTexture = rtWrapper._depthStencilTexture;
2319
2321
  const gpuDepthStencilWrapper = depthStencilTexture?._hardwareTexture;
2320
2322
  const gpuDepthStencilTexture = gpuDepthStencilWrapper?.underlyingResource;
2321
- const gpuDepthStencilMSAATexture = gpuDepthStencilWrapper?.getMSAATexture();
2323
+ const gpuDepthStencilMSAATexture = gpuDepthStencilWrapper?.getMSAATexture(0);
2322
2324
  const depthTextureView = gpuDepthStencilTexture?.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
2323
2325
  const depthMSAATextureView = gpuDepthStencilMSAATexture?.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
2324
2326
  const depthTextureHasStencil = gpuDepthStencilWrapper ? WebGPUTextureHelper.HasStencilAspect(gpuDepthStencilWrapper.format) : false;
@@ -2347,14 +2349,13 @@ export class WebGPUEngine extends ThinWebGPUEngine {
2347
2349
  const gpuMRTWrapper = mrtTexture?._hardwareTexture;
2348
2350
  const gpuMRTTexture = gpuMRTWrapper?.underlyingResource;
2349
2351
  if (gpuMRTWrapper && gpuMRTTexture) {
2350
- const gpuMSAATexture = gpuMRTWrapper.getMSAATexture(i);
2351
- const layerIndex = rtWrapper.layerIndices?.[i] ?? 0;
2352
- const faceIndex = rtWrapper.faceIndices?.[i] ?? 0;
2352
+ const baseArrayLayer = rtWrapper.getBaseArrayLayer(i);
2353
+ const gpuMSAATexture = gpuMRTWrapper.getMSAATexture(baseArrayLayer);
2353
2354
  const viewDescriptor = {
2354
2355
  ...this._rttRenderPassWrapper.colorAttachmentViewDescriptor,
2355
2356
  dimension: mrtTexture.is3D ? "3d" /* WebGPUConstants.TextureViewDimension.E3d */ : "2d" /* WebGPUConstants.TextureViewDimension.E2d */,
2356
2357
  format: gpuMRTWrapper.format,
2357
- baseArrayLayer: mrtTexture.isCube ? layerIndex * 6 + faceIndex : mrtTexture.is3D ? 0 : layerIndex,
2358
+ baseArrayLayer,
2358
2359
  };
2359
2360
  const msaaViewDescriptor = {
2360
2361
  ...this._rttRenderPassWrapper.colorAttachmentViewDescriptor,
@@ -2368,7 +2369,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
2368
2369
  colorAttachments.push({
2369
2370
  view: colorMSAATextureView ? colorMSAATextureView : colorTextureView,
2370
2371
  resolveTarget: gpuMSAATexture ? colorTextureView : undefined,
2371
- depthSlice: mrtTexture.is3D ? layerIndex : undefined,
2372
+ depthSlice: mrtTexture.is3D ? (rtWrapper.layerIndices?.[i] ?? 0) : undefined,
2372
2373
  clearValue: index !== 0 && mustClearColor ? (isRTInteger ? clearColorForIntegerRT : clearColor) : undefined,
2373
2374
  loadOp: index !== 0 && mustClearColor ? "clear" /* WebGPUConstants.LoadOp.Clear */ : "load" /* WebGPUConstants.LoadOp.Load */,
2374
2375
  storeOp: "store" /* WebGPUConstants.StoreOp.Store */,
@@ -2389,7 +2390,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
2389
2390
  depthSlice = this._rttRenderPassWrapper.colorAttachmentViewDescriptor.baseArrayLayer;
2390
2391
  this._rttRenderPassWrapper.colorAttachmentViewDescriptor.baseArrayLayer = 0;
2391
2392
  }
2392
- const gpuMSAATexture = gpuWrapper.getMSAATexture();
2393
+ const gpuMSAATexture = gpuWrapper.getMSAATexture(0);
2393
2394
  const colorTextureView = gpuTexture.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor);
2394
2395
  const colorMSAATextureView = gpuMSAATexture?.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor);
2395
2396
  const isRTInteger = internalTexture.type === 7 || internalTexture.type === 5;
@@ -2408,7 +2409,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
2408
2409
  }
2409
2410
  this._debugPushGroup?.("render target pass" + (renderTargetWrapper.label ? " (" + renderTargetWrapper.label + ")" : ""), 0);
2410
2411
  this._rttRenderPassWrapper.renderPassDescriptor = {
2411
- label: (renderTargetWrapper.label ?? "RTT") + "RenderPass",
2412
+ label: (renderTargetWrapper.label ?? "RTT") + " - RenderPass",
2412
2413
  colorAttachments,
2413
2414
  depthStencilAttachment: depthStencilTexture && gpuDepthStencilTexture
2414
2415
  ? {