|
@@ -675,11 +675,10 @@ export class MaterialHelper {
|
|
* @param scene The scene where the light belongs to
|
|
* @param scene The scene where the light belongs to
|
|
* @param effect The effect we are binding the data to
|
|
* @param effect The effect we are binding the data to
|
|
* @param useSpecular Defines if specular is supported
|
|
* @param useSpecular Defines if specular is supported
|
|
- * @param usePhysicalLightFalloff Specifies whether the light falloff is defined physically or not
|
|
|
|
* @param rebuildInParallel Specifies whether the shader is rebuilding in parallel
|
|
* @param rebuildInParallel Specifies whether the shader is rebuilding in parallel
|
|
*/
|
|
*/
|
|
- public static BindLight(light: Light, lightIndex: number, scene: Scene, effect: Effect, useSpecular: boolean, usePhysicalLightFalloff = false, rebuildInParallel = false): void {
|
|
|
|
- light.bindLight(lightIndex, scene, effect, useSpecular, usePhysicalLightFalloff, rebuildInParallel);
|
|
|
|
|
|
+ public static BindLight(light: Light, lightIndex: number, scene: Scene, effect: Effect, useSpecular: boolean, rebuildInParallel = false): void {
|
|
|
|
+ light._bindLight(lightIndex, scene, effect, useSpecular, rebuildInParallel);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -689,16 +688,15 @@ export class MaterialHelper {
|
|
* @param effect The effect we are binding the data to
|
|
* @param effect The effect we are binding the data to
|
|
* @param defines The generated defines for the effect
|
|
* @param defines The generated defines for the effect
|
|
* @param maxSimultaneousLights The maximum number of light that can be bound to the effect
|
|
* @param maxSimultaneousLights The maximum number of light that can be bound to the effect
|
|
- * @param usePhysicalLightFalloff Specifies whether the light falloff is defined physically or not
|
|
|
|
* @param rebuildInParallel Specifies whether the shader is rebuilding in parallel
|
|
* @param rebuildInParallel Specifies whether the shader is rebuilding in parallel
|
|
*/
|
|
*/
|
|
- public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: any, maxSimultaneousLights = 4, usePhysicalLightFalloff = false, rebuildInParallel = false): void {
|
|
|
|
|
|
+ public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: any, maxSimultaneousLights = 4, rebuildInParallel = false): void {
|
|
let len = Math.min(mesh.lightSources.length, maxSimultaneousLights);
|
|
let len = Math.min(mesh.lightSources.length, maxSimultaneousLights);
|
|
|
|
|
|
for (var i = 0; i < len; i++) {
|
|
for (var i = 0; i < len; i++) {
|
|
|
|
|
|
let light = mesh.lightSources[i];
|
|
let light = mesh.lightSources[i];
|
|
- this.BindLight(light, i, scene, effect, typeof defines === "boolean" ? defines : defines["SPECULARTERM"], usePhysicalLightFalloff, rebuildInParallel);
|
|
|
|
|
|
+ this.BindLight(light, i, scene, effect, typeof defines === "boolean" ? defines : defines["SPECULARTERM"], rebuildInParallel);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|