|
@@ -888,10 +888,6 @@ module BABYLON {
|
|
|
// Diffuse
|
|
|
this._uniformBuffer.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
|
|
|
|
|
|
- // Lights
|
|
|
- if (scene.lightsEnabled && !this.disableLighting) {
|
|
|
- MaterialHelper.BindLights(scene, mesh, this._effect, this._defines, this.maxSimultaneousLights);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
this._uniformBuffer.update();
|
|
@@ -967,6 +963,11 @@ module BABYLON {
|
|
|
this._effect.setMatrix("view", scene.getViewMatrix());
|
|
|
}
|
|
|
|
|
|
+ // Lights
|
|
|
+ if (scene.lightsEnabled && !this.disableLighting) {
|
|
|
+ MaterialHelper.BindLights(scene, mesh, this._effect, this._defines, this.maxSimultaneousLights);
|
|
|
+ }
|
|
|
+
|
|
|
// Fog
|
|
|
MaterialHelper.BindFogParameters(scene, mesh, this._effect);
|
|
|
|