@babylonjs/core 5.33.1 → 5.34.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 (72) hide show
  1. package/Collisions/pickingInfo.js +18 -8
  2. package/Collisions/pickingInfo.js.map +1 -1
  3. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +4 -3
  4. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
  5. package/Engines/thinEngine.js +2 -2
  6. package/Engines/thinEngine.js.map +1 -1
  7. package/Lights/Shadows/shadowGenerator.js +1 -0
  8. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  9. package/Materials/Node/Blocks/Dual/lightBlock.d.ts +4 -0
  10. package/Materials/Node/Blocks/Dual/lightBlock.js +47 -3
  11. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  12. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +6 -0
  13. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +36 -8
  14. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  15. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.d.ts +2 -0
  16. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +22 -0
  17. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  18. package/Materials/Node/Blocks/Fragment/fragDepthBlock.d.ts +31 -0
  19. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +67 -0
  20. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -0
  21. package/Materials/Node/Blocks/Fragment/index.d.ts +2 -0
  22. package/Materials/Node/Blocks/Fragment/index.js +2 -0
  23. package/Materials/Node/Blocks/Fragment/index.js.map +1 -1
  24. package/Materials/Node/Blocks/Fragment/shadowMapBlock.d.ts +40 -0
  25. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js +111 -0
  26. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -0
  27. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +4 -0
  28. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +50 -3
  29. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  30. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +2 -0
  31. package/Materials/Node/Blocks/PBR/reflectionBlock.js +18 -1
  32. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  33. package/Materials/Node/Blocks/biPlanarBlock.d.ts +18 -0
  34. package/Materials/Node/Blocks/biPlanarBlock.js +70 -0
  35. package/Materials/Node/Blocks/biPlanarBlock.js.map +1 -0
  36. package/Materials/Node/Blocks/index.d.ts +2 -0
  37. package/Materials/Node/Blocks/index.js +2 -0
  38. package/Materials/Node/Blocks/index.js.map +1 -1
  39. package/Materials/Node/Blocks/triPlanarBlock.d.ts +116 -0
  40. package/Materials/Node/Blocks/triPlanarBlock.js +340 -0
  41. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -0
  42. package/Materials/Node/nodeMaterial.d.ts +4 -1
  43. package/Materials/Node/nodeMaterial.js +8 -0
  44. package/Materials/Node/nodeMaterial.js.map +1 -1
  45. package/Materials/Node/nodeMaterialBlock.d.ts +2 -0
  46. package/Materials/Node/nodeMaterialBlock.js +5 -0
  47. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  48. package/Materials/Node/nodeMaterialBuildState.d.ts +2 -0
  49. package/Materials/Node/nodeMaterialBuildState.js +3 -3
  50. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  51. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +2 -1
  52. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  53. package/Materials/Node/nodeMaterialDecorator.d.ts +4 -1
  54. package/Materials/Node/nodeMaterialDecorator.js.map +1 -1
  55. package/Materials/PBR/pbrBaseMaterial.d.ts +6 -0
  56. package/Materials/PBR/pbrBaseMaterial.js +22 -7
  57. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  58. package/Materials/Textures/videoTexture.js +8 -35
  59. package/Materials/Textures/videoTexture.js.map +1 -1
  60. package/Materials/materialHelper.d.ts +7 -0
  61. package/Materials/materialHelper.js +22 -1
  62. package/Materials/materialHelper.js.map +1 -1
  63. package/Materials/shadowDepthWrapper.d.ts +4 -0
  64. package/Materials/shadowDepthWrapper.js +46 -39
  65. package/Materials/shadowDepthWrapper.js.map +1 -1
  66. package/Materials/standardMaterial.d.ts +2 -0
  67. package/Materials/standardMaterial.js +2 -0
  68. package/Materials/standardMaterial.js.map +1 -1
  69. package/package.json +1 -1
  70. package/scene.d.ts +12 -8
  71. package/scene.js +32 -27
  72. package/scene.js.map +1 -1
@@ -204,6 +204,8 @@ export class PBRMaterialDefines extends MaterialDefines {
204
204
  this.POINTSIZE = false;
205
205
  this.FOG = false;
206
206
  this.LOGARITHMICDEPTH = false;
207
+ this.CAMERA_ORTHOGRAPHIC = false;
208
+ this.CAMERA_PERSPECTIVE = false;
207
209
  this.FORCENORMALFORWARD = false;
208
210
  this.SPECULARAA = false;
209
211
  this.UNLIT = false;
@@ -1868,6 +1870,8 @@ export class PBRBaseMaterial extends PushMaterial {
1868
1870
  }
1869
1871
  /**
1870
1872
  * Returns the animatable textures.
1873
+ * If material have animatable metallic texture, then reflectivity texture will not be returned, even if it has animations.
1874
+ * The metallic reflectance, reflectance, micro surface and refraction texture will not be returned either.
1871
1875
  * @returns - Array of animatable textures.
1872
1876
  */
1873
1877
  getAnimatables() {
@@ -1899,6 +1903,15 @@ export class PBRBaseMaterial extends PushMaterial {
1899
1903
  if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {
1900
1904
  results.push(this._lightmapTexture);
1901
1905
  }
1906
+ if (this._metallicReflectanceTexture && this._metallicReflectanceTexture.animations && this._metallicReflectanceTexture.animations.length > 0) {
1907
+ results.push(this._metallicReflectanceTexture);
1908
+ }
1909
+ if (this._reflectanceTexture && this._reflectanceTexture.animations && this._reflectanceTexture.animations.length > 0) {
1910
+ results.push(this._reflectanceTexture);
1911
+ }
1912
+ if (this._microSurfaceTexture && this._microSurfaceTexture.animations && this._microSurfaceTexture.animations.length > 0) {
1913
+ results.push(this._microSurfaceTexture);
1914
+ }
1902
1915
  return results;
1903
1916
  }
1904
1917
  /**
@@ -2004,17 +2017,19 @@ export class PBRBaseMaterial extends PushMaterial {
2004
2017
  }
2005
2018
  /**
2006
2019
  * Sets the required values to the prepass renderer.
2020
+ * It can't be sets when subsurface scattering of this material is disabled.
2021
+ * When scene have ability to enable subsurface prepass effect, it will enable.
2007
2022
  */
2008
2023
  setPrePassRenderer() {
2009
2024
  var _a;
2010
- if ((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.isScatteringEnabled) {
2011
- const subSurfaceConfiguration = this.getScene().enableSubSurfaceForPrePass();
2012
- if (subSurfaceConfiguration) {
2013
- subSurfaceConfiguration.enabled = true;
2014
- }
2015
- return true;
2025
+ if (!((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.isScatteringEnabled)) {
2026
+ return false;
2016
2027
  }
2017
- return false;
2028
+ const subSurfaceConfiguration = this.getScene().enableSubSurfaceForPrePass();
2029
+ if (subSurfaceConfiguration) {
2030
+ subSurfaceConfiguration.enabled = true;
2031
+ }
2032
+ return true;
2018
2033
  }
2019
2034
  /**
2020
2035
  * Disposes the resources of the material.