Browse Source

unnecessary environmentIntensity in StandardNode

SUNAG 9 years ago
parent
commit
c366bd48cc

+ 0 - 9
examples/js/nodes/materials/StandardNode.js

@@ -120,7 +120,6 @@ THREE.StandardNode.prototype.build = function( builder ) {
 		if ( this.normalScale && this.normal ) this.normalScale.verify( builder );
 
 		if ( this.environment ) this.environment.verify( builder, 'env', requires ); // isolate environment from others inputs ( see TextureNode, CubeTextureNode )
-		if ( this.environmentIntensity && this.environment ) this.environmentIntensity.verify( builder );
 
 		// build code
 
@@ -139,7 +138,6 @@ THREE.StandardNode.prototype.build = function( builder ) {
 		var normalScale = this.normalScale && this.normal ? this.normalScale.buildCode( builder, 'v2' ) : undefined;
 
 		var environment = this.environment ? this.environment.buildCode( builder, 'c', 'env', requires ) : undefined;
-		var environmentIntensity = this.environmentIntensity && this.environment ? this.environmentIntensity.buildCode( builder, 'fv1' ) : undefined;
 
 		material.requestAttrib.transparent = alpha != undefined;
 
@@ -254,13 +252,6 @@ THREE.StandardNode.prototype.build = function( builder ) {
 			output.push( environment.code );
 			output.push( "RE_IndirectSpecular(" + environment.result + ", geometry, material, reflectedLight );" );
 
-			if ( environmentIntensity ) {
-
-				output.push( environmentIntensity.code );
-				output.push( "reflectedLight.indirectSpecular *= " + environmentIntensity.result + ";" );
-
-			}
-
 		}
 
 		output.push( "vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular;" );

+ 1 - 1
examples/js/nodes/materials/StandardNodeMaterial.js

@@ -14,4 +14,4 @@ THREE.StandardNodeMaterial.prototype = Object.create( THREE.NodeMaterial.prototy
 THREE.StandardNodeMaterial.prototype.constructor = THREE.StandardNodeMaterial;
 
 THREE.NodeMaterial.addShortcuts( THREE.StandardNodeMaterial.prototype, 'node',
-[ 'color', 'alpha', 'roughness', 'metalness', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentIntensity', 'transform' ] );
+[ 'color', 'alpha', 'roughness', 'metalness', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'transform' ] );