Browse Source

VolumetricLightingModel: Fix crash when used with clustered lights (#33896)

Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
Musefit 1 week ago
parent
commit
45ad357601
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/nodes/functions/VolumetricLightingModel.js

+ 2 - 2
src/nodes/functions/VolumetricLightingModel.js

@@ -172,9 +172,9 @@ class VolumetricLightingModel extends LightingModel {
 
 	direct( { lightNode, lightColor }, builder ) {
 
-		// Ignore lights with infinite distance
+		// Ignore non-analytical lights and lights with infinite distance
 
-		if ( lightNode.light.distance === undefined ) return;
+		if ( lightNode.isAnalyticLightNode !== true || lightNode.light.distance === undefined ) return;
 
 		// TODO: We need a viewportOpaque*() ( output, depth ) to fit with modern rendering approaches
 

粤ICP备19079148号