|
@@ -22665,7 +22665,7 @@ declare module "babylonjs/Materials/material" {
|
|
* @param rootUrl defines the root URL to use to load textures
|
|
* @param rootUrl defines the root URL to use to load textures
|
|
* @returns a new material
|
|
* @returns a new material
|
|
*/
|
|
*/
|
|
- static Parse(parsedMaterial: any, scene: Scene, rootUrl: string): any;
|
|
|
|
|
|
+ static Parse(parsedMaterial: any, scene: Scene, rootUrl: string): Nullable<Material>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module "babylonjs/Meshes/subMesh" {
|
|
declare module "babylonjs/Meshes/subMesh" {
|
|
@@ -39277,6 +39277,11 @@ declare module "babylonjs/Materials/materialFlags" {
|
|
* Are anisotropic textures enabled in the application.
|
|
* Are anisotropic textures enabled in the application.
|
|
*/
|
|
*/
|
|
static AnisotropicTextureEnabled: boolean;
|
|
static AnisotropicTextureEnabled: boolean;
|
|
|
|
+ private static _ThicknessTextureEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Are thickness textures enabled in the application.
|
|
|
|
+ */
|
|
|
|
+ static ThicknessTextureEnabled: boolean;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module "babylonjs/Shaders/ShadersInclude/defaultFragmentDeclaration" {
|
|
declare module "babylonjs/Shaders/ShadersInclude/defaultFragmentDeclaration" {
|
|
@@ -45365,12 +45370,12 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
*/
|
|
*/
|
|
isTintEnabled: boolean;
|
|
isTintEnabled: boolean;
|
|
/**
|
|
/**
|
|
- * Defines if the clear coat tint is enabled in the material.
|
|
|
|
|
|
+ * Defines the clear coat tint of the material.
|
|
* This is only use if tint is enabled
|
|
* This is only use if tint is enabled
|
|
*/
|
|
*/
|
|
tintColor: Color3;
|
|
tintColor: Color3;
|
|
/**
|
|
/**
|
|
- * Defines if the distance at which the tint color should be found in the
|
|
|
|
|
|
+ * Defines the distance at which the tint color should be found in the
|
|
* clear coat media.
|
|
* clear coat media.
|
|
* This is only use if tint is enabled
|
|
* This is only use if tint is enabled
|
|
*/
|
|
*/
|
|
@@ -45397,7 +45402,7 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
*/
|
|
*/
|
|
constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
/**
|
|
/**
|
|
- * Specifies that the submesh is ready to be used.
|
|
|
|
|
|
+ * Gets wehter the submesh is ready to be used or not.
|
|
* @param defines the list of "defines" to update.
|
|
* @param defines the list of "defines" to update.
|
|
* @param scene defines the scene the material belongs to.
|
|
* @param scene defines the scene the material belongs to.
|
|
* @param engine defines the engine the material belongs to.
|
|
* @param engine defines the engine the material belongs to.
|
|
@@ -45847,6 +45852,257 @@ declare module "babylonjs/Materials/PBR/pbrSheenConfiguration" {
|
|
parse(source: any): void;
|
|
parse(source: any): void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Materials/PBR/pbrSubSurfaceConfiguration" {
|
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
|
+ import { IAnimatable } from "babylonjs/Misc/tools";
|
|
|
|
+ import { Color3 } from "babylonjs/Maths/math";
|
|
|
|
+ import { SmartArray } from "babylonjs/Misc/smartArray";
|
|
|
|
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
|
+ import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
|
|
|
|
+ import { Effect, EffectFallbacks } from "babylonjs/Materials/effect";
|
|
|
|
+ import { UniformBuffer } from "babylonjs/Materials/uniformBuffer";
|
|
|
|
+ import { Engine } from "babylonjs/Engines/engine";
|
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ export interface IMaterialSubSurfaceDefines {
|
|
|
|
+ SUBSURFACE: boolean;
|
|
|
|
+ SS_REFRACTION: boolean;
|
|
|
|
+ SS_TRANSLUCENCY: boolean;
|
|
|
|
+ SS_SCATERRING: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTURE: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTUREDIRECTUV: number;
|
|
|
|
+ SS_REFRACTIONMAP_3D: boolean;
|
|
|
|
+ SS_REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
+ SS_LODINREFRACTIONALPHA: boolean;
|
|
|
|
+ SS_GAMMAREFRACTION: boolean;
|
|
|
|
+ SS_RGBDREFRACTION: boolean;
|
|
|
|
+ SS_LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
+ SS_MASK_FROM_THICKNESS_TEXTURE: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Define the code related to the sub surface parameters of the pbr material.
|
|
|
|
+ */
|
|
|
|
+ export class PBRSubSurfaceConfiguration {
|
|
|
|
+ private _isRefractionEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if the refraction is enabled in the material.
|
|
|
|
+ */
|
|
|
|
+ isRefractionEnabled: boolean;
|
|
|
|
+ private _isTranslucencyEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if the translucency is enabled in the material.
|
|
|
|
+ */
|
|
|
|
+ isTranslucencyEnabled: boolean;
|
|
|
|
+ private _isScatteringEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the refraction intensity of the material.
|
|
|
|
+ * The refraction when enabled replaces the Diffuse part of the material.
|
|
|
|
+ * The intensity helps transitionning between diffuse and refraction.
|
|
|
|
+ */
|
|
|
|
+ refractionIntensity: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the translucency intensity of the material.
|
|
|
|
+ * When translucency has been enabled, this defines how much of the "translucency"
|
|
|
|
+ * is addded to the diffuse part of the material.
|
|
|
|
+ */
|
|
|
|
+ translucencyIntensity: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the scattering intensity of the material.
|
|
|
|
+ * When scattering has been enabled, this defines how much of the "scattered light"
|
|
|
|
+ * is addded to the diffuse part of the material.
|
|
|
|
+ */
|
|
|
|
+ scatteringIntensity: number;
|
|
|
|
+ private _thicknessTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Stores the average thickness of a mesh in a texture (The texture is holding the values linearly).
|
|
|
|
+ * The red channel of the texture should contain the thickness remapped between 0 and 1.
|
|
|
|
+ * 0 would mean minimumThickness
|
|
|
|
+ * 1 would mean maximumThickness
|
|
|
|
+ * The other channels might be use as a mask to vary the different effects intensity.
|
|
|
|
+ */
|
|
|
|
+ thicknessTexture: Nullable<BaseTexture>;
|
|
|
|
+ private _refractionTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the texture to use for refraction.
|
|
|
|
+ */
|
|
|
|
+ refractionTexture: Nullable<BaseTexture>;
|
|
|
|
+ private _indexOfRefraction;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the indice of refraction used in the material.
|
|
|
|
+ * https://en.wikipedia.org/wiki/List_of_refractive_indices
|
|
|
|
+ */
|
|
|
|
+ indexOfRefraction: number;
|
|
|
|
+ private _invertRefractionY;
|
|
|
|
+ /**
|
|
|
|
+ * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
|
|
|
|
+ */
|
|
|
|
+ invertRefractionY: boolean;
|
|
|
|
+ private _linkRefractionWithTransparency;
|
|
|
|
+ /**
|
|
|
|
+ * This parameters will make the material used its opacity to control how much it is refracting aginst not.
|
|
|
|
+ * Materials half opaque for instance using refraction could benefit from this control.
|
|
|
|
+ */
|
|
|
|
+ linkRefractionWithTransparency: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the minimum thickness stored in the thickness map.
|
|
|
|
+ * If no thickness map is defined, this value will be used to simulate thickness.
|
|
|
|
+ */
|
|
|
|
+ minimumThickness: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the maximum thickness stored in the thickness map.
|
|
|
|
+ */
|
|
|
|
+ maximumThickness: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the volume tint of the material.
|
|
|
|
+ * This is used for both translucency and scattering.
|
|
|
|
+ */
|
|
|
|
+ tintColor: Color3;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the distance at which the tint color should be found in the media.
|
|
|
|
+ * This is used for refraction only.
|
|
|
|
+ */
|
|
|
|
+ tintColorAtDistance: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines how far each channel transmit through the media.
|
|
|
|
+ * It is defined as a color to simplify it selection.
|
|
|
|
+ */
|
|
|
|
+ diffusionDistance: Color3;
|
|
|
|
+ private _useMaskFromThicknessTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Stores the intensity of the different subsurface effects in the thickness texture.
|
|
|
|
+ * * the green channel is the translucency intensity.
|
|
|
|
+ * * the blue channel is the scattering intensity.
|
|
|
|
+ * * the alpha channel is the refraction intensity.
|
|
|
|
+ */
|
|
|
|
+ useMaskFromThicknessTexture: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Instantiate a new istance of sub surface configuration.
|
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
|
+ */
|
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
|
+ /**
|
|
|
|
+ * Gets wehter the submesh is ready to be used or not.
|
|
|
|
+ * @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: IMaterialSubSurfaceDefines, 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 to the material belongs to.
|
|
|
|
+ */
|
|
|
|
+ prepareDefines(defines: IMaterialSubSurfaceDefines, 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 engine defines the engine the material belongs to.
|
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
|
+ * @param lodBasedMicrosurface defines wether the material relies on lod based microsurface or not.
|
|
|
|
+ */
|
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, isFrozen: boolean, lodBasedMicrosurface: boolean): void;
|
|
|
|
+ /**
|
|
|
|
+ * Unbinds the material from the mesh.
|
|
|
|
+ * @param activeEffect defines the effect that should be unbound from.
|
|
|
|
+ * @returns true if unbound, otherwise false
|
|
|
|
+ */
|
|
|
|
+ unbind(activeEffect: Effect): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Returns the texture used for refraction or null if none is used.
|
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
|
+ * @returns - Refraction texture if present. If no refraction texture and refraction
|
|
|
|
+ * is linked with transparency, returns environment texture. Otherwise, returns null.
|
|
|
|
+ */
|
|
|
|
+ private _getRefractionTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Returns true if alpha blending should be disabled.
|
|
|
|
+ */
|
|
|
|
+ readonly disableAlphaBlending: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Fills the list of render target textures.
|
|
|
|
+ * @param renderTargets the list of render targets to update
|
|
|
|
+ */
|
|
|
|
+ fillRenderTargetTextures(renderTargets: SmartArray<RenderTargetTexture>): 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;
|
|
|
|
+ /**
|
|
|
|
+ * Gets a boolean indicating that current material needs to register RTT
|
|
|
|
+ * @returns true if this uses a render target otherwise false.
|
|
|
|
+ */
|
|
|
|
+ hasRenderTargetTextures(): 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 "PBRSubSurfaceConfiguration"
|
|
|
|
+ */
|
|
|
|
+ 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: IMaterialSubSurfaceDefines, 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 samplers to the current list.
|
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
|
+ */
|
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
|
+ /**
|
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
|
+ */
|
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
|
+ /**
|
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
|
+ * @param configuration define the config where to copy the info
|
|
|
|
+ */
|
|
|
|
+ copyTo(configuration: PBRSubSurfaceConfiguration): void;
|
|
|
|
+ /**
|
|
|
|
+ * Serializes this Sub Surface configuration.
|
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
|
+ */
|
|
|
|
+ serialize(): any;
|
|
|
|
+ /**
|
|
|
|
+ * Parses a Sub Surface Configuration from a serialized object.
|
|
|
|
+ * @param source - Serialized object.
|
|
|
|
+ */
|
|
|
|
+ parse(source: any): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration" {
|
|
declare module "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var pbrFragmentDeclaration: {
|
|
export var pbrFragmentDeclaration: {
|
|
@@ -46015,6 +46271,7 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
import { IMaterialAnisotropicDefines, PBRAnisotropicConfiguration } from "babylonjs/Materials/PBR/pbrAnisotropicConfiguration";
|
|
import { IMaterialAnisotropicDefines, PBRAnisotropicConfiguration } from "babylonjs/Materials/PBR/pbrAnisotropicConfiguration";
|
|
import { IMaterialBRDFDefines, PBRBRDFConfiguration } from "babylonjs/Materials/PBR/pbrBRDFConfiguration";
|
|
import { IMaterialBRDFDefines, PBRBRDFConfiguration } from "babylonjs/Materials/PBR/pbrBRDFConfiguration";
|
|
import { IMaterialSheenDefines, PBRSheenConfiguration } from "babylonjs/Materials/PBR/pbrSheenConfiguration";
|
|
import { IMaterialSheenDefines, PBRSheenConfiguration } from "babylonjs/Materials/PBR/pbrSheenConfiguration";
|
|
|
|
+ import { IMaterialSubSurfaceDefines, PBRSubSurfaceConfiguration } from "babylonjs/Materials/PBR/pbrSubSurfaceConfiguration";
|
|
import { ImageProcessingConfiguration, IImageProcessingConfigurationDefines } from "babylonjs/Materials/imageProcessingConfiguration";
|
|
import { ImageProcessingConfiguration, IImageProcessingConfigurationDefines } from "babylonjs/Materials/imageProcessingConfiguration";
|
|
import { Material } from "babylonjs/Materials/material";
|
|
import { Material } from "babylonjs/Materials/material";
|
|
import { MaterialDefines } from "babylonjs/Materials/materialDefines";
|
|
import { MaterialDefines } from "babylonjs/Materials/materialDefines";
|
|
@@ -46026,7 +46283,7 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
* Manages the defines for the PBR Material.
|
|
* Manages the defines for the PBR Material.
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
- export class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines, IMaterialClearCoatDefines, IMaterialAnisotropicDefines, IMaterialBRDFDefines, IMaterialSheenDefines {
|
|
|
|
|
|
+ export class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines, IMaterialClearCoatDefines, IMaterialAnisotropicDefines, IMaterialBRDFDefines, IMaterialSheenDefines, IMaterialSubSurfaceDefines {
|
|
PBR: boolean;
|
|
PBR: boolean;
|
|
MAINUV1: boolean;
|
|
MAINUV1: boolean;
|
|
MAINUV2: boolean;
|
|
MAINUV2: boolean;
|
|
@@ -46103,13 +46360,6 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
RGBDREFLECTION: boolean;
|
|
RGBDREFLECTION: boolean;
|
|
RADIANCEOCCLUSION: boolean;
|
|
RADIANCEOCCLUSION: boolean;
|
|
HORIZONOCCLUSION: boolean;
|
|
HORIZONOCCLUSION: boolean;
|
|
- REFRACTION: boolean;
|
|
|
|
- REFRACTIONMAP_3D: boolean;
|
|
|
|
- REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
- LODINREFRACTIONALPHA: boolean;
|
|
|
|
- GAMMAREFRACTION: boolean;
|
|
|
|
- RGBDREFRACTION: boolean;
|
|
|
|
- LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
INSTANCES: boolean;
|
|
INSTANCES: boolean;
|
|
NUM_BONE_INFLUENCERS: number;
|
|
NUM_BONE_INFLUENCERS: number;
|
|
BonesPerMesh: number;
|
|
BonesPerMesh: number;
|
|
@@ -46165,6 +46415,19 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
SHEEN_TEXTURE: boolean;
|
|
SHEEN_TEXTURE: boolean;
|
|
SHEEN_TEXTUREDIRECTUV: number;
|
|
SHEEN_TEXTUREDIRECTUV: number;
|
|
SHEEN_LINKWITHALBEDO: boolean;
|
|
SHEEN_LINKWITHALBEDO: boolean;
|
|
|
|
+ SUBSURFACE: boolean;
|
|
|
|
+ SS_REFRACTION: boolean;
|
|
|
|
+ SS_TRANSLUCENCY: boolean;
|
|
|
|
+ SS_SCATERRING: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTURE: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTUREDIRECTUV: number;
|
|
|
|
+ SS_REFRACTIONMAP_3D: boolean;
|
|
|
|
+ SS_REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
+ SS_LODINREFRACTIONALPHA: boolean;
|
|
|
|
+ SS_GAMMAREFRACTION: boolean;
|
|
|
|
+ SS_RGBDREFRACTION: boolean;
|
|
|
|
+ SS_LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
+ SS_MASK_FROM_THICKNESS_TEXTURE: boolean;
|
|
UNLIT: boolean;
|
|
UNLIT: boolean;
|
|
DEBUGMODE: number;
|
|
DEBUGMODE: number;
|
|
/**
|
|
/**
|
|
@@ -46275,10 +46538,6 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
*/
|
|
*/
|
|
protected _reflectionTexture: BaseTexture;
|
|
protected _reflectionTexture: BaseTexture;
|
|
/**
|
|
/**
|
|
- * Stores the refraction values in a texture.
|
|
|
|
- */
|
|
|
|
- protected _refractionTexture: BaseTexture;
|
|
|
|
- /**
|
|
|
|
* Stores the emissive values in a texture.
|
|
* Stores the emissive values in a texture.
|
|
*/
|
|
*/
|
|
protected _emissiveTexture: BaseTexture;
|
|
protected _emissiveTexture: BaseTexture;
|
|
@@ -46338,19 +46597,6 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
*/
|
|
*/
|
|
protected _microSurface: number;
|
|
protected _microSurface: number;
|
|
/**
|
|
/**
|
|
- * source material index of refraction (IOR)' / 'destination material IOR.
|
|
|
|
- */
|
|
|
|
- protected _indexOfRefraction: number;
|
|
|
|
- /**
|
|
|
|
- * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
|
|
|
|
- */
|
|
|
|
- protected _invertRefractionY: boolean;
|
|
|
|
- /**
|
|
|
|
- * This parameters will make the material used its opacity to control how much it is refracting aginst not.
|
|
|
|
- * Materials half opaque for instance using refraction could benefit from this control.
|
|
|
|
- */
|
|
|
|
- protected _linkRefractionWithTransparency: boolean;
|
|
|
|
- /**
|
|
|
|
* Specifies that the material will use the light map as a show map.
|
|
* Specifies that the material will use the light map as a show map.
|
|
*/
|
|
*/
|
|
protected _useLightmapAsShadowmap: boolean;
|
|
protected _useLightmapAsShadowmap: boolean;
|
|
@@ -46560,6 +46806,10 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
*/
|
|
*/
|
|
readonly sheen: PBRSheenConfiguration;
|
|
readonly sheen: PBRSheenConfiguration;
|
|
/**
|
|
/**
|
|
|
|
+ * Defines the SubSurface parameters for the material.
|
|
|
|
+ */
|
|
|
|
+ readonly subSurface: PBRSubSurfaceConfiguration;
|
|
|
|
+ /**
|
|
* Custom callback helping to override the default shader used in the material.
|
|
* Custom callback helping to override the default shader used in the material.
|
|
*/
|
|
*/
|
|
customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines) => string;
|
|
customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines) => string;
|
|
@@ -46651,7 +46901,7 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
*/
|
|
*/
|
|
buildUniformLayout(): void;
|
|
buildUniformLayout(): void;
|
|
/**
|
|
/**
|
|
- * Unbinds the textures.
|
|
|
|
|
|
+ * Unbinds the material from the mesh
|
|
*/
|
|
*/
|
|
unbind(): void;
|
|
unbind(): void;
|
|
/**
|
|
/**
|
|
@@ -46672,12 +46922,6 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
*/
|
|
*/
|
|
private _getReflectionTexture;
|
|
private _getReflectionTexture;
|
|
/**
|
|
/**
|
|
- * Returns the texture used for refraction or null if none is used.
|
|
|
|
- * @returns - Refection texture if present. If no refraction texture and refraction
|
|
|
|
- * is linked with transparency, returns environment texture. Otherwise, returns null.
|
|
|
|
- */
|
|
|
|
- private _getRefractionTexture;
|
|
|
|
- /**
|
|
|
|
* Returns an array of the actively used textures.
|
|
* Returns an array of the actively used textures.
|
|
* @returns - Array of BaseTextures
|
|
* @returns - Array of BaseTextures
|
|
*/
|
|
*/
|
|
@@ -46822,7 +47066,7 @@ declare module "babylonjs/Materials/PBR/pbrMaterial" {
|
|
/**
|
|
/**
|
|
* Stores the refracted light information in a texture.
|
|
* Stores the refracted light information in a texture.
|
|
*/
|
|
*/
|
|
- refractionTexture: BaseTexture;
|
|
|
|
|
|
+ refractionTexture: Nullable<BaseTexture>;
|
|
/**
|
|
/**
|
|
* The color of a material in ambient lighting.
|
|
* The color of a material in ambient lighting.
|
|
*/
|
|
*/
|
|
@@ -81267,7 +81511,7 @@ declare module BABYLON {
|
|
* @param rootUrl defines the root URL to use to load textures
|
|
* @param rootUrl defines the root URL to use to load textures
|
|
* @returns a new material
|
|
* @returns a new material
|
|
*/
|
|
*/
|
|
- static Parse(parsedMaterial: any, scene: Scene, rootUrl: string): any;
|
|
|
|
|
|
+ static Parse(parsedMaterial: any, scene: Scene, rootUrl: string): Nullable<Material>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -97291,6 +97535,11 @@ declare module BABYLON {
|
|
* Are anisotropic textures enabled in the application.
|
|
* Are anisotropic textures enabled in the application.
|
|
*/
|
|
*/
|
|
static AnisotropicTextureEnabled: boolean;
|
|
static AnisotropicTextureEnabled: boolean;
|
|
|
|
+ private static _ThicknessTextureEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Are thickness textures enabled in the application.
|
|
|
|
+ */
|
|
|
|
+ static ThicknessTextureEnabled: boolean;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -102834,12 +103083,12 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
isTintEnabled: boolean;
|
|
isTintEnabled: boolean;
|
|
/**
|
|
/**
|
|
- * Defines if the clear coat tint is enabled in the material.
|
|
|
|
|
|
+ * Defines the clear coat tint of the material.
|
|
* This is only use if tint is enabled
|
|
* This is only use if tint is enabled
|
|
*/
|
|
*/
|
|
tintColor: Color3;
|
|
tintColor: Color3;
|
|
/**
|
|
/**
|
|
- * Defines if the distance at which the tint color should be found in the
|
|
|
|
|
|
+ * Defines the distance at which the tint color should be found in the
|
|
* clear coat media.
|
|
* clear coat media.
|
|
* This is only use if tint is enabled
|
|
* This is only use if tint is enabled
|
|
*/
|
|
*/
|
|
@@ -102866,7 +103115,7 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
/**
|
|
/**
|
|
- * Specifies that the submesh is ready to be used.
|
|
|
|
|
|
+ * Gets wehter the submesh is ready to be used or not.
|
|
* @param defines the list of "defines" to update.
|
|
* @param defines the list of "defines" to update.
|
|
* @param scene defines the scene the material belongs to.
|
|
* @param scene defines the scene the material belongs to.
|
|
* @param engine defines the engine the material belongs to.
|
|
* @param engine defines the engine the material belongs to.
|
|
@@ -103302,6 +103551,247 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ export interface IMaterialSubSurfaceDefines {
|
|
|
|
+ SUBSURFACE: boolean;
|
|
|
|
+ SS_REFRACTION: boolean;
|
|
|
|
+ SS_TRANSLUCENCY: boolean;
|
|
|
|
+ SS_SCATERRING: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTURE: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTUREDIRECTUV: number;
|
|
|
|
+ SS_REFRACTIONMAP_3D: boolean;
|
|
|
|
+ SS_REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
+ SS_LODINREFRACTIONALPHA: boolean;
|
|
|
|
+ SS_GAMMAREFRACTION: boolean;
|
|
|
|
+ SS_RGBDREFRACTION: boolean;
|
|
|
|
+ SS_LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
+ SS_MASK_FROM_THICKNESS_TEXTURE: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Define the code related to the sub surface parameters of the pbr material.
|
|
|
|
+ */
|
|
|
|
+ export class PBRSubSurfaceConfiguration {
|
|
|
|
+ private _isRefractionEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if the refraction is enabled in the material.
|
|
|
|
+ */
|
|
|
|
+ isRefractionEnabled: boolean;
|
|
|
|
+ private _isTranslucencyEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if the translucency is enabled in the material.
|
|
|
|
+ */
|
|
|
|
+ isTranslucencyEnabled: boolean;
|
|
|
|
+ private _isScatteringEnabled;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the refraction intensity of the material.
|
|
|
|
+ * The refraction when enabled replaces the Diffuse part of the material.
|
|
|
|
+ * The intensity helps transitionning between diffuse and refraction.
|
|
|
|
+ */
|
|
|
|
+ refractionIntensity: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the translucency intensity of the material.
|
|
|
|
+ * When translucency has been enabled, this defines how much of the "translucency"
|
|
|
|
+ * is addded to the diffuse part of the material.
|
|
|
|
+ */
|
|
|
|
+ translucencyIntensity: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the scattering intensity of the material.
|
|
|
|
+ * When scattering has been enabled, this defines how much of the "scattered light"
|
|
|
|
+ * is addded to the diffuse part of the material.
|
|
|
|
+ */
|
|
|
|
+ scatteringIntensity: number;
|
|
|
|
+ private _thicknessTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Stores the average thickness of a mesh in a texture (The texture is holding the values linearly).
|
|
|
|
+ * The red channel of the texture should contain the thickness remapped between 0 and 1.
|
|
|
|
+ * 0 would mean minimumThickness
|
|
|
|
+ * 1 would mean maximumThickness
|
|
|
|
+ * The other channels might be use as a mask to vary the different effects intensity.
|
|
|
|
+ */
|
|
|
|
+ thicknessTexture: Nullable<BaseTexture>;
|
|
|
|
+ private _refractionTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the texture to use for refraction.
|
|
|
|
+ */
|
|
|
|
+ refractionTexture: Nullable<BaseTexture>;
|
|
|
|
+ private _indexOfRefraction;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the indice of refraction used in the material.
|
|
|
|
+ * https://en.wikipedia.org/wiki/List_of_refractive_indices
|
|
|
|
+ */
|
|
|
|
+ indexOfRefraction: number;
|
|
|
|
+ private _invertRefractionY;
|
|
|
|
+ /**
|
|
|
|
+ * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
|
|
|
|
+ */
|
|
|
|
+ invertRefractionY: boolean;
|
|
|
|
+ private _linkRefractionWithTransparency;
|
|
|
|
+ /**
|
|
|
|
+ * This parameters will make the material used its opacity to control how much it is refracting aginst not.
|
|
|
|
+ * Materials half opaque for instance using refraction could benefit from this control.
|
|
|
|
+ */
|
|
|
|
+ linkRefractionWithTransparency: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the minimum thickness stored in the thickness map.
|
|
|
|
+ * If no thickness map is defined, this value will be used to simulate thickness.
|
|
|
|
+ */
|
|
|
|
+ minimumThickness: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the maximum thickness stored in the thickness map.
|
|
|
|
+ */
|
|
|
|
+ maximumThickness: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the volume tint of the material.
|
|
|
|
+ * This is used for both translucency and scattering.
|
|
|
|
+ */
|
|
|
|
+ tintColor: Color3;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the distance at which the tint color should be found in the media.
|
|
|
|
+ * This is used for refraction only.
|
|
|
|
+ */
|
|
|
|
+ tintColorAtDistance: number;
|
|
|
|
+ /**
|
|
|
|
+ * Defines how far each channel transmit through the media.
|
|
|
|
+ * It is defined as a color to simplify it selection.
|
|
|
|
+ */
|
|
|
|
+ diffusionDistance: Color3;
|
|
|
|
+ private _useMaskFromThicknessTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Stores the intensity of the different subsurface effects in the thickness texture.
|
|
|
|
+ * * the green channel is the translucency intensity.
|
|
|
|
+ * * the blue channel is the scattering intensity.
|
|
|
|
+ * * the alpha channel is the refraction intensity.
|
|
|
|
+ */
|
|
|
|
+ useMaskFromThicknessTexture: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Instantiate a new istance of sub surface configuration.
|
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
|
+ */
|
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
|
+ /**
|
|
|
|
+ * Gets wehter the submesh is ready to be used or not.
|
|
|
|
+ * @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: IMaterialSubSurfaceDefines, 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 to the material belongs to.
|
|
|
|
+ */
|
|
|
|
+ prepareDefines(defines: IMaterialSubSurfaceDefines, 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 engine defines the engine the material belongs to.
|
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
|
+ * @param lodBasedMicrosurface defines wether the material relies on lod based microsurface or not.
|
|
|
|
+ */
|
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, isFrozen: boolean, lodBasedMicrosurface: boolean): void;
|
|
|
|
+ /**
|
|
|
|
+ * Unbinds the material from the mesh.
|
|
|
|
+ * @param activeEffect defines the effect that should be unbound from.
|
|
|
|
+ * @returns true if unbound, otherwise false
|
|
|
|
+ */
|
|
|
|
+ unbind(activeEffect: Effect): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Returns the texture used for refraction or null if none is used.
|
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
|
+ * @returns - Refraction texture if present. If no refraction texture and refraction
|
|
|
|
+ * is linked with transparency, returns environment texture. Otherwise, returns null.
|
|
|
|
+ */
|
|
|
|
+ private _getRefractionTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Returns true if alpha blending should be disabled.
|
|
|
|
+ */
|
|
|
|
+ readonly disableAlphaBlending: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Fills the list of render target textures.
|
|
|
|
+ * @param renderTargets the list of render targets to update
|
|
|
|
+ */
|
|
|
|
+ fillRenderTargetTextures(renderTargets: SmartArray<RenderTargetTexture>): 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;
|
|
|
|
+ /**
|
|
|
|
+ * Gets a boolean indicating that current material needs to register RTT
|
|
|
|
+ * @returns true if this uses a render target otherwise false.
|
|
|
|
+ */
|
|
|
|
+ hasRenderTargetTextures(): 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 "PBRSubSurfaceConfiguration"
|
|
|
|
+ */
|
|
|
|
+ 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: IMaterialSubSurfaceDefines, 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 samplers to the current list.
|
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
|
+ */
|
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
|
+ /**
|
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
|
+ */
|
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
|
+ /**
|
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
|
+ * @param configuration define the config where to copy the info
|
|
|
|
+ */
|
|
|
|
+ copyTo(configuration: PBRSubSurfaceConfiguration): void;
|
|
|
|
+ /**
|
|
|
|
+ * Serializes this Sub Surface configuration.
|
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
|
+ */
|
|
|
|
+ serialize(): any;
|
|
|
|
+ /**
|
|
|
|
+ * Parses a Sub Surface Configuration from a serialized object.
|
|
|
|
+ * @param source - Serialized object.
|
|
|
|
+ */
|
|
|
|
+ parse(source: any): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var pbrFragmentDeclaration: {
|
|
export var pbrFragmentDeclaration: {
|
|
name: string;
|
|
name: string;
|
|
@@ -103411,7 +103901,7 @@ declare module BABYLON {
|
|
* Manages the defines for the PBR Material.
|
|
* Manages the defines for the PBR Material.
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
- export class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines, IMaterialClearCoatDefines, IMaterialAnisotropicDefines, IMaterialBRDFDefines, IMaterialSheenDefines {
|
|
|
|
|
|
+ export class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines, IMaterialClearCoatDefines, IMaterialAnisotropicDefines, IMaterialBRDFDefines, IMaterialSheenDefines, IMaterialSubSurfaceDefines {
|
|
PBR: boolean;
|
|
PBR: boolean;
|
|
MAINUV1: boolean;
|
|
MAINUV1: boolean;
|
|
MAINUV2: boolean;
|
|
MAINUV2: boolean;
|
|
@@ -103488,13 +103978,6 @@ declare module BABYLON {
|
|
RGBDREFLECTION: boolean;
|
|
RGBDREFLECTION: boolean;
|
|
RADIANCEOCCLUSION: boolean;
|
|
RADIANCEOCCLUSION: boolean;
|
|
HORIZONOCCLUSION: boolean;
|
|
HORIZONOCCLUSION: boolean;
|
|
- REFRACTION: boolean;
|
|
|
|
- REFRACTIONMAP_3D: boolean;
|
|
|
|
- REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
- LODINREFRACTIONALPHA: boolean;
|
|
|
|
- GAMMAREFRACTION: boolean;
|
|
|
|
- RGBDREFRACTION: boolean;
|
|
|
|
- LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
INSTANCES: boolean;
|
|
INSTANCES: boolean;
|
|
NUM_BONE_INFLUENCERS: number;
|
|
NUM_BONE_INFLUENCERS: number;
|
|
BonesPerMesh: number;
|
|
BonesPerMesh: number;
|
|
@@ -103550,6 +104033,19 @@ declare module BABYLON {
|
|
SHEEN_TEXTURE: boolean;
|
|
SHEEN_TEXTURE: boolean;
|
|
SHEEN_TEXTUREDIRECTUV: number;
|
|
SHEEN_TEXTUREDIRECTUV: number;
|
|
SHEEN_LINKWITHALBEDO: boolean;
|
|
SHEEN_LINKWITHALBEDO: boolean;
|
|
|
|
+ SUBSURFACE: boolean;
|
|
|
|
+ SS_REFRACTION: boolean;
|
|
|
|
+ SS_TRANSLUCENCY: boolean;
|
|
|
|
+ SS_SCATERRING: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTURE: boolean;
|
|
|
|
+ SS_THICKNESSANDMASK_TEXTUREDIRECTUV: number;
|
|
|
|
+ SS_REFRACTIONMAP_3D: boolean;
|
|
|
|
+ SS_REFRACTIONMAP_OPPOSITEZ: boolean;
|
|
|
|
+ SS_LODINREFRACTIONALPHA: boolean;
|
|
|
|
+ SS_GAMMAREFRACTION: boolean;
|
|
|
|
+ SS_RGBDREFRACTION: boolean;
|
|
|
|
+ SS_LINKREFRACTIONTOTRANSPARENCY: boolean;
|
|
|
|
+ SS_MASK_FROM_THICKNESS_TEXTURE: boolean;
|
|
UNLIT: boolean;
|
|
UNLIT: boolean;
|
|
DEBUGMODE: number;
|
|
DEBUGMODE: number;
|
|
/**
|
|
/**
|
|
@@ -103660,10 +104156,6 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
protected _reflectionTexture: BaseTexture;
|
|
protected _reflectionTexture: BaseTexture;
|
|
/**
|
|
/**
|
|
- * Stores the refraction values in a texture.
|
|
|
|
- */
|
|
|
|
- protected _refractionTexture: BaseTexture;
|
|
|
|
- /**
|
|
|
|
* Stores the emissive values in a texture.
|
|
* Stores the emissive values in a texture.
|
|
*/
|
|
*/
|
|
protected _emissiveTexture: BaseTexture;
|
|
protected _emissiveTexture: BaseTexture;
|
|
@@ -103723,19 +104215,6 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
protected _microSurface: number;
|
|
protected _microSurface: number;
|
|
/**
|
|
/**
|
|
- * source material index of refraction (IOR)' / 'destination material IOR.
|
|
|
|
- */
|
|
|
|
- protected _indexOfRefraction: number;
|
|
|
|
- /**
|
|
|
|
- * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
|
|
|
|
- */
|
|
|
|
- protected _invertRefractionY: boolean;
|
|
|
|
- /**
|
|
|
|
- * This parameters will make the material used its opacity to control how much it is refracting aginst not.
|
|
|
|
- * Materials half opaque for instance using refraction could benefit from this control.
|
|
|
|
- */
|
|
|
|
- protected _linkRefractionWithTransparency: boolean;
|
|
|
|
- /**
|
|
|
|
* Specifies that the material will use the light map as a show map.
|
|
* Specifies that the material will use the light map as a show map.
|
|
*/
|
|
*/
|
|
protected _useLightmapAsShadowmap: boolean;
|
|
protected _useLightmapAsShadowmap: boolean;
|
|
@@ -103945,6 +104424,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
readonly sheen: PBRSheenConfiguration;
|
|
readonly sheen: PBRSheenConfiguration;
|
|
/**
|
|
/**
|
|
|
|
+ * Defines the SubSurface parameters for the material.
|
|
|
|
+ */
|
|
|
|
+ readonly subSurface: PBRSubSurfaceConfiguration;
|
|
|
|
+ /**
|
|
* Custom callback helping to override the default shader used in the material.
|
|
* Custom callback helping to override the default shader used in the material.
|
|
*/
|
|
*/
|
|
customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines) => string;
|
|
customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines) => string;
|
|
@@ -104036,7 +104519,7 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
buildUniformLayout(): void;
|
|
buildUniformLayout(): void;
|
|
/**
|
|
/**
|
|
- * Unbinds the textures.
|
|
|
|
|
|
+ * Unbinds the material from the mesh
|
|
*/
|
|
*/
|
|
unbind(): void;
|
|
unbind(): void;
|
|
/**
|
|
/**
|
|
@@ -104057,12 +104540,6 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
private _getReflectionTexture;
|
|
private _getReflectionTexture;
|
|
/**
|
|
/**
|
|
- * Returns the texture used for refraction or null if none is used.
|
|
|
|
- * @returns - Refection texture if present. If no refraction texture and refraction
|
|
|
|
- * is linked with transparency, returns environment texture. Otherwise, returns null.
|
|
|
|
- */
|
|
|
|
- private _getRefractionTexture;
|
|
|
|
- /**
|
|
|
|
* Returns an array of the actively used textures.
|
|
* Returns an array of the actively used textures.
|
|
* @returns - Array of BaseTextures
|
|
* @returns - Array of BaseTextures
|
|
*/
|
|
*/
|
|
@@ -104200,7 +104677,7 @@ declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Stores the refracted light information in a texture.
|
|
* Stores the refracted light information in a texture.
|
|
*/
|
|
*/
|
|
- refractionTexture: BaseTexture;
|
|
|
|
|
|
+ refractionTexture: Nullable<BaseTexture>;
|
|
/**
|
|
/**
|
|
* The color of a material in ambient lighting.
|
|
* The color of a material in ambient lighting.
|
|
*/
|
|
*/
|