Browse Source

WebGPURenderer: Fix shadows being drawn on objects with receiveShadow=false (#28874)

Renaud Rohlinger 1 year ago
parent
commit
20d6ad1b31
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/nodes/lighting/AnalyticLightNode.js

+ 7 - 1
src/nodes/lighting/AnalyticLightNode.js

@@ -54,7 +54,13 @@ class AnalyticLightNode extends LightingNode {
 
 		const { object } = builder;
 
-		if ( object.receiveShadow === false ) return;
+		if ( object.receiveShadow === false ) {
+
+			this.colorNode = this._defaultColorNode;
+
+			return;
+
+		}
 
 		let shadowNode = this.shadowNode;