|
@@ -1,8 +1,6 @@
|
|
/// <reference path="../../../dist/preview release/babylon.d.ts"/>
|
|
/// <reference path="../../../dist/preview release/babylon.d.ts"/>
|
|
|
|
|
|
module BABYLON {
|
|
module BABYLON {
|
|
- var maxSimultaneousLights = 4;
|
|
|
|
-
|
|
|
|
class LavaMaterialDefines extends MaterialDefines {
|
|
class LavaMaterialDefines extends MaterialDefines {
|
|
public DIFFUSE = false;
|
|
public DIFFUSE = false;
|
|
public CLIPPLANE = false;
|
|
public CLIPPLANE = false;
|
|
@@ -87,6 +85,9 @@ module BABYLON {
|
|
@serialize()
|
|
@serialize()
|
|
public disableLighting = false;
|
|
public disableLighting = false;
|
|
|
|
|
|
|
|
+ @serialize()
|
|
|
|
+ public maxSimultaneousLights = 4;
|
|
|
|
+
|
|
private _worldViewProjectionMatrix = Matrix.Zero();
|
|
private _worldViewProjectionMatrix = Matrix.Zero();
|
|
private _scaledDiffuse = new Color3();
|
|
private _scaledDiffuse = new Color3();
|
|
private _renderId: number;
|
|
private _renderId: number;
|
|
@@ -182,9 +183,8 @@ module BABYLON {
|
|
this._defines.FOG = true;
|
|
this._defines.FOG = true;
|
|
}
|
|
}
|
|
|
|
|
|
- var lightIndex = 0;
|
|
|
|
if (scene.lightsEnabled && !this.disableLighting) {
|
|
if (scene.lightsEnabled && !this.disableLighting) {
|
|
- MaterialHelper.PrepareDefinesForLights(scene, mesh, this._defines);
|
|
|
|
|
|
+ MaterialHelper.PrepareDefinesForLights(scene, mesh, this._defines, this.maxSimultaneousLights);
|
|
}
|
|
}
|
|
|
|
|
|
// Attribs
|
|
// Attribs
|