@babylonjs/core 5.33.0 → 5.33.2

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.
@@ -788,6 +788,8 @@ export declare abstract class PBRBaseMaterial extends PushMaterial {
788
788
  bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
789
789
  /**
790
790
  * Returns the animatable textures.
791
+ * If material have animatable metallic texture, then reflectivity texture will not be returned, even if it has animations.
792
+ * The metallic reflectance, reflectance, micro surface and refraction texture will not be returned either.
791
793
  * @returns - Array of animatable textures.
792
794
  */
793
795
  getAnimatables(): IAnimatable[];
@@ -809,6 +811,8 @@ export declare abstract class PBRBaseMaterial extends PushMaterial {
809
811
  hasTexture(texture: BaseTexture): boolean;
810
812
  /**
811
813
  * Sets the required values to the prepass renderer.
814
+ * It can't be sets when subsurface scattering of this material is disabled.
815
+ * When scene have ability to enable subsurface prepass effect, it will enable.
812
816
  */
813
817
  setPrePassRenderer(): boolean;
814
818
  /**
@@ -1868,6 +1868,8 @@ export class PBRBaseMaterial extends PushMaterial {
1868
1868
  }
1869
1869
  /**
1870
1870
  * Returns the animatable textures.
1871
+ * If material have animatable metallic texture, then reflectivity texture will not be returned, even if it has animations.
1872
+ * The metallic reflectance, reflectance, micro surface and refraction texture will not be returned either.
1871
1873
  * @returns - Array of animatable textures.
1872
1874
  */
1873
1875
  getAnimatables() {
@@ -1976,6 +1978,9 @@ export class PBRBaseMaterial extends PushMaterial {
1976
1978
  if (this._reflectionTexture === texture) {
1977
1979
  return true;
1978
1980
  }
1981
+ if (this._emissiveTexture === texture) {
1982
+ return true;
1983
+ }
1979
1984
  if (this._reflectivityTexture === texture) {
1980
1985
  return true;
1981
1986
  }
@@ -2001,17 +2006,19 @@ export class PBRBaseMaterial extends PushMaterial {
2001
2006
  }
2002
2007
  /**
2003
2008
  * Sets the required values to the prepass renderer.
2009
+ * It can't be sets when subsurface scattering of this material is disabled.
2010
+ * When scene have ability to enable subsurface prepass effect, it will enable.
2004
2011
  */
2005
2012
  setPrePassRenderer() {
2006
2013
  var _a;
2007
- if ((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.isScatteringEnabled) {
2008
- const subSurfaceConfiguration = this.getScene().enableSubSurfaceForPrePass();
2009
- if (subSurfaceConfiguration) {
2010
- subSurfaceConfiguration.enabled = true;
2011
- }
2012
- return true;
2014
+ if (!((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.isScatteringEnabled)) {
2015
+ return false;
2013
2016
  }
2014
- return false;
2017
+ const subSurfaceConfiguration = this.getScene().enableSubSurfaceForPrePass();
2018
+ if (subSurfaceConfiguration) {
2019
+ subSurfaceConfiguration.enabled = true;
2020
+ }
2021
+ return true;
2015
2022
  }
2016
2023
  /**
2017
2024
  * Disposes the resources of the material.