@babylonjs/core 5.32.2 → 5.33.0

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 (86) hide show
  1. package/Bones/boneIKController.d.ts +2 -1
  2. package/Bones/boneIKController.js +27 -10
  3. package/Bones/boneIKController.js.map +1 -1
  4. package/Cameras/Inputs/freeCameraMouseInput.js +11 -3
  5. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  6. package/Culling/boundingInfo.d.ts +5 -0
  7. package/Culling/boundingInfo.js +5 -0
  8. package/Culling/boundingInfo.js.map +1 -1
  9. package/Engines/Extensions/engine.videoTexture.d.ts +2 -1
  10. package/Engines/Extensions/engine.videoTexture.js.map +1 -1
  11. package/Engines/WebGPU/Extensions/engine.videoTexture.js +21 -9
  12. package/Engines/WebGPU/Extensions/engine.videoTexture.js.map +1 -1
  13. package/Engines/WebGPU/webgpuTextureHelper.d.ts +6 -0
  14. package/Engines/WebGPU/webgpuTextureHelper.js +157 -0
  15. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  16. package/Engines/thinEngine.js +2 -2
  17. package/Engines/thinEngine.js.map +1 -1
  18. package/Layers/effectLayer.js +7 -28
  19. package/Layers/effectLayer.js.map +1 -1
  20. package/Lights/Shadows/shadowGenerator.js +9 -28
  21. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  22. package/Materials/Background/backgroundMaterial.js +4 -8
  23. package/Materials/Background/backgroundMaterial.js.map +1 -1
  24. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +9 -8
  25. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  26. package/Materials/PBR/pbrBaseMaterial.js +4 -8
  27. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  28. package/Materials/Textures/htmlElementTexture.d.ts +1 -0
  29. package/Materials/Textures/htmlElementTexture.js +3 -1
  30. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  31. package/Materials/Textures/renderTargetTexture.js +2 -2
  32. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  33. package/Materials/Textures/videoTexture.d.ts +1 -0
  34. package/Materials/Textures/videoTexture.js +5 -1
  35. package/Materials/Textures/videoTexture.js.map +1 -1
  36. package/Materials/clipPlaneMaterialHelper.d.ts +8 -0
  37. package/Materials/clipPlaneMaterialHelper.js +78 -0
  38. package/Materials/clipPlaneMaterialHelper.js.map +1 -0
  39. package/Materials/index.d.ts +1 -1
  40. package/Materials/index.js +1 -1
  41. package/Materials/index.js.map +1 -1
  42. package/Materials/material.d.ts +27 -1
  43. package/Materials/material.js.map +1 -1
  44. package/Materials/materialHelper.d.ts +3 -7
  45. package/Materials/materialHelper.js +5 -45
  46. package/Materials/materialHelper.js.map +1 -1
  47. package/Materials/shaderMaterial.js +5 -36
  48. package/Materials/shaderMaterial.js.map +1 -1
  49. package/Materials/standardMaterial.js +4 -8
  50. package/Materials/standardMaterial.js.map +1 -1
  51. package/Meshes/linesMesh.js +1 -1
  52. package/Meshes/linesMesh.js.map +1 -1
  53. package/Misc/dumpTools.d.ts +49 -0
  54. package/Misc/dumpTools.js +145 -0
  55. package/Misc/dumpTools.js.map +1 -0
  56. package/Misc/environmentTextureTools.js +2 -1
  57. package/Misc/environmentTextureTools.js.map +1 -1
  58. package/Misc/index.d.ts +1 -0
  59. package/Misc/index.js +1 -0
  60. package/Misc/index.js.map +1 -1
  61. package/Misc/screenshotTools.js +17 -13
  62. package/Misc/screenshotTools.js.map +1 -1
  63. package/Misc/tools.d.ts +2 -6
  64. package/Misc/tools.js +7 -64
  65. package/Misc/tools.js.map +1 -1
  66. package/Particles/baseParticleSystem.d.ts +31 -6
  67. package/Particles/baseParticleSystem.js.map +1 -1
  68. package/Particles/gpuParticleSystem.js +5 -37
  69. package/Particles/gpuParticleSystem.js.map +1 -1
  70. package/Particles/particleSystem.js +5 -36
  71. package/Particles/particleSystem.js.map +1 -1
  72. package/PostProcesses/postProcess.d.ts +30 -0
  73. package/PostProcesses/postProcess.js +48 -2
  74. package/PostProcesses/postProcess.js.map +1 -1
  75. package/Rendering/depthRenderer.js +10 -28
  76. package/Rendering/depthRenderer.js.map +1 -1
  77. package/Rendering/outlineRenderer.js +26 -45
  78. package/Rendering/outlineRenderer.js.map +1 -1
  79. package/Shaders/ShadersInclude/imageProcessingFunctions.js +4 -1
  80. package/Shaders/ShadersInclude/imageProcessingFunctions.js.map +1 -1
  81. package/Shaders/circleOfConfusion.fragment.js +3 -1
  82. package/Shaders/circleOfConfusion.fragment.js.map +1 -1
  83. package/package.json +1 -1
  84. package/Materials/thinMaterialHelper.d.ts +0 -17
  85. package/Materials/thinMaterialHelper.js +0 -41
  86. package/Materials/thinMaterialHelper.js.map +0 -1
@@ -18,9 +18,9 @@ import "../Shaders/particles.fragment.js";
18
18
  import "../Shaders/particles.vertex.js";
19
19
  import { Color4, Color3, TmpColors } from "../Maths/math.color.js";
20
20
  import { ThinEngine } from "../Engines/thinEngine.js";
21
- import { ThinMaterialHelper } from "../Materials/thinMaterialHelper.js";
22
21
  import { MaterialHelper } from "../Materials/materialHelper.js";
23
22
  import "../Engines/Extensions/engine.alpha.js";
23
+ import { addClipPlaneUniforms, prepareDefinesForClipPlanes, bindClipPlane } from "../Materials/clipPlaneMaterialHelper.js";
24
24
  /**
25
25
  * This represents a particle system in Babylon.
26
26
  * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.
@@ -1366,20 +1366,8 @@ export class ParticleSystem extends BaseParticleSystem {
1366
1366
  * @internal
1367
1367
  */
1368
1368
  static _GetEffectCreationOptions(isAnimationSheetEnabled = false, useLogarithmicDepth = false) {
1369
- const effectCreationOption = [
1370
- "invView",
1371
- "view",
1372
- "projection",
1373
- "vClipPlane",
1374
- "vClipPlane2",
1375
- "vClipPlane3",
1376
- "vClipPlane4",
1377
- "vClipPlane5",
1378
- "vClipPlane6",
1379
- "textureMask",
1380
- "translationPivot",
1381
- "eyePosition",
1382
- ];
1369
+ const effectCreationOption = ["invView", "view", "projection", "textureMask", "translationPivot", "eyePosition"];
1370
+ addClipPlaneUniforms(effectCreationOption);
1383
1371
  if (isAnimationSheetEnabled) {
1384
1372
  effectCreationOption.push("particlesInfos");
1385
1373
  }
@@ -1395,24 +1383,7 @@ export class ParticleSystem extends BaseParticleSystem {
1395
1383
  */
1396
1384
  fillDefines(defines, blendMode) {
1397
1385
  if (this._scene) {
1398
- if (this._scene.clipPlane) {
1399
- defines.push("#define CLIPPLANE");
1400
- }
1401
- if (this._scene.clipPlane2) {
1402
- defines.push("#define CLIPPLANE2");
1403
- }
1404
- if (this._scene.clipPlane3) {
1405
- defines.push("#define CLIPPLANE3");
1406
- }
1407
- if (this._scene.clipPlane4) {
1408
- defines.push("#define CLIPPLANE4");
1409
- }
1410
- if (this._scene.clipPlane5) {
1411
- defines.push("#define CLIPPLANE5");
1412
- }
1413
- if (this._scene.clipPlane6) {
1414
- defines.push("#define CLIPPLANE6");
1415
- }
1386
+ prepareDefinesForClipPlanes(this, this._scene, defines);
1416
1387
  }
1417
1388
  if (this._isAnimationSheetEnabled) {
1418
1389
  defines.push("#define ANIMATESHEET");
@@ -1663,9 +1634,7 @@ export class ParticleSystem extends BaseParticleSystem {
1663
1634
  }
1664
1635
  const defines = effect.defines;
1665
1636
  if (this._scene) {
1666
- if (this._scene.clipPlane || this._scene.clipPlane2 || this._scene.clipPlane3 || this._scene.clipPlane4 || this._scene.clipPlane5 || this._scene.clipPlane6) {
1667
- ThinMaterialHelper.BindClipPlane(effect, this._scene);
1668
- }
1637
+ bindClipPlane(effect, this, this._scene);
1669
1638
  }
1670
1639
  if (defines.indexOf("#define BILLBOARDMODE_ALL") >= 0) {
1671
1640
  viewMatrix.invertToRef(TmpVectors.Matrix[0]);