Explorar o código

NodeMaterial: Fix default forceSinglePass & .alphaMap (#26231)

sunag %!s(int64=2) %!d(string=hai) anos
pai
achega
c8075f51e0

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

@@ -29,6 +29,8 @@ class NodeMaterial extends ShaderMaterial {
 
 		this.type = this.constructor.name;
 
+		this.forceSinglePass = false;
+
 		this.lights = true;
 		this.normals = true;
 

+ 0 - 4
examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.js

@@ -141,10 +141,6 @@ class WebGLNodeBuilder extends NodeBuilder {
 				inclusionType: 'append'
 			} ) );
 
-		} else {
-
-			this.addCode( 'fragment', getIncludeSnippet( 'alphatest_fragment' ), 'diffuseColor.a = opacity;', this.shader );
-
 		}
 
 		if ( material.normalNode && material.normalNode.isNode ) {