Parcourir la source

NodeMaterial: Prioritize .depthNode (#27244)

sunag il y a 1 an
Parent
commit
53f07e7009
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      examples/jsm/nodes/materials/NodeMaterial.js

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

@@ -130,7 +130,7 @@ class NodeMaterial extends ShaderMaterial {
 
 		let depthNode = this.depthNode;
 
-		if ( renderer.logarithmicDepthBuffer === true ) {
+		if ( depthNode === null && renderer.logarithmicDepthBuffer === true ) {
 
 			const fragDepth = modelViewProjection().w.add( 1 );