Browse Source

PixelationPassNode: Fix zero normal processing. (#32159)

Michael Herzog 6 months ago
parent
commit
94f32836d0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/jsm/tsl/display/PixelationPassNode.js

+ 1 - 1
examples/jsm/tsl/display/PixelationPassNode.js

@@ -193,7 +193,7 @@ class PixelationNode extends TempNode {
 
 
 			const nei = property( 'float', 'nei' );
 			const nei = property( 'float', 'nei' );
 
 
-			If( this.normalEdgeStrength.greaterThan( 0.0 ), () => {
+			If( this.normalEdgeStrength.greaterThan( 0.0 ).and( normal.length().greaterThan( 0 ) ), () => {
 
 
 				nei.assign( normalEdgeIndicator( depth, normal ) );
 				nei.assign( normalEdgeIndicator( depth, normal ) );
 
 

粤ICP备19079148号