提交 6a0c4bd0 编写于 作者: S SUNAG

renamed environmentAlpha to environmentIntensity

上级 48d93817
......@@ -114,7 +114,7 @@ THREE.PhongNode.prototype.build = function( builder ) {
if ( this.normalScale && this.normal ) this.normalScale.verify( builder );
if ( this.environment ) this.environment.verify( builder );
if ( this.environmentAlpha && this.environment ) this.environmentAlpha.verify( builder );
if ( this.environmentIntensity && this.environment ) this.environmentIntensity.verify( builder );
// build code
......@@ -133,7 +133,7 @@ THREE.PhongNode.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' ) : undefined;
var environmentAlpha = this.environmentAlpha && this.environment ? this.environmentAlpha.buildCode( builder, 'fv1' ) : undefined;
var environmentIntensity = this.environmentIntensity && this.environment ? this.environmentIntensity.buildCode( builder, 'fv1' ) : undefined;
material.requestAttrib.transparent = alpha != undefined;
......@@ -236,11 +236,11 @@ THREE.PhongNode.prototype.build = function( builder ) {
output.push( environment.code );
if ( environmentAlpha ) {
if ( environmentIntensity ) {
output.push( environmentAlpha.code );
output.push( environmentIntensity.code );
output.push( "outgoingLight = mix(" + 'outgoingLight' + "," + environment.result + "," + environmentAlpha.result + ");" );
output.push( "outgoingLight = mix(" + 'outgoingLight' + "," + environment.result + "," + environmentIntensity.result + ");" );
}
else {
......
......@@ -14,4 +14,4 @@ THREE.PhongNodeMaterial.prototype = Object.create( THREE.NodeMaterial.prototype
THREE.PhongNodeMaterial.prototype.constructor = THREE.PhongNodeMaterial;
THREE.NodeMaterial.Shortcuts( THREE.PhongNodeMaterial.prototype, 'node',
[ 'color', 'alpha', 'specular', 'shininess', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentAlpha', 'transform' ] );
[ 'color', 'alpha', 'specular', 'shininess', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentIntensity', 'transform' ] );
......@@ -120,7 +120,7 @@ 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.environmentAlpha && this.environment ) this.environmentAlpha.verify( builder );
if ( this.environmentIntensity && this.environment ) this.environmentIntensity.verify( builder );
// build code
......@@ -139,7 +139,7 @@ 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 environmentAlpha = this.environmentAlpha && this.environment ? this.environmentAlpha.buildCode( builder, 'fv1' ) : undefined;
var environmentIntensity = this.environmentIntensity && this.environment ? this.environmentIntensity.buildCode( builder, 'fv1' ) : undefined;
material.requestAttrib.transparent = alpha != undefined;
......@@ -254,10 +254,10 @@ THREE.StandardNode.prototype.build = function( builder ) {
output.push( environment.code );
output.push( "RE_IndirectSpecular(" + environment.result + ", geometry, material, reflectedLight );" );
if ( environmentAlpha ) {
if ( environmentIntensity ) {
output.push( environmentAlpha.code );
output.push( "reflectedLight.indirectSpecular *= " + environmentAlpha.result + ";" );
output.push( environmentIntensity.code );
output.push( "reflectedLight.indirectSpecular *= " + environmentIntensity.result + ";" );
}
......
......@@ -14,4 +14,4 @@ THREE.StandardNodeMaterial.prototype = Object.create( THREE.NodeMaterial.prototy
THREE.StandardNodeMaterial.prototype.constructor = THREE.StandardNodeMaterial;
THREE.NodeMaterial.Shortcuts( THREE.StandardNodeMaterial.prototype, 'node',
[ 'color', 'alpha', 'roughness', 'metalness', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentAlpha', 'transform' ] );
[ 'color', 'alpha', 'roughness', 'metalness', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentIntensity', 'transform' ] );
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册