Explorar el Código

WebGPURenderer: Apply setupDepth even if fragmentNode isn't null (#28043)

Renaud Rohlinger hace 1 año
padre
commit
9b5d69776d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      examples/jsm/nodes/materials/NodeMaterial.js

+ 2 - 2
examples/jsm/nodes/materials/NodeMaterial.js

@@ -96,9 +96,9 @@ class NodeMaterial extends ShaderMaterial {
 
 		const clippingNode = this.setupClipping( builder );
 
-		if ( this.fragmentNode === null ) {
+		if ( this.depthWrite === true ) this.setupDepth( builder );
 
-			if ( this.depthWrite === true ) this.setupDepth( builder );
+		if ( this.fragmentNode === null ) {
 
 			if ( this.normals === true ) this.setupNormal( builder );