|
@@ -9344,6 +9344,13 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
+ export var shadowMapFragmentDeclaration: {
|
|
|
+ name: string;
|
|
|
+ shader: string;
|
|
|
+ };
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /** @hidden */
|
|
|
export var clipPlaneFragmentDeclaration: {
|
|
|
name: string;
|
|
|
shader: string;
|
|
@@ -9358,6 +9365,13 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
+ export var shadowMapFragment: {
|
|
|
+ name: string;
|
|
|
+ shader: string;
|
|
|
+ };
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /** @hidden */
|
|
|
export var shadowMapPixelShader: {
|
|
|
name: string;
|
|
|
shader: string;
|
|
@@ -9400,6 +9414,13 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
+ export var shadowMapVertexDeclaration: {
|
|
|
+ name: string;
|
|
|
+ shader: string;
|
|
|
+ };
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /** @hidden */
|
|
|
export var clipPlaneVertexDeclaration: {
|
|
|
name: string;
|
|
|
shader: string;
|
|
@@ -9428,6 +9449,20 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/** @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: {
|
|
|
name: string;
|
|
|
shader: string;
|
|
@@ -9475,6 +9510,7 @@ declare module BABYLON {
|
|
|
length?: number);
|
|
|
/**
|
|
|
* Checks if the ray intersects a box
|
|
|
+ * This does not account for the ray lenght by design to improve perfs.
|
|
|
* @param minimum bound of the box
|
|
|
* @param maximum bound of the box
|
|
|
* @param intersectionTreshold extra extend to be added to the box in all direction
|
|
@@ -9483,6 +9519,7 @@ declare module BABYLON {
|
|
|
intersectsBoxMinMax(minimum: DeepImmutable<Vector3>, maximum: DeepImmutable<Vector3>, intersectionTreshold?: number): boolean;
|
|
|
/**
|
|
|
* Checks if the ray intersects a box
|
|
|
+ * This does not account for the ray lenght by design to improve perfs.
|
|
|
* @param box the bounding box to check
|
|
|
* @param intersectionTreshold extra extend to be added to the BoundingBox in all direction
|
|
|
* @returns if the box was hit
|
|
@@ -10469,7 +10506,7 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
- interface Engine {
|
|
|
+ interface ThinEngine {
|
|
|
/**
|
|
|
* Creates a raw texture
|
|
|
* @param data defines the data to store in the texture
|
|
@@ -15476,6 +15513,7 @@ declare module BABYLON {
|
|
|
private _cachedWorldViewProjectionMatrix;
|
|
|
private _renderId;
|
|
|
private _multiview;
|
|
|
+ private _cachedDefines;
|
|
|
/**
|
|
|
* 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.
|
|
@@ -15675,14 +15713,23 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Binds the world matrix to the material
|
|
|
* @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
|
|
|
* @param world defines the world transformation matrix
|
|
|
* @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;
|
|
|
/**
|
|
|
* Gets the active textures from the material
|
|
@@ -16743,7 +16790,7 @@ declare module BABYLON {
|
|
|
protected _initializeShadowMap(): void;
|
|
|
protected _initializeBlurRTTAndPostProcesses(): 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 _applyFilterValues(): void;
|
|
|
/**
|
|
@@ -16763,6 +16810,7 @@ declare module BABYLON {
|
|
|
useInstances: boolean;
|
|
|
}>): Promise<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).
|
|
|
* @param subMesh The submesh we want to render in the shadow map
|
|
@@ -20954,6 +21002,86 @@ 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;
|
|
|
+ /** Gets the standalone status of the wrapper */
|
|
|
+ get standalone(): boolean;
|
|
|
+ /** Gets the base material the wrapper is built upon */
|
|
|
+ get baseMaterial(): Material;
|
|
|
+ /**
|
|
|
+ * 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.
|
|
|
*/
|
|
|
export interface IMaterialCompilationOptions {
|
|
@@ -21056,6 +21184,14 @@ declare module BABYLON {
|
|
|
*/
|
|
|
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
|
|
|
*/
|
|
|
id: string;
|
|
@@ -21178,6 +21314,17 @@ declare module BABYLON {
|
|
|
* An event triggered when the material is unbound
|
|
|
*/
|
|
|
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
|
|
|
*/
|
|
@@ -21679,6 +21826,8 @@ declare module BABYLON {
|
|
|
_materialDefines: Nullable<MaterialDefines>;
|
|
|
/** @hidden */
|
|
|
_materialEffect: Nullable<Effect>;
|
|
|
+ /** @hidden */
|
|
|
+ _effectOverride: Nullable<Effect>;
|
|
|
/**
|
|
|
* Gets material defines used by the effect associated to the sub mesh
|
|
|
*/
|
|
@@ -27027,10 +27176,6 @@ declare module BABYLON {
|
|
|
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
|
*/
|
|
|
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 _worldViewProjectionMatrix: Matrix;
|
|
|
protected _globalAmbientColor: Color3;
|
|
@@ -29946,20 +30091,6 @@ 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.
|
|
|
* It groups all the common properties the materials, post process, lights... might need
|
|
|
* in order to make a correct use of the texture.
|
|
@@ -30420,6 +30551,7 @@ declare module BABYLON {
|
|
|
private static _uniqueIdSeed;
|
|
|
private _engine;
|
|
|
private _uniformBuffersNames;
|
|
|
+ private _uniformBuffersNamesList;
|
|
|
private _uniformsNames;
|
|
|
private _samplerList;
|
|
|
private _samplers;
|
|
@@ -30521,10 +30653,25 @@ declare module BABYLON {
|
|
|
getUniform(uniformName: string): Nullable<WebGLUniformLocation>;
|
|
|
/**
|
|
|
* Returns an array of sampler variable names
|
|
|
- * @returns The array of sampler variable neames.
|
|
|
+ * @returns The array of sampler variable names.
|
|
|
*/
|
|
|
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.
|
|
|
* @returns the error string.
|
|
|
*/
|
|
@@ -30542,6 +30689,14 @@ declare module BABYLON {
|
|
|
private _checkIsReady;
|
|
|
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
|
|
|
* @param vertexSourceCode The source code for the vertex shader.
|
|
|
* @param fragmentSourceCode The source code for the fragment shader.
|
|
@@ -32129,63 +32284,6 @@ declare module BABYLON {
|
|
|
* @hidden
|
|
|
*/
|
|
|
_rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<any>, internalFormat: number, onComplete: () => void): void;
|
|
|
- /**
|
|
|
- * Creates a raw texture
|
|
|
- * @param data defines the data to store in the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
|
|
|
- * @returns the raw texture inside an InternalTexture
|
|
|
- */
|
|
|
- createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw cube texture
|
|
|
- * @param data defines the array of data to use to create each face
|
|
|
- * @param size defines the size of the textures
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @returns the cube texture as an InternalTexture
|
|
|
- */
|
|
|
- createRawCubeTexture(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 3D texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the depth of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 3D texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture3D(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 2D array texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the number of layers of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 2D array texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture2DArray(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
private _unpackFlipYCached;
|
|
|
/**
|
|
|
* In case you are sharing the context with other applications, it might
|
|
@@ -34084,8 +34182,6 @@ declare module BABYLON {
|
|
|
* @param postProcess The post process which's output should be bound
|
|
|
*/
|
|
|
setTextureFromPostProcessOutput(channel: number, postProcess: Nullable<PostProcess>): void;
|
|
|
- /** @hidden */
|
|
|
- _convertRGBtoRGBATextureData(rgbData: any, width: number, height: number, textureType: number): ArrayBufferView;
|
|
|
protected _rebuildBuffers(): void;
|
|
|
/** @hidden */
|
|
|
_renderFrame(): void;
|
|
@@ -51953,10 +52049,6 @@ declare module BABYLON {
|
|
|
* Defines the SubSurface parameters for the material.
|
|
|
*/
|
|
|
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;
|
|
|
/**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
@@ -54967,7 +55059,7 @@ declare module BABYLON {
|
|
|
protected _initializeGenerator(): void;
|
|
|
protected _createTargetRenderTexture(): 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;
|
|
|
/**
|
|
|
* Prepare all the defines in a material relying on a shadow map at the specified light index.
|
|
@@ -55511,11 +55603,13 @@ declare module BABYLON {
|
|
|
declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
export class OimoJSPlugin implements IPhysicsEnginePlugin {
|
|
|
+ private _useDeltaForWorldStep;
|
|
|
world: any;
|
|
|
name: string;
|
|
|
BJSOIMO: any;
|
|
|
private _raycastResult;
|
|
|
- constructor(iterations?: number, oimoInjection?: any);
|
|
|
+ private _fixedTimeStep;
|
|
|
+ constructor(_useDeltaForWorldStep?: boolean, iterations?: number, oimoInjection?: any);
|
|
|
setGravity(gravity: Vector3): void;
|
|
|
setTimeStep(timeStep: number): void;
|
|
|
getTimeStep(): number;
|
|
@@ -56386,10 +56480,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export class ColorGradingTexture extends BaseTexture {
|
|
|
/**
|
|
|
- * The current texture matrix. (will always be identity in color grading texture)
|
|
|
- */
|
|
|
- private _textureMatrix;
|
|
|
- /**
|
|
|
* The texture URL.
|
|
|
*/
|
|
|
url: string;
|
|
@@ -56397,14 +56487,21 @@ declare module BABYLON {
|
|
|
* Empty line regex stored for GC.
|
|
|
*/
|
|
|
private static _noneEmptyLineRegex;
|
|
|
+ private _textureMatrix;
|
|
|
private _engine;
|
|
|
+ private _onLoad;
|
|
|
/**
|
|
|
* Instantiates a ColorGradingTexture from the following parameters.
|
|
|
*
|
|
|
* @param url The location of the color gradind data (currently only supporting 3dl)
|
|
|
- * @param scene The scene the texture will be used in
|
|
|
+ * @param sceneOrEngine The scene or engine the texture will be used in
|
|
|
+ * @param onLoad defines a callback triggered when the texture has been loaded
|
|
|
+ */
|
|
|
+ constructor(url: string, sceneOrEngine: Scene | ThinEngine, onLoad?: Nullable<() => void>);
|
|
|
+ /**
|
|
|
+ * Fires the onload event from the constructor if requested.
|
|
|
*/
|
|
|
- constructor(url: string, scene: Scene);
|
|
|
+ private _triggerOnLoad;
|
|
|
/**
|
|
|
* Returns the texture matrix used in most of the material.
|
|
|
* This is not used in color grading but keep for troubleshooting purpose (easily swap diffuse by colorgrading to look in).
|
|
@@ -56438,6 +56535,11 @@ declare module BABYLON {
|
|
|
* Serializes the LUT texture to json format.
|
|
|
*/
|
|
|
serialize(): any;
|
|
|
+ /**
|
|
|
+ * Returns true if the passed parameter is a scene object (can be use for typings)
|
|
|
+ * @param sceneOrEngine The object to test.
|
|
|
+ */
|
|
|
+ private static _isScene;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -79751,6 +79853,7 @@ declare module BABYLON {
|
|
|
Vertex_MainBegin: string;
|
|
|
Vertex_Before_PositionUpdated: string;
|
|
|
Vertex_Before_NormalUpdated: string;
|
|
|
+ Vertex_After_WorldPosComputed: string;
|
|
|
Vertex_MainEnd: string;
|
|
|
}
|
|
|
export class CustomMaterial extends BABYLON.StandardMaterial {
|
|
@@ -79767,7 +79870,7 @@ declare module BABYLON {
|
|
|
VertexShader: string;
|
|
|
AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
|
|
|
ReviewUniform(name: string, arr: string[]): string[];
|
|
|
- Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.StandardMaterialDefines, attributes?: string[]): string;
|
|
|
+ Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.MaterialDefines | string[], attributes?: string[]): string;
|
|
|
constructor(name: string, scene: BABYLON.Scene);
|
|
|
AddUniform(name: string, kind: string, param: any): CustomMaterial;
|
|
|
AddAttribute(name: string): CustomMaterial;
|
|
@@ -79784,6 +79887,7 @@ declare module BABYLON {
|
|
|
Vertex_MainBegin(shaderPart: string): CustomMaterial;
|
|
|
Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
|
|
|
Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
|
|
|
+ Vertex_After_WorldPosComputed(shaderPart: string): CustomMaterial;
|
|
|
Vertex_MainEnd(shaderPart: string): CustomMaterial;
|
|
|
}
|
|
|
}
|
|
@@ -79805,6 +79909,7 @@ declare module BABYLON {
|
|
|
Vertex_MainBegin: string;
|
|
|
Vertex_Before_PositionUpdated: string;
|
|
|
Vertex_Before_NormalUpdated: string;
|
|
|
+ Vertex_After_WorldPosComputed: string;
|
|
|
Vertex_MainEnd: string;
|
|
|
}
|
|
|
export class PBRCustomMaterial extends BABYLON.PBRMaterial {
|
|
@@ -79821,7 +79926,7 @@ declare module BABYLON {
|
|
|
VertexShader: string;
|
|
|
AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
|
|
|
ReviewUniform(name: string, arr: string[]): string[];
|
|
|
- Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.PBRMaterialDefines, attributes?: string[]): string;
|
|
|
+ Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.MaterialDefines | string[], attributes?: string[]): string;
|
|
|
constructor(name: string, scene: BABYLON.Scene);
|
|
|
AddUniform(name: string, kind: string, param: any): PBRCustomMaterial;
|
|
|
AddAttribute(name: string): PBRCustomMaterial;
|
|
@@ -79840,6 +79945,7 @@ declare module BABYLON {
|
|
|
Vertex_MainBegin(shaderPart: string): PBRCustomMaterial;
|
|
|
Vertex_Before_PositionUpdated(shaderPart: string): PBRCustomMaterial;
|
|
|
Vertex_Before_NormalUpdated(shaderPart: string): PBRCustomMaterial;
|
|
|
+ Vertex_After_WorldPosComputed(shaderPart: string): PBRCustomMaterial;
|
|
|
Vertex_MainEnd(shaderPart: string): PBRCustomMaterial;
|
|
|
}
|
|
|
}
|