|
@@ -9474,6 +9474,14 @@ declare module "babylonjs/Shaders/ShadersInclude/packingFunctions" {
|
|
shader: string;
|
|
shader: string;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/shadowMapFragmentDeclaration" {
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/packingFunctions";
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapFragmentDeclaration: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration" {
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var clipPlaneFragmentDeclaration: {
|
|
export var clipPlaneFragmentDeclaration: {
|
|
@@ -9488,10 +9496,18 @@ declare module "babylonjs/Shaders/ShadersInclude/clipPlaneFragment" {
|
|
shader: string;
|
|
shader: string;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/shadowMapFragment" {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapFragment: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/shadowMap.fragment" {
|
|
declare module "babylonjs/Shaders/shadowMap.fragment" {
|
|
- import "babylonjs/Shaders/ShadersInclude/packingFunctions";
|
|
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/shadowMapFragmentDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/shadowMapFragment";
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var shadowMapPixelShader: {
|
|
export var shadowMapPixelShader: {
|
|
name: string;
|
|
name: string;
|
|
@@ -9533,6 +9549,13 @@ declare module "babylonjs/Shaders/ShadersInclude/helperFunctions" {
|
|
shader: string;
|
|
shader: string;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/shadowMapVertexDeclaration" {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapVertexDeclaration: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration" {
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var clipPlaneVertexDeclaration: {
|
|
export var clipPlaneVertexDeclaration: {
|
|
@@ -9561,6 +9584,20 @@ declare module "babylonjs/Shaders/ShadersInclude/bonesVertex" {
|
|
shader: string;
|
|
shader: string;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/shadowMapVertexNormalBias" {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapVertexNormalBias: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/shadowMapVertexMetric" {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapVertexMetric: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneVertex" {
|
|
declare module "babylonjs/Shaders/ShadersInclude/clipPlaneVertex" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var clipPlaneVertex: {
|
|
export var clipPlaneVertex: {
|
|
@@ -9574,10 +9611,13 @@ declare module "babylonjs/Shaders/shadowMap.vertex" {
|
|
import "babylonjs/Shaders/ShadersInclude/morphTargetsVertexDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/morphTargetsVertexDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/helperFunctions";
|
|
import "babylonjs/Shaders/ShadersInclude/helperFunctions";
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/shadowMapVertexDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/morphTargetsVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/morphTargetsVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/instancesVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/instancesVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/bonesVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/bonesVertex";
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/shadowMapVertexNormalBias";
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/shadowMapVertexMetric";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
|
|
import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var shadowMapVertexShader: {
|
|
export var shadowMapVertexShader: {
|
|
@@ -15798,12 +15838,14 @@ declare module "babylonjs/Meshes/instancedMesh" {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module "babylonjs/Materials/shaderMaterial" {
|
|
declare module "babylonjs/Materials/shaderMaterial" {
|
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
import { Scene } from "babylonjs/scene";
|
|
import { Scene } from "babylonjs/scene";
|
|
import { Matrix, Vector3, Vector2, Vector4 } from "babylonjs/Maths/math.vector";
|
|
import { Matrix, Vector3, Vector2, Vector4 } from "babylonjs/Maths/math.vector";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
- import { BaseSubMesh } from "babylonjs/Meshes/subMesh";
|
|
|
|
|
|
+ import { SubMesh, BaseSubMesh } from "babylonjs/Meshes/subMesh";
|
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
|
+ import { Effect } from "babylonjs/Materials/effect";
|
|
import { Material } from "babylonjs/Materials/material";
|
|
import { Material } from "babylonjs/Materials/material";
|
|
import { Color3, Color4 } from "babylonjs/Maths/math.color";
|
|
import { Color3, Color4 } from "babylonjs/Maths/math.color";
|
|
/**
|
|
/**
|
|
@@ -15872,6 +15914,7 @@ declare module "babylonjs/Materials/shaderMaterial" {
|
|
private _cachedWorldViewProjectionMatrix;
|
|
private _cachedWorldViewProjectionMatrix;
|
|
private _renderId;
|
|
private _renderId;
|
|
private _multiview;
|
|
private _multiview;
|
|
|
|
+ private _cachedDefines;
|
|
/**
|
|
/**
|
|
* Instantiate a new shader material.
|
|
* Instantiate a new shader material.
|
|
* The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.
|
|
* The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.
|
|
@@ -16071,14 +16114,23 @@ declare module "babylonjs/Materials/shaderMaterial" {
|
|
/**
|
|
/**
|
|
* Binds the world matrix to the material
|
|
* Binds the world matrix to the material
|
|
* @param world defines the world transformation matrix
|
|
* @param world defines the world transformation matrix
|
|
|
|
+ * @param effectOverride - If provided, use this effect instead of internal effect
|
|
*/
|
|
*/
|
|
- bindOnlyWorldMatrix(world: Matrix): void;
|
|
|
|
|
|
+ bindOnlyWorldMatrix(world: Matrix, effectOverride?: Nullable<Effect>): void;
|
|
|
|
+ /**
|
|
|
|
+ * Binds the submesh to this material by preparing the effect and shader to draw
|
|
|
|
+ * @param world defines the world transformation matrix
|
|
|
|
+ * @param mesh defines the mesh containing the submesh
|
|
|
|
+ * @param subMesh defines the submesh to bind the material to
|
|
|
|
+ */
|
|
|
|
+ bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
|
|
/**
|
|
/**
|
|
* Binds the material to the mesh
|
|
* Binds the material to the mesh
|
|
* @param world defines the world transformation matrix
|
|
* @param world defines the world transformation matrix
|
|
* @param mesh defines the mesh to bind the material to
|
|
* @param mesh defines the mesh to bind the material to
|
|
|
|
+ * @param effectOverride - If provided, use this effect instead of internal effect
|
|
*/
|
|
*/
|
|
- bind(world: Matrix, mesh?: Mesh): void;
|
|
|
|
|
|
+ bind(world: Matrix, mesh?: Mesh, effectOverride?: Nullable<Effect>): void;
|
|
protected _afterBind(mesh?: Mesh): void;
|
|
protected _afterBind(mesh?: Mesh): void;
|
|
/**
|
|
/**
|
|
* Gets the active textures from the material
|
|
* Gets the active textures from the material
|
|
@@ -17207,7 +17259,7 @@ declare module "babylonjs/Lights/Shadows/shadowGenerator" {
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeBlurRTTAndPostProcesses(): void;
|
|
protected _initializeBlurRTTAndPostProcesses(): void;
|
|
protected _renderForShadowMap(opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>): void;
|
|
protected _renderForShadowMap(opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>): void;
|
|
- protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect): void;
|
|
|
|
|
|
+ protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect, matriceNames: any): void;
|
|
protected _renderSubMeshForShadowMap(subMesh: SubMesh): void;
|
|
protected _renderSubMeshForShadowMap(subMesh: SubMesh): void;
|
|
protected _applyFilterValues(): void;
|
|
protected _applyFilterValues(): void;
|
|
/**
|
|
/**
|
|
@@ -17227,6 +17279,7 @@ declare module "babylonjs/Lights/Shadows/shadowGenerator" {
|
|
useInstances: boolean;
|
|
useInstances: boolean;
|
|
}>): Promise<void>;
|
|
}>): Promise<void>;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
|
|
+ private _prepareShadowDefines;
|
|
/**
|
|
/**
|
|
* Determine wheter the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).
|
|
* Determine wheter the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).
|
|
* @param subMesh The submesh we want to render in the shadow map
|
|
* @param subMesh The submesh we want to render in the shadow map
|
|
@@ -21588,6 +21641,88 @@ declare module "babylonjs/Materials/Textures/renderTargetTexture" {
|
|
getViewCount(): number;
|
|
getViewCount(): number;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Misc/guid" {
|
|
|
|
+ /**
|
|
|
|
+ * Class used to manipulate GUIDs
|
|
|
|
+ */
|
|
|
|
+ export class GUID {
|
|
|
|
+ /**
|
|
|
|
+ * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
|
+ * Be aware Math.random() could cause collisions, but:
|
|
|
|
+ * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
|
|
|
|
+ * @returns a pseudo random id
|
|
|
|
+ */
|
|
|
|
+ static RandomId(): string;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module "babylonjs/Materials/shadowDepthWrapper" {
|
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
|
+ import { SubMesh } from "babylonjs/Meshes/subMesh";
|
|
|
|
+ import { Material } from "babylonjs/Materials/material";
|
|
|
|
+ import { Effect } from "babylonjs/Materials/effect";
|
|
|
|
+ import { ShadowGenerator } from "babylonjs/Lights/Shadows/shadowGenerator";
|
|
|
|
+ /**
|
|
|
|
+ * Options to be used when creating a shadow depth material
|
|
|
|
+ */
|
|
|
|
+ export interface IIOptionShadowDepthMaterial {
|
|
|
|
+ /** Variables in the vertex shader code that need to have their names remapped.
|
|
|
|
+ * The format is: ["var_name", "var_remapped_name", "var_name", "var_remapped_name", ...]
|
|
|
|
+ * "var_name" should be either: worldPos or vNormalW
|
|
|
|
+ * So, if the variable holding the world position in your vertex shader is not named worldPos, you must tell the system
|
|
|
|
+ * the name to use instead by using: ["worldPos", "myWorldPosVar"] assuming the variable is named myWorldPosVar in your code.
|
|
|
|
+ * If the normal must also be remapped: ["worldPos", "myWorldPosVar", "vNormalW", "myWorldNormal"]
|
|
|
|
+ */
|
|
|
|
+ remappedVariables?: string[];
|
|
|
|
+ /** Set standalone to true if the base material wrapped by ShadowDepthMaterial is not used for a regular object but for depth shadow generation only */
|
|
|
|
+ standalone?: boolean;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Class that can be used to wrap a base material to generate accurate shadows when using custom vertex/fragment code in the base material
|
|
|
|
+ */
|
|
|
|
+ export class ShadowDepthWrapper {
|
|
|
|
+ private _scene;
|
|
|
|
+ private _options?;
|
|
|
|
+ private _baseMaterial;
|
|
|
|
+ private _onEffectCreatedObserver;
|
|
|
|
+ private _subMeshToEffect;
|
|
|
|
+ private _subMeshToDepthEffect;
|
|
|
|
+ private _meshes;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _matriceNames: any;
|
|
|
|
+ /**
|
|
|
|
+ * Instantiate a new shadow depth wrapper.
|
|
|
|
+ * It works by injecting some specific code in the vertex/fragment shaders of the base material and is used by a shadow generator to
|
|
|
|
+ * generate the shadow depth map. For more information, please refer to the documentation:
|
|
|
|
+ * https://doc.babylonjs.com/babylon101/shadows
|
|
|
|
+ * @param baseMaterial Material to wrap
|
|
|
|
+ * @param scene Define the scene the material belongs to
|
|
|
|
+ * @param options Options used to create the wrapper
|
|
|
|
+ */
|
|
|
|
+ constructor(baseMaterial: Material, scene: Scene, options?: IIOptionShadowDepthMaterial);
|
|
|
|
+ /**
|
|
|
|
+ * Gets the effect to use to generate the depth map
|
|
|
|
+ * @param subMesh subMesh to get the effect for
|
|
|
|
+ * @param shadowGenerator shadow generator to get the effect for
|
|
|
|
+ * @returns the effect to use to generate the depth map for the subMesh + shadow generator specified
|
|
|
|
+ */
|
|
|
|
+ getEffect(subMesh: Nullable<SubMesh>, shadowGenerator: ShadowGenerator): Nullable<Effect>;
|
|
|
|
+ /**
|
|
|
|
+ * Specifies that the submesh is ready to be used for depth rendering
|
|
|
|
+ * @param subMesh submesh to check
|
|
|
|
+ * @param defines the list of defines to take into account when checking the effect
|
|
|
|
+ * @param shadowGenerator combined with subMesh, it defines the effect to check
|
|
|
|
+ * @param useInstances specifies that instances should be used
|
|
|
|
+ * @returns a boolean indicating that the submesh is ready or not
|
|
|
|
+ */
|
|
|
|
+ isReadyForSubMesh(subMesh: SubMesh, defines: string[], shadowGenerator: ShadowGenerator, useInstances: boolean): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Disposes the resources
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ private _makeEffect;
|
|
|
|
+ }
|
|
|
|
+}
|
|
declare module "babylonjs/Materials/material" {
|
|
declare module "babylonjs/Materials/material" {
|
|
import { IAnimatable } from "babylonjs/Animations/animatable.interface";
|
|
import { IAnimatable } from "babylonjs/Animations/animatable.interface";
|
|
import { SmartArray } from "babylonjs/Misc/smartArray";
|
|
import { SmartArray } from "babylonjs/Misc/smartArray";
|
|
@@ -21603,6 +21738,7 @@ declare module "babylonjs/Materials/material" {
|
|
import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
|
|
import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
|
|
import { MaterialDefines } from "babylonjs/Materials/materialDefines";
|
|
import { MaterialDefines } from "babylonjs/Materials/materialDefines";
|
|
import { IInspectable } from "babylonjs/Misc/iInspectable";
|
|
import { IInspectable } from "babylonjs/Misc/iInspectable";
|
|
|
|
+ import { ShadowDepthWrapper } from "babylonjs/Materials/shadowDepthWrapper";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
import { Animation } from "babylonjs/Animations/animation";
|
|
import { Animation } from "babylonjs/Animations/animation";
|
|
/**
|
|
/**
|
|
@@ -21708,6 +21844,14 @@ declare module "babylonjs/Materials/material" {
|
|
*/
|
|
*/
|
|
static readonly MATERIAL_ALPHATESTANDBLEND: number;
|
|
static readonly MATERIAL_ALPHATESTANDBLEND: number;
|
|
/**
|
|
/**
|
|
|
|
+ * Custom callback helping to override the default shader used in the material.
|
|
|
|
+ */
|
|
|
|
+ customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: MaterialDefines | string[], attributes?: string[]) => string;
|
|
|
|
+ /**
|
|
|
|
+ * Custom shadow depth material to use for shadow rendering instead of the in-built one
|
|
|
|
+ */
|
|
|
|
+ shadowDepthWrapper: Nullable<ShadowDepthWrapper>;
|
|
|
|
+ /**
|
|
* The ID of the material
|
|
* The ID of the material
|
|
*/
|
|
*/
|
|
id: string;
|
|
id: string;
|
|
@@ -21830,6 +21974,17 @@ declare module "babylonjs/Materials/material" {
|
|
* An event triggered when the material is unbound
|
|
* An event triggered when the material is unbound
|
|
*/
|
|
*/
|
|
get onUnBindObservable(): Observable<Material>;
|
|
get onUnBindObservable(): Observable<Material>;
|
|
|
|
+ protected _onEffectCreatedObservable: Nullable<Observable<{
|
|
|
|
+ effect: Effect;
|
|
|
|
+ subMesh: Nullable<SubMesh>;
|
|
|
|
+ }>>;
|
|
|
|
+ /**
|
|
|
|
+ * An event triggered when the effect is (re)created
|
|
|
|
+ */
|
|
|
|
+ get onEffectCreatedObservable(): Observable<{
|
|
|
|
+ effect: Effect;
|
|
|
|
+ subMesh: Nullable<SubMesh>;
|
|
|
|
+ }>;
|
|
/**
|
|
/**
|
|
* Stores the value of the alpha mode
|
|
* Stores the value of the alpha mode
|
|
*/
|
|
*/
|
|
@@ -22352,6 +22507,8 @@ declare module "babylonjs/Meshes/subMesh" {
|
|
_materialDefines: Nullable<MaterialDefines>;
|
|
_materialDefines: Nullable<MaterialDefines>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_materialEffect: Nullable<Effect>;
|
|
_materialEffect: Nullable<Effect>;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _effectOverride: Nullable<Effect>;
|
|
/**
|
|
/**
|
|
* Gets material defines used by the effect associated to the sub mesh
|
|
* Gets material defines used by the effect associated to the sub mesh
|
|
*/
|
|
*/
|
|
@@ -27866,10 +28023,6 @@ declare module "babylonjs/Materials/standardMaterial" {
|
|
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
*/
|
|
*/
|
|
set cameraColorCurves(value: Nullable<ColorCurves>);
|
|
set cameraColorCurves(value: Nullable<ColorCurves>);
|
|
- /**
|
|
|
|
- * Custom callback helping to override the default shader used in the material.
|
|
|
|
- */
|
|
|
|
- customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines, attributes?: string[]) => string;
|
|
|
|
protected _renderTargets: SmartArray<RenderTargetTexture>;
|
|
protected _renderTargets: SmartArray<RenderTargetTexture>;
|
|
protected _worldViewProjectionMatrix: Matrix;
|
|
protected _worldViewProjectionMatrix: Matrix;
|
|
protected _globalAmbientColor: Color3;
|
|
protected _globalAmbientColor: Color3;
|
|
@@ -30869,20 +31022,6 @@ declare module "babylonjs/Misc/decorators" {
|
|
static Instanciate<T>(creationFunction: () => T, source: T): T;
|
|
static Instanciate<T>(creationFunction: () => T, source: T): T;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-declare module "babylonjs/Misc/guid" {
|
|
|
|
- /**
|
|
|
|
- * Class used to manipulate GUIDs
|
|
|
|
- */
|
|
|
|
- export class GUID {
|
|
|
|
- /**
|
|
|
|
- * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
|
- * Be aware Math.random() could cause collisions, but:
|
|
|
|
- * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
|
|
|
|
- * @returns a pseudo random id
|
|
|
|
- */
|
|
|
|
- static RandomId(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
declare module "babylonjs/Materials/Textures/baseTexture" {
|
|
declare module "babylonjs/Materials/Textures/baseTexture" {
|
|
import { Observable } from "babylonjs/Misc/observable";
|
|
import { Observable } from "babylonjs/Misc/observable";
|
|
import { Nullable } from "babylonjs/types";
|
|
import { Nullable } from "babylonjs/types";
|
|
@@ -31366,6 +31505,7 @@ declare module "babylonjs/Materials/effect" {
|
|
private static _uniqueIdSeed;
|
|
private static _uniqueIdSeed;
|
|
private _engine;
|
|
private _engine;
|
|
private _uniformBuffersNames;
|
|
private _uniformBuffersNames;
|
|
|
|
+ private _uniformBuffersNamesList;
|
|
private _uniformsNames;
|
|
private _uniformsNames;
|
|
private _samplerList;
|
|
private _samplerList;
|
|
private _samplers;
|
|
private _samplers;
|
|
@@ -31467,10 +31607,25 @@ declare module "babylonjs/Materials/effect" {
|
|
getUniform(uniformName: string): Nullable<WebGLUniformLocation>;
|
|
getUniform(uniformName: string): Nullable<WebGLUniformLocation>;
|
|
/**
|
|
/**
|
|
* Returns an array of sampler variable names
|
|
* Returns an array of sampler variable names
|
|
- * @returns The array of sampler variable neames.
|
|
|
|
|
|
+ * @returns The array of sampler variable names.
|
|
*/
|
|
*/
|
|
getSamplers(): string[];
|
|
getSamplers(): string[];
|
|
/**
|
|
/**
|
|
|
|
+ * Returns an array of uniform variable names
|
|
|
|
+ * @returns The array of uniform variable names.
|
|
|
|
+ */
|
|
|
|
+ getUniformNames(): string[];
|
|
|
|
+ /**
|
|
|
|
+ * Returns an array of uniform buffer variable names
|
|
|
|
+ * @returns The array of uniform buffer variable names.
|
|
|
|
+ */
|
|
|
|
+ getUniformBuffersNames(): string[];
|
|
|
|
+ /**
|
|
|
|
+ * Returns the index parameters used to create the effect
|
|
|
|
+ * @returns The index parameters object
|
|
|
|
+ */
|
|
|
|
+ getIndexParameters(): any;
|
|
|
|
+ /**
|
|
* The error from the last compilation.
|
|
* The error from the last compilation.
|
|
* @returns the error string.
|
|
* @returns the error string.
|
|
*/
|
|
*/
|
|
@@ -31488,6 +31643,14 @@ declare module "babylonjs/Materials/effect" {
|
|
private _checkIsReady;
|
|
private _checkIsReady;
|
|
private _loadShader;
|
|
private _loadShader;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets the vertex shader source code of this effect
|
|
|
|
+ */
|
|
|
|
+ get vertexSourceCode(): string;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the fragment shader source code of this effect
|
|
|
|
+ */
|
|
|
|
+ get fragmentSourceCode(): string;
|
|
|
|
+ /**
|
|
* Recompiles the webGL program
|
|
* Recompiles the webGL program
|
|
* @param vertexSourceCode The source code for the vertex shader.
|
|
* @param vertexSourceCode The source code for the vertex shader.
|
|
* @param fragmentSourceCode The source code for the fragment shader.
|
|
* @param fragmentSourceCode The source code for the fragment shader.
|
|
@@ -54187,10 +54350,6 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
* Defines the SubSurface parameters for the material.
|
|
* Defines the SubSurface parameters for the material.
|
|
*/
|
|
*/
|
|
readonly subSurface: PBRSubSurfaceConfiguration;
|
|
readonly subSurface: PBRSubSurfaceConfiguration;
|
|
- /**
|
|
|
|
- * Custom callback helping to override the default shader used in the material.
|
|
|
|
- */
|
|
|
|
- customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines, attributes?: string[]) => string;
|
|
|
|
protected _rebuildInParallel: boolean;
|
|
protected _rebuildInParallel: boolean;
|
|
/**
|
|
/**
|
|
* Instantiates a new PBRMaterial instance.
|
|
* Instantiates a new PBRMaterial instance.
|
|
@@ -57411,7 +57570,7 @@ declare module "babylonjs/Lights/Shadows/cascadedShadowGenerator" {
|
|
protected _initializeGenerator(): void;
|
|
protected _initializeGenerator(): void;
|
|
protected _createTargetRenderTexture(): void;
|
|
protected _createTargetRenderTexture(): void;
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeShadowMap(): void;
|
|
- protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect): void;
|
|
|
|
|
|
+ protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect, matriceNames: any): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
/**
|
|
/**
|
|
* Prepare all the defines in a material relying on a shadow map at the specified light index.
|
|
* Prepare all the defines in a material relying on a shadow map at the specified light index.
|
|
@@ -63906,6 +64065,7 @@ declare module "babylonjs/Materials/index" {
|
|
export * from "babylonjs/Materials/materialFlags";
|
|
export * from "babylonjs/Materials/materialFlags";
|
|
export * from "babylonjs/Materials/Node/index";
|
|
export * from "babylonjs/Materials/Node/index";
|
|
export * from "babylonjs/Materials/effectRenderer";
|
|
export * from "babylonjs/Materials/effectRenderer";
|
|
|
|
+ export * from "babylonjs/Materials/shadowDepthWrapper";
|
|
}
|
|
}
|
|
declare module "babylonjs/Maths/index" {
|
|
declare module "babylonjs/Maths/index" {
|
|
export * from "babylonjs/Maths/math.scalar";
|
|
export * from "babylonjs/Maths/math.scalar";
|
|
@@ -83653,6 +83813,13 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ export var shadowMapFragmentDeclaration: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export var clipPlaneFragmentDeclaration: {
|
|
export var clipPlaneFragmentDeclaration: {
|
|
name: string;
|
|
name: string;
|
|
shader: string;
|
|
shader: string;
|
|
@@ -83667,6 +83834,13 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ export var shadowMapFragment: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export var shadowMapPixelShader: {
|
|
export var shadowMapPixelShader: {
|
|
name: string;
|
|
name: string;
|
|
shader: string;
|
|
shader: string;
|
|
@@ -83709,6 +83883,13 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ export var shadowMapVertexDeclaration: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export var clipPlaneVertexDeclaration: {
|
|
export var clipPlaneVertexDeclaration: {
|
|
name: string;
|
|
name: string;
|
|
shader: string;
|
|
shader: string;
|
|
@@ -83737,6 +83918,20 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ export var shadowMapVertexNormalBias: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var shadowMapVertexMetric: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export var clipPlaneVertex: {
|
|
export var clipPlaneVertex: {
|
|
name: string;
|
|
name: string;
|
|
shader: string;
|
|
shader: string;
|
|
@@ -89787,6 +89982,7 @@ declare module BABYLON {
|
|
private _cachedWorldViewProjectionMatrix;
|
|
private _cachedWorldViewProjectionMatrix;
|
|
private _renderId;
|
|
private _renderId;
|
|
private _multiview;
|
|
private _multiview;
|
|
|
|
+ private _cachedDefines;
|
|
/**
|
|
/**
|
|
* Instantiate a new shader material.
|
|
* Instantiate a new shader material.
|
|
* The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.
|
|
* The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.
|
|
@@ -89986,14 +90182,23 @@ declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Binds the world matrix to the material
|
|
* Binds the world matrix to the material
|
|
* @param world defines the world transformation matrix
|
|
* @param world defines the world transformation matrix
|
|
|
|
+ * @param effectOverride - If provided, use this effect instead of internal effect
|
|
*/
|
|
*/
|
|
- bindOnlyWorldMatrix(world: Matrix): void;
|
|
|
|
|
|
+ bindOnlyWorldMatrix(world: Matrix, effectOverride?: Nullable<Effect>): void;
|
|
|
|
+ /**
|
|
|
|
+ * Binds the submesh to this material by preparing the effect and shader to draw
|
|
|
|
+ * @param world defines the world transformation matrix
|
|
|
|
+ * @param mesh defines the mesh containing the submesh
|
|
|
|
+ * @param subMesh defines the submesh to bind the material to
|
|
|
|
+ */
|
|
|
|
+ bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
|
|
/**
|
|
/**
|
|
* Binds the material to the mesh
|
|
* Binds the material to the mesh
|
|
* @param world defines the world transformation matrix
|
|
* @param world defines the world transformation matrix
|
|
* @param mesh defines the mesh to bind the material to
|
|
* @param mesh defines the mesh to bind the material to
|
|
|
|
+ * @param effectOverride - If provided, use this effect instead of internal effect
|
|
*/
|
|
*/
|
|
- bind(world: Matrix, mesh?: Mesh): void;
|
|
|
|
|
|
+ bind(world: Matrix, mesh?: Mesh, effectOverride?: Nullable<Effect>): void;
|
|
protected _afterBind(mesh?: Mesh): void;
|
|
protected _afterBind(mesh?: Mesh): void;
|
|
/**
|
|
/**
|
|
* Gets the active textures from the material
|
|
* Gets the active textures from the material
|
|
@@ -91054,7 +91259,7 @@ declare module BABYLON {
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeBlurRTTAndPostProcesses(): void;
|
|
protected _initializeBlurRTTAndPostProcesses(): void;
|
|
protected _renderForShadowMap(opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>): void;
|
|
protected _renderForShadowMap(opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>): void;
|
|
- protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect): void;
|
|
|
|
|
|
+ protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect, matriceNames: any): void;
|
|
protected _renderSubMeshForShadowMap(subMesh: SubMesh): void;
|
|
protected _renderSubMeshForShadowMap(subMesh: SubMesh): void;
|
|
protected _applyFilterValues(): void;
|
|
protected _applyFilterValues(): void;
|
|
/**
|
|
/**
|
|
@@ -91074,6 +91279,7 @@ declare module BABYLON {
|
|
useInstances: boolean;
|
|
useInstances: boolean;
|
|
}>): Promise<void>;
|
|
}>): Promise<void>;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
|
|
+ private _prepareShadowDefines;
|
|
/**
|
|
/**
|
|
* Determine wheter the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).
|
|
* Determine wheter the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).
|
|
* @param subMesh The submesh we want to render in the shadow map
|
|
* @param subMesh The submesh we want to render in the shadow map
|
|
@@ -95265,6 +95471,82 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * Class used to manipulate GUIDs
|
|
|
|
+ */
|
|
|
|
+ export class GUID {
|
|
|
|
+ /**
|
|
|
|
+ * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
|
+ * Be aware Math.random() could cause collisions, but:
|
|
|
|
+ * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
|
|
|
|
+ * @returns a pseudo random id
|
|
|
|
+ */
|
|
|
|
+ static RandomId(): string;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
|
|
+ * Options to be used when creating a shadow depth material
|
|
|
|
+ */
|
|
|
|
+ export interface IIOptionShadowDepthMaterial {
|
|
|
|
+ /** Variables in the vertex shader code that need to have their names remapped.
|
|
|
|
+ * The format is: ["var_name", "var_remapped_name", "var_name", "var_remapped_name", ...]
|
|
|
|
+ * "var_name" should be either: worldPos or vNormalW
|
|
|
|
+ * So, if the variable holding the world position in your vertex shader is not named worldPos, you must tell the system
|
|
|
|
+ * the name to use instead by using: ["worldPos", "myWorldPosVar"] assuming the variable is named myWorldPosVar in your code.
|
|
|
|
+ * If the normal must also be remapped: ["worldPos", "myWorldPosVar", "vNormalW", "myWorldNormal"]
|
|
|
|
+ */
|
|
|
|
+ remappedVariables?: string[];
|
|
|
|
+ /** Set standalone to true if the base material wrapped by ShadowDepthMaterial is not used for a regular object but for depth shadow generation only */
|
|
|
|
+ standalone?: boolean;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Class that can be used to wrap a base material to generate accurate shadows when using custom vertex/fragment code in the base material
|
|
|
|
+ */
|
|
|
|
+ export class ShadowDepthWrapper {
|
|
|
|
+ private _scene;
|
|
|
|
+ private _options?;
|
|
|
|
+ private _baseMaterial;
|
|
|
|
+ private _onEffectCreatedObserver;
|
|
|
|
+ private _subMeshToEffect;
|
|
|
|
+ private _subMeshToDepthEffect;
|
|
|
|
+ private _meshes;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _matriceNames: any;
|
|
|
|
+ /**
|
|
|
|
+ * Instantiate a new shadow depth wrapper.
|
|
|
|
+ * It works by injecting some specific code in the vertex/fragment shaders of the base material and is used by a shadow generator to
|
|
|
|
+ * generate the shadow depth map. For more information, please refer to the documentation:
|
|
|
|
+ * https://doc.babylonjs.com/babylon101/shadows
|
|
|
|
+ * @param baseMaterial Material to wrap
|
|
|
|
+ * @param scene Define the scene the material belongs to
|
|
|
|
+ * @param options Options used to create the wrapper
|
|
|
|
+ */
|
|
|
|
+ constructor(baseMaterial: Material, scene: Scene, options?: IIOptionShadowDepthMaterial);
|
|
|
|
+ /**
|
|
|
|
+ * Gets the effect to use to generate the depth map
|
|
|
|
+ * @param subMesh subMesh to get the effect for
|
|
|
|
+ * @param shadowGenerator shadow generator to get the effect for
|
|
|
|
+ * @returns the effect to use to generate the depth map for the subMesh + shadow generator specified
|
|
|
|
+ */
|
|
|
|
+ getEffect(subMesh: Nullable<SubMesh>, shadowGenerator: ShadowGenerator): Nullable<Effect>;
|
|
|
|
+ /**
|
|
|
|
+ * Specifies that the submesh is ready to be used for depth rendering
|
|
|
|
+ * @param subMesh submesh to check
|
|
|
|
+ * @param defines the list of defines to take into account when checking the effect
|
|
|
|
+ * @param shadowGenerator combined with subMesh, it defines the effect to check
|
|
|
|
+ * @param useInstances specifies that instances should be used
|
|
|
|
+ * @returns a boolean indicating that the submesh is ready or not
|
|
|
|
+ */
|
|
|
|
+ isReadyForSubMesh(subMesh: SubMesh, defines: string[], shadowGenerator: ShadowGenerator, useInstances: boolean): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Disposes the resources
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ private _makeEffect;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* Options for compiling materials.
|
|
* Options for compiling materials.
|
|
*/
|
|
*/
|
|
export interface IMaterialCompilationOptions {
|
|
export interface IMaterialCompilationOptions {
|
|
@@ -95367,6 +95649,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static readonly MATERIAL_ALPHATESTANDBLEND: number;
|
|
static readonly MATERIAL_ALPHATESTANDBLEND: number;
|
|
/**
|
|
/**
|
|
|
|
+ * Custom callback helping to override the default shader used in the material.
|
|
|
|
+ */
|
|
|
|
+ customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: MaterialDefines | string[], attributes?: string[]) => string;
|
|
|
|
+ /**
|
|
|
|
+ * Custom shadow depth material to use for shadow rendering instead of the in-built one
|
|
|
|
+ */
|
|
|
|
+ shadowDepthWrapper: Nullable<ShadowDepthWrapper>;
|
|
|
|
+ /**
|
|
* The ID of the material
|
|
* The ID of the material
|
|
*/
|
|
*/
|
|
id: string;
|
|
id: string;
|
|
@@ -95489,6 +95779,17 @@ declare module BABYLON {
|
|
* An event triggered when the material is unbound
|
|
* An event triggered when the material is unbound
|
|
*/
|
|
*/
|
|
get onUnBindObservable(): Observable<Material>;
|
|
get onUnBindObservable(): Observable<Material>;
|
|
|
|
+ protected _onEffectCreatedObservable: Nullable<Observable<{
|
|
|
|
+ effect: Effect;
|
|
|
|
+ subMesh: Nullable<SubMesh>;
|
|
|
|
+ }>>;
|
|
|
|
+ /**
|
|
|
|
+ * An event triggered when the effect is (re)created
|
|
|
|
+ */
|
|
|
|
+ get onEffectCreatedObservable(): Observable<{
|
|
|
|
+ effect: Effect;
|
|
|
|
+ subMesh: Nullable<SubMesh>;
|
|
|
|
+ }>;
|
|
/**
|
|
/**
|
|
* Stores the value of the alpha mode
|
|
* Stores the value of the alpha mode
|
|
*/
|
|
*/
|
|
@@ -95990,6 +96291,8 @@ declare module BABYLON {
|
|
_materialDefines: Nullable<MaterialDefines>;
|
|
_materialDefines: Nullable<MaterialDefines>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_materialEffect: Nullable<Effect>;
|
|
_materialEffect: Nullable<Effect>;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _effectOverride: Nullable<Effect>;
|
|
/**
|
|
/**
|
|
* Gets material defines used by the effect associated to the sub mesh
|
|
* Gets material defines used by the effect associated to the sub mesh
|
|
*/
|
|
*/
|
|
@@ -101338,10 +101641,6 @@ declare module BABYLON {
|
|
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
*/
|
|
*/
|
|
set cameraColorCurves(value: Nullable<ColorCurves>);
|
|
set cameraColorCurves(value: Nullable<ColorCurves>);
|
|
- /**
|
|
|
|
- * Custom callback helping to override the default shader used in the material.
|
|
|
|
- */
|
|
|
|
- customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines, attributes?: string[]) => string;
|
|
|
|
protected _renderTargets: SmartArray<RenderTargetTexture>;
|
|
protected _renderTargets: SmartArray<RenderTargetTexture>;
|
|
protected _worldViewProjectionMatrix: Matrix;
|
|
protected _worldViewProjectionMatrix: Matrix;
|
|
protected _globalAmbientColor: Color3;
|
|
protected _globalAmbientColor: Color3;
|
|
@@ -104257,20 +104556,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
- * Class used to manipulate GUIDs
|
|
|
|
- */
|
|
|
|
- export class GUID {
|
|
|
|
- /**
|
|
|
|
- * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
|
- * Be aware Math.random() could cause collisions, but:
|
|
|
|
- * "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
|
|
|
|
- * @returns a pseudo random id
|
|
|
|
- */
|
|
|
|
- static RandomId(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
* Base class of all the textures in babylon.
|
|
* Base class of all the textures in babylon.
|
|
* It groups all the common properties the materials, post process, lights... might need
|
|
* It groups all the common properties the materials, post process, lights... might need
|
|
* in order to make a correct use of the texture.
|
|
* in order to make a correct use of the texture.
|
|
@@ -104731,6 +105016,7 @@ declare module BABYLON {
|
|
private static _uniqueIdSeed;
|
|
private static _uniqueIdSeed;
|
|
private _engine;
|
|
private _engine;
|
|
private _uniformBuffersNames;
|
|
private _uniformBuffersNames;
|
|
|
|
+ private _uniformBuffersNamesList;
|
|
private _uniformsNames;
|
|
private _uniformsNames;
|
|
private _samplerList;
|
|
private _samplerList;
|
|
private _samplers;
|
|
private _samplers;
|
|
@@ -104832,10 +105118,25 @@ declare module BABYLON {
|
|
getUniform(uniformName: string): Nullable<WebGLUniformLocation>;
|
|
getUniform(uniformName: string): Nullable<WebGLUniformLocation>;
|
|
/**
|
|
/**
|
|
* Returns an array of sampler variable names
|
|
* Returns an array of sampler variable names
|
|
- * @returns The array of sampler variable neames.
|
|
|
|
|
|
+ * @returns The array of sampler variable names.
|
|
*/
|
|
*/
|
|
getSamplers(): string[];
|
|
getSamplers(): string[];
|
|
/**
|
|
/**
|
|
|
|
+ * Returns an array of uniform variable names
|
|
|
|
+ * @returns The array of uniform variable names.
|
|
|
|
+ */
|
|
|
|
+ getUniformNames(): string[];
|
|
|
|
+ /**
|
|
|
|
+ * Returns an array of uniform buffer variable names
|
|
|
|
+ * @returns The array of uniform buffer variable names.
|
|
|
|
+ */
|
|
|
|
+ getUniformBuffersNames(): string[];
|
|
|
|
+ /**
|
|
|
|
+ * Returns the index parameters used to create the effect
|
|
|
|
+ * @returns The index parameters object
|
|
|
|
+ */
|
|
|
|
+ getIndexParameters(): any;
|
|
|
|
+ /**
|
|
* The error from the last compilation.
|
|
* The error from the last compilation.
|
|
* @returns the error string.
|
|
* @returns the error string.
|
|
*/
|
|
*/
|
|
@@ -104853,6 +105154,14 @@ declare module BABYLON {
|
|
private _checkIsReady;
|
|
private _checkIsReady;
|
|
private _loadShader;
|
|
private _loadShader;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets the vertex shader source code of this effect
|
|
|
|
+ */
|
|
|
|
+ get vertexSourceCode(): string;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the fragment shader source code of this effect
|
|
|
|
+ */
|
|
|
|
+ get fragmentSourceCode(): string;
|
|
|
|
+ /**
|
|
* Recompiles the webGL program
|
|
* Recompiles the webGL program
|
|
* @param vertexSourceCode The source code for the vertex shader.
|
|
* @param vertexSourceCode The source code for the vertex shader.
|
|
* @param fragmentSourceCode The source code for the fragment shader.
|
|
* @param fragmentSourceCode The source code for the fragment shader.
|
|
@@ -126264,10 +126573,6 @@ declare module BABYLON {
|
|
* Defines the SubSurface parameters for the material.
|
|
* Defines the SubSurface parameters for the material.
|
|
*/
|
|
*/
|
|
readonly subSurface: PBRSubSurfaceConfiguration;
|
|
readonly subSurface: PBRSubSurfaceConfiguration;
|
|
- /**
|
|
|
|
- * Custom callback helping to override the default shader used in the material.
|
|
|
|
- */
|
|
|
|
- customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines, attributes?: string[]) => string;
|
|
|
|
protected _rebuildInParallel: boolean;
|
|
protected _rebuildInParallel: boolean;
|
|
/**
|
|
/**
|
|
* Instantiates a new PBRMaterial instance.
|
|
* Instantiates a new PBRMaterial instance.
|
|
@@ -129278,7 +129583,7 @@ declare module BABYLON {
|
|
protected _initializeGenerator(): void;
|
|
protected _initializeGenerator(): void;
|
|
protected _createTargetRenderTexture(): void;
|
|
protected _createTargetRenderTexture(): void;
|
|
protected _initializeShadowMap(): void;
|
|
protected _initializeShadowMap(): void;
|
|
- protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect): void;
|
|
|
|
|
|
+ protected _bindCustomEffectForRenderSubMeshForShadowMap(subMesh: SubMesh, effect: Effect, matriceNames: any): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
protected _isReadyCustomDefines(defines: any, subMesh: SubMesh, useInstances: boolean): void;
|
|
/**
|
|
/**
|
|
* Prepare all the defines in a material relying on a shadow map at the specified light index.
|
|
* Prepare all the defines in a material relying on a shadow map at the specified light index.
|