|
|
@@ -994,14 +994,6 @@ class NodeMaterial extends Material {
|
|
|
|
|
|
const materialLightsNode = [];
|
|
|
|
|
|
- if ( builder.renderer.lighting.enabled === false ) {
|
|
|
-
|
|
|
- return materialLightsNode;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- //
|
|
|
-
|
|
|
const envNode = this.setupEnvironment( builder );
|
|
|
|
|
|
if ( envNode && envNode.isLightingNode ) {
|
|
|
@@ -1087,9 +1079,10 @@ class NodeMaterial extends Material {
|
|
|
|
|
|
// OUTGOING LIGHT
|
|
|
|
|
|
- const lights = this.lights === true || this.lightsNode !== null;
|
|
|
+ const sceneLighting = this.lights === true && builder.renderer.lighting.enabled;
|
|
|
+ const lights = sceneLighting || this.lightsNode !== null;
|
|
|
|
|
|
- const materialLightings = this.lights === true ? this.setupMaterialLightings( builder ) : [];
|
|
|
+ const materialLightings = sceneLighting ? this.setupMaterialLightings( builder ) : [];
|
|
|
const lightsNode = lights ? ( this.lightsNode || builder.lightsNode ) : null;
|
|
|
|
|
|
let outgoingLightNode = this.setupOutgoingLight( builder );
|