|
@@ -8317,7 +8317,7 @@ declare module "babylonjs/Materials/Textures/cubeTexture" {
|
|
|
* @param scene defines the scene the texture is attached to
|
|
|
* @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...
|
|
|
* @param noMipmap defines if mipmaps should be created or not
|
|
|
- * @param files defines the six files to load for the different faces
|
|
|
+ * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz
|
|
|
* @param onLoad defines a callback triggered at the end of the file load if no errors occured
|
|
|
* @param onError defines a callback triggered in case of error during load
|
|
|
* @param format defines the internal format to use for the texture once loaded
|
|
@@ -20872,9 +20872,10 @@ declare module "babylonjs/Meshes/mesh" {
|
|
|
* Update the current index buffer
|
|
|
* @param indices defines the source data
|
|
|
* @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): Mesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): Mesh;
|
|
|
/**
|
|
|
* Invert the geometry to move from a right handed system to a left handed one.
|
|
|
* @returns the current mesh
|
|
@@ -22490,8 +22491,9 @@ declare module "babylonjs/Meshes/geometry" {
|
|
|
* Update index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
|
* @param offset defines the offset in the target buffer where to store the data
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): void;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): void;
|
|
|
/**
|
|
|
* Creates a new index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
@@ -24566,9 +24568,11 @@ declare module "babylonjs/Meshes/abstractMesh" {
|
|
|
/**
|
|
|
* Updates the AbstractMesh indices array
|
|
|
* @param indices defines the data source
|
|
|
+ * @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray): AbstractMesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): AbstractMesh;
|
|
|
/**
|
|
|
* Creates new normals data for the mesh
|
|
|
* @param updatable defines if the normal vertex buffer must be flagged as updatable
|
|
@@ -38561,6 +38565,16 @@ declare module "babylonjs/Materials/materialFlags" {
|
|
|
* Are clear coat tint textures enabled in the application.
|
|
|
*/
|
|
|
static ClearCoatTintTextureEnabled: boolean;
|
|
|
+ private static _SheenTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are sheen textures enabled in the application.
|
|
|
+ */
|
|
|
+ static SheenTextureEnabled: boolean;
|
|
|
+ private static _AnisotropicTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are anisotropic textures enabled in the application.
|
|
|
+ */
|
|
|
+ static AnisotropicTextureEnabled: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Shaders/ShadersInclude/defaultFragmentDeclaration" {
|
|
@@ -44425,21 +44439,6 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
|
*/
|
|
|
getClassName(): string;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param clearCoatConfiguration define the config where to copy the info
|
|
|
- */
|
|
|
- copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
- /**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- /**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
- */
|
|
|
- parse(source: any): void;
|
|
|
- /**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
|
* @param fallbacks defines the current fallback list.
|
|
@@ -44462,19 +44461,41 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param clearCoatConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this clear coat configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Clear Coat Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
import { EffectFallbacks } from "babylonjs/Materials/effect";
|
|
|
import { UniformBuffer } from "babylonjs/Materials/uniformBuffer";
|
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
+ import { Vector2 } from "babylonjs/Maths/math";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
+ import { IAnimatable } from "babylonjs/Misc/tools";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
/**
|
|
|
* @hidden
|
|
|
*/
|
|
|
export interface IMaterialAnisotropicDefines {
|
|
|
ANISOTROPIC: boolean;
|
|
|
+ ANISOTROPIC_TEXTURE: boolean;
|
|
|
+ ANISOTROPIC_TEXTUREDIRECTUV: number;
|
|
|
MAINUV1: boolean;
|
|
|
- _areMiscDirty: boolean;
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
_needUVs: boolean;
|
|
|
}
|
|
|
/**
|
|
@@ -44491,51 +44512,73 @@ declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
*/
|
|
|
intensity: number;
|
|
|
/**
|
|
|
- * Defines if the effect is along the tangents or bitangents.
|
|
|
+ * Defines if the effect is along the tangents, bitangents or in between.
|
|
|
* By default, the effect is "strectching" the highlights along the tangents.
|
|
|
*/
|
|
|
- followTangents: boolean;
|
|
|
+ direction: Vector2;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the anisotropy values in a texture.
|
|
|
+ * rg is direction (like normal from -1 to 1)
|
|
|
+ * b is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
/** @hidden */
|
|
|
- private _internalMarkAllSubMeshesAsMiscDirty;
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
/** @hidden */
|
|
|
- _markAllSubMeshesAsMiscDirty(): void;
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
/**
|
|
|
- * Instantiate a new istance of clear coat configuration.
|
|
|
- * @param markAllSubMeshesAsMiscDirty Callback to flag the material to dirty
|
|
|
+ * Instantiate a new istance of anisotropy configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
*/
|
|
|
- constructor(markAllSubMeshesAsMiscDirty: () => void);
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialAnisotropicDefines, scene: Scene): boolean;
|
|
|
/**
|
|
|
* Checks to see if a texture is used in the material.
|
|
|
* @param defines the list of "defines" to update.
|
|
|
* @param mesh the mesh we are preparing the defines for.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
*/
|
|
|
- prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh): void;
|
|
|
+ prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh, scene: Scene): void;
|
|
|
/**
|
|
|
* Binds the material data.
|
|
|
* @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
* @param isFrozen defines wether the material is frozen or not.
|
|
|
*/
|
|
|
- bindForSubMesh(uniformBuffer: UniformBuffer, isFrozen: boolean): void;
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
/**
|
|
|
- * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
- * @returns "PBRAnisotropicConfiguration"
|
|
|
- */
|
|
|
- getClassName(): string;
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
*/
|
|
|
- copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
/**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
*/
|
|
|
- serialize(): any;
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
/**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
*/
|
|
|
- parse(source: any): void;
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRAnisotropicConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
/**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
@@ -44554,6 +44597,26 @@ declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this anisotropy configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a anisotropy Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/PBR/pbrBRDFConfiguration" {
|
|
@@ -44621,6 +44684,149 @@ declare module "babylonjs/Materials/PBR/pbrBRDFConfiguration" {
|
|
|
parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Materials/PBR/pbrSheenConfiguration" {
|
|
|
+ import { EffectFallbacks } from "babylonjs/Materials/effect";
|
|
|
+ import { UniformBuffer } from "babylonjs/Materials/uniformBuffer";
|
|
|
+ import { Color3 } from "babylonjs/Maths/math";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
+ import { IAnimatable } from "babylonjs/Misc/tools";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ export interface IMaterialSheenDefines {
|
|
|
+ SHEEN: boolean;
|
|
|
+ SHEEN_TEXTURE: boolean;
|
|
|
+ SHEEN_TEXTUREDIRECTUV: number;
|
|
|
+ SHEEN_LINKWITHALBEDO: boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Define the code related to the Sheen parameters of the pbr material.
|
|
|
+ */
|
|
|
+ export class PBRSheenConfiguration {
|
|
|
+ private _isEnabled;
|
|
|
+ /**
|
|
|
+ * Defines if the material uses sheen.
|
|
|
+ */
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _linkSheenWithAlbedo;
|
|
|
+ /**
|
|
|
+ * Defines if the sheen is linked to the sheen color.
|
|
|
+ */
|
|
|
+ linkSheenWithAlbedo: boolean;
|
|
|
+ /**
|
|
|
+ * Defines the sheen intensity.
|
|
|
+ */
|
|
|
+ intensity: number;
|
|
|
+ /**
|
|
|
+ * Defines the sheen color.
|
|
|
+ */
|
|
|
+ color: Color3;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the sheen tint values in a texture.
|
|
|
+ * rgb is tint
|
|
|
+ * a is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
+ /** @hidden */
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
+ /** @hidden */
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
+ /**
|
|
|
+ * Instantiate a new istance of clear coat configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
+ */
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialSheenDefines, scene: Scene): boolean;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ */
|
|
|
+ prepareDefines(defines: IMaterialSheenDefines, scene: Scene): void;
|
|
|
+ /**
|
|
|
+ * Binds the material data.
|
|
|
+ * @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
+ */
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
+ /**
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
+ */
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
+ /**
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
+ */
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
+ /**
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
+ */
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRSheenConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Add fallbacks to the effect fallbacks list.
|
|
|
+ * @param defines defines the Base texture to use.
|
|
|
+ * @param fallbacks defines the current fallback list.
|
|
|
+ * @param currentRank defines the current fallback rank.
|
|
|
+ * @returns the new fallback rank.
|
|
|
+ */
|
|
|
+ static AddFallbacks(defines: IMaterialSheenDefines, fallbacks: EffectFallbacks, currentRank: number): number;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current list.
|
|
|
+ * @param uniforms defines the current uniform list.
|
|
|
+ */
|
|
|
+ static AddUniforms(uniforms: string[]): void;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
+ */
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param sheenConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(sheenConfiguration: PBRSheenConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this BRDF configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Sheen Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration" {
|
|
|
/** @hidden */
|
|
|
export var pbrFragmentDeclaration: {
|
|
@@ -44756,6 +44962,7 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
|
import { PBRClearCoatConfiguration } from "babylonjs/Materials/PBR/pbrClearCoatConfiguration";
|
|
|
import { PBRAnisotropicConfiguration } from "babylonjs/Materials/PBR/pbrAnisotropicConfiguration";
|
|
|
import { PBRBRDFConfiguration } from "babylonjs/Materials/PBR/pbrBRDFConfiguration";
|
|
|
+ import { PBRSheenConfiguration } from "babylonjs/Materials/PBR/pbrSheenConfiguration";
|
|
|
import { ImageProcessingConfiguration } from "babylonjs/Materials/imageProcessingConfiguration";
|
|
|
import { Material } from "babylonjs/Materials/material";
|
|
|
import { PushMaterial } from "babylonjs/Materials/pushMaterial";
|
|
@@ -45142,6 +45349,10 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
|
*/
|
|
|
readonly brdf: PBRBRDFConfiguration;
|
|
|
/**
|
|
|
+ * Defines the Sheen parameters for the material.
|
|
|
+ */
|
|
|
+ readonly sheen: PBRSheenConfiguration;
|
|
|
+ /**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
|
*
|
|
|
* @param name The material name
|
|
@@ -65742,7 +65953,7 @@ declare module BABYLON {
|
|
|
* @param scene defines the scene the texture is attached to
|
|
|
* @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...
|
|
|
* @param noMipmap defines if mipmaps should be created or not
|
|
|
- * @param files defines the six files to load for the different faces
|
|
|
+ * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz
|
|
|
* @param onLoad defines a callback triggered at the end of the file load if no errors occured
|
|
|
* @param onError defines a callback triggered in case of error during load
|
|
|
* @param format defines the internal format to use for the texture once loaded
|
|
@@ -77835,9 +78046,10 @@ declare module BABYLON {
|
|
|
* Update the current index buffer
|
|
|
* @param indices defines the source data
|
|
|
* @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): Mesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): Mesh;
|
|
|
/**
|
|
|
* Invert the geometry to move from a right handed system to a left handed one.
|
|
|
* @returns the current mesh
|
|
@@ -79416,8 +79628,9 @@ declare module BABYLON {
|
|
|
* Update index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
|
* @param offset defines the offset in the target buffer where to store the data
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): void;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): void;
|
|
|
/**
|
|
|
* Creates a new index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
@@ -81454,9 +81667,11 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Updates the AbstractMesh indices array
|
|
|
* @param indices defines the data source
|
|
|
+ * @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray): AbstractMesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): AbstractMesh;
|
|
|
/**
|
|
|
* Creates new normals data for the mesh
|
|
|
* @param updatable defines if the normal vertex buffer must be flagged as updatable
|
|
@@ -94926,6 +95141,16 @@ declare module BABYLON {
|
|
|
* Are clear coat tint textures enabled in the application.
|
|
|
*/
|
|
|
static ClearCoatTintTextureEnabled: boolean;
|
|
|
+ private static _SheenTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are sheen textures enabled in the application.
|
|
|
+ */
|
|
|
+ static SheenTextureEnabled: boolean;
|
|
|
+ private static _AnisotropicTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are anisotropic textures enabled in the application.
|
|
|
+ */
|
|
|
+ static AnisotropicTextureEnabled: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100261,21 +100486,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getClassName(): string;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param clearCoatConfiguration define the config where to copy the info
|
|
|
- */
|
|
|
- copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
- /**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- /**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
- */
|
|
|
- parse(source: any): void;
|
|
|
- /**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
|
* @param fallbacks defines the current fallback list.
|
|
@@ -100298,6 +100508,21 @@ declare module BABYLON {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param clearCoatConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this clear coat configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Clear Coat Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100306,8 +100531,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export interface IMaterialAnisotropicDefines {
|
|
|
ANISOTROPIC: boolean;
|
|
|
+ ANISOTROPIC_TEXTURE: boolean;
|
|
|
+ ANISOTROPIC_TEXTUREDIRECTUV: number;
|
|
|
MAINUV1: boolean;
|
|
|
- _areMiscDirty: boolean;
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
_needUVs: boolean;
|
|
|
}
|
|
|
/**
|
|
@@ -100324,51 +100551,73 @@ declare module BABYLON {
|
|
|
*/
|
|
|
intensity: number;
|
|
|
/**
|
|
|
- * Defines if the effect is along the tangents or bitangents.
|
|
|
+ * Defines if the effect is along the tangents, bitangents or in between.
|
|
|
* By default, the effect is "strectching" the highlights along the tangents.
|
|
|
*/
|
|
|
- followTangents: boolean;
|
|
|
+ direction: Vector2;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the anisotropy values in a texture.
|
|
|
+ * rg is direction (like normal from -1 to 1)
|
|
|
+ * b is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
/** @hidden */
|
|
|
- private _internalMarkAllSubMeshesAsMiscDirty;
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
/** @hidden */
|
|
|
- _markAllSubMeshesAsMiscDirty(): void;
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
/**
|
|
|
- * Instantiate a new istance of clear coat configuration.
|
|
|
- * @param markAllSubMeshesAsMiscDirty Callback to flag the material to dirty
|
|
|
+ * Instantiate a new istance of anisotropy configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
*/
|
|
|
- constructor(markAllSubMeshesAsMiscDirty: () => void);
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialAnisotropicDefines, scene: Scene): boolean;
|
|
|
/**
|
|
|
* Checks to see if a texture is used in the material.
|
|
|
* @param defines the list of "defines" to update.
|
|
|
* @param mesh the mesh we are preparing the defines for.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
*/
|
|
|
- prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh): void;
|
|
|
+ prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh, scene: Scene): void;
|
|
|
/**
|
|
|
* Binds the material data.
|
|
|
* @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
* @param isFrozen defines wether the material is frozen or not.
|
|
|
*/
|
|
|
- bindForSubMesh(uniformBuffer: UniformBuffer, isFrozen: boolean): void;
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
/**
|
|
|
- * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
- * @returns "PBRAnisotropicConfiguration"
|
|
|
- */
|
|
|
- getClassName(): string;
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
*/
|
|
|
- copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
/**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
*/
|
|
|
- serialize(): any;
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
/**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
*/
|
|
|
- parse(source: any): void;
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRAnisotropicConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
/**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
@@ -100387,6 +100636,26 @@ declare module BABYLON {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this anisotropy configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a anisotropy Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100455,6 +100724,142 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ export interface IMaterialSheenDefines {
|
|
|
+ SHEEN: boolean;
|
|
|
+ SHEEN_TEXTURE: boolean;
|
|
|
+ SHEEN_TEXTUREDIRECTUV: number;
|
|
|
+ SHEEN_LINKWITHALBEDO: boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Define the code related to the Sheen parameters of the pbr material.
|
|
|
+ */
|
|
|
+ export class PBRSheenConfiguration {
|
|
|
+ private _isEnabled;
|
|
|
+ /**
|
|
|
+ * Defines if the material uses sheen.
|
|
|
+ */
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _linkSheenWithAlbedo;
|
|
|
+ /**
|
|
|
+ * Defines if the sheen is linked to the sheen color.
|
|
|
+ */
|
|
|
+ linkSheenWithAlbedo: boolean;
|
|
|
+ /**
|
|
|
+ * Defines the sheen intensity.
|
|
|
+ */
|
|
|
+ intensity: number;
|
|
|
+ /**
|
|
|
+ * Defines the sheen color.
|
|
|
+ */
|
|
|
+ color: Color3;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the sheen tint values in a texture.
|
|
|
+ * rgb is tint
|
|
|
+ * a is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
+ /** @hidden */
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
+ /** @hidden */
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
+ /**
|
|
|
+ * Instantiate a new istance of clear coat configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
+ */
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialSheenDefines, scene: Scene): boolean;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ */
|
|
|
+ prepareDefines(defines: IMaterialSheenDefines, scene: Scene): void;
|
|
|
+ /**
|
|
|
+ * Binds the material data.
|
|
|
+ * @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
+ */
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
+ /**
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
+ */
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
+ /**
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
+ */
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
+ /**
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
+ */
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRSheenConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Add fallbacks to the effect fallbacks list.
|
|
|
+ * @param defines defines the Base texture to use.
|
|
|
+ * @param fallbacks defines the current fallback list.
|
|
|
+ * @param currentRank defines the current fallback rank.
|
|
|
+ * @returns the new fallback rank.
|
|
|
+ */
|
|
|
+ static AddFallbacks(defines: IMaterialSheenDefines, fallbacks: EffectFallbacks, currentRank: number): number;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current list.
|
|
|
+ * @param uniforms defines the current uniform list.
|
|
|
+ */
|
|
|
+ static AddUniforms(uniforms: string[]): void;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
+ */
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param sheenConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(sheenConfiguration: PBRSheenConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this BRDF configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Sheen Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
export var pbrFragmentDeclaration: {
|
|
|
name: string;
|
|
@@ -100912,6 +101317,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
readonly brdf: PBRBRDFConfiguration;
|
|
|
/**
|
|
|
+ * Defines the Sheen parameters for the material.
|
|
|
+ */
|
|
|
+ readonly sheen: PBRSheenConfiguration;
|
|
|
+ /**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
|
*
|
|
|
* @param name The material name
|