소스 검색

Renamed *Tint to *Color. (#22748)

* Renamed *Tint to *Color.

* Renamed SpecularTint to SpecularColor in ShaderNode.

* Clean up.
Mr.doob 3 년 전
부모
커밋
e962f378a7
28개의 변경된 파일117개의 추가작업 그리고 117개의 파일을 삭제
  1. 3 3
      docs/api/en/materials/MeshPhysicalMaterial.html
  2. 3 3
      docs/api/zh/materials/MeshPhysicalMaterial.html
  3. 2 2
      editor/js/Sidebar.Material.js
  4. 3 3
      editor/js/Strings.js
  5. 1 1
      examples/js/exporters/GLTFExporter.js
  6. 5 5
      examples/js/loaders/GLTFLoader.js
  7. 1 1
      examples/jsm/exporters/GLTFExporter.js
  8. 6 6
      examples/jsm/loaders/GLTFLoader.js
  9. 1 1
      examples/jsm/nodes/materials/StandardNodeMaterial.js
  10. 6 6
      examples/jsm/nodes/materials/nodes/StandardNode.js
  11. 1 1
      examples/jsm/renderers/nodes/ShaderNode.js
  12. 4 4
      examples/jsm/renderers/nodes/accessors/MaterialNode.js
  13. 2 2
      examples/jsm/renderers/nodes/functions/BSDFs.js
  14. 1 1
      examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js
  15. 4 4
      examples/webgl_materials_physical_transmission.html
  16. 5 5
      src/loaders/MaterialLoader.js
  17. 4 4
      src/materials/Material.js
  18. 15 15
      src/materials/MeshPhysicalMaterial.js
  19. 2 2
      src/renderers/shaders/ShaderChunk/bsdfs.glsl.js
  20. 8 8
      src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js
  21. 2 2
      src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js
  22. 1 1
      src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js
  23. 1 1
      src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.js
  24. 5 5
      src/renderers/shaders/ShaderLib.js
  25. 6 6
      src/renderers/shaders/ShaderLib/meshphysical.glsl.js
  26. 11 11
      src/renderers/webgl/WebGLMaterials.js
  27. 6 6
      src/renderers/webgl/WebGLProgram.js
  28. 8 8
      src/renderers/webgl/WebGLPrograms.js

+ 3 - 3
docs/api/en/materials/MeshPhysicalMaterial.html

@@ -148,14 +148,14 @@
 			over sheen roughness. Default is *null*.
 		</p>
 
-		<h3>[property:Color sheenTint]</h3>
+		<h3>[property:Color sheenColor]</h3>
 		<p>
 			The sheen tint. Default is *0xffffff*, white.
 		</p>
 
-		<h3>[property:Texture sheenTintMap]</h3>
+		<h3>[property:Texture sheenColorMap]</h3>
 		<p>
-			The RGB channels of this texture are multiplied against [page:.sheenTint], for per-pixel control
+			The RGB channels of this texture are multiplied against [page:.sheenColor], for per-pixel control
 			over sheen tint. Default is *null*.
 		</p>
 

+ 3 - 3
docs/api/zh/materials/MeshPhysicalMaterial.html

@@ -145,14 +145,14 @@
 			over sheen roughness. Default is *null*.
 		</p>
 
-		<h3>[property:Color sheenTint]</h3>
+		<h3>[property:Color sheenColor]</h3>
 		<p>
 			The sheen tint. Default is *0xffffff*, white.
 		</p>
 
-		<h3>[property:Texture sheenTintMap]</h3>
+		<h3>[property:Texture sheenColorMap]</h3>
 		<p>
-			The RGB channels of this texture are multiplied against [page:.sheenTint], for per-pixel control
+			The RGB channels of this texture are multiplied against [page:.sheenColor], for per-pixel control
 			over sheen tint. Default is *null*.
 		</p>
 

+ 2 - 2
editor/js/Sidebar.Material.js

@@ -142,8 +142,8 @@ function SidebarMaterial( editor ) {
 
 	// attenuation tint
 
-	const materialAttenuationTint = new SidebarMaterialColorProperty( editor, 'attenuationTint', strings.getKey( 'sidebar/material/attenuationTint' ) );
-	container.add( materialAttenuationTint );
+	const materialAttenuationColor = new SidebarMaterialColorProperty( editor, 'attenuationColor', strings.getKey( 'sidebar/material/attenuationColor' ) );
+	container.add( materialAttenuationColor );
 
 	// thickness
 

+ 3 - 3
editor/js/Strings.js

@@ -251,7 +251,7 @@ function Strings( config ) {
 			'sidebar/material/clearcoatroughness': 'Clearcoat Roughness',
 			'sidebar/material/transmission': 'Transmission',
 			'sidebar/material/attenuationDistance': 'Attenuation Distance',
-			'sidebar/material/attenuationTint': 'Attenuation Tint',
+			'sidebar/material/attenuationColor': 'Attenuation Color',
 			'sidebar/material/thickness': 'Thickness',
 			'sidebar/material/vertexcolors': 'Vertex Colors',
 			'sidebar/material/matcap': 'Matcap',
@@ -579,7 +579,7 @@ function Strings( config ) {
 			'sidebar/material/clearcoatroughness': 'Rugosité du vernis',
 			'sidebar/material/transmission': 'Transmission',
 			'sidebar/material/attenuationDistance': 'Attenuation Distance',
-			'sidebar/material/attenuationTint': 'Attenuation Tint',
+			'sidebar/material/attenuationColor': 'Attenuation Color',
 			'sidebar/material/thickness': 'Thickness',
 			'sidebar/material/vertexcolors': 'Couleurs aux Sommets',
 			'sidebar/material/matcap': 'Matcap',
@@ -907,7 +907,7 @@ function Strings( config ) {
 			'sidebar/material/clearcoatroughness': '清漆粗糙度',
 			'sidebar/material/transmission': '透光',
 			'sidebar/material/attenuationDistance': '衰减距离',
-			'sidebar/material/attenuationTint': '衰减色彩',
+			'sidebar/material/attenuationColor': 'Attenuation Color',
 			'sidebar/material/thickness': '厚度',
 			'sidebar/material/vertexcolors': '顶点颜色',
 			'sidebar/material/matcap': '材质捕获',

+ 1 - 1
examples/js/exporters/GLTFExporter.js

@@ -2143,7 +2143,7 @@
 			}
 
 			extensionDef.attenuationDistance = material.attenuationDistance;
-			extensionDef.attenuationColor = material.attenuationTint.toArray();
+			extensionDef.attenuationColor = material.attenuationColor.toArray();
 			materialDef.extensions = materialDef.extensions || {};
 			materialDef.extensions[ this.name ] = extensionDef;
 			extensionsUsed[ this.name ] = true;

+ 5 - 5
examples/js/loaders/GLTFLoader.js

@@ -636,14 +636,14 @@
 			}
 
 			const pending = [];
-			materialParams.sheenTint = new THREE.Color( 0, 0, 0 );
+			materialParams.sheenColor = new THREE.Color( 0, 0, 0 );
 			materialParams.sheenRoughness = 0;
 			materialParams.sheen = 1;
 			const extension = materialDef.extensions[ this.name ];
 
 			if ( extension.sheenColorFactor !== undefined ) {
 
-				materialParams.sheenTint.fromArray( extension.sheenColorFactor );
+				materialParams.sheenColor.fromArray( extension.sheenColorFactor );
 
 			}
 
@@ -764,7 +764,7 @@
 
 			materialParams.attenuationDistance = extension.attenuationDistance || 0;
 			const colorArray = extension.attenuationColor || [ 1, 1, 1 ];
-			materialParams.attenuationTint = new THREE.Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
+			materialParams.attenuationColor = new THREE.Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
 			return Promise.all( pending );
 
 		}
@@ -860,11 +860,11 @@
 			}
 
 			const colorArray = extension.specularColorFactor || [ 1, 1, 1 ];
-			materialParams.specularTint = new THREE.Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
+			materialParams.specularColor = new THREE.Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
 
 			if ( extension.specularColorTexture !== undefined ) {
 
-				pending.push( parser.assignTexture( materialParams, 'specularTintMap', extension.specularColorTexture ).then( function ( texture ) {
+				pending.push( parser.assignTexture( materialParams, 'specularColorMap', extension.specularColorTexture ).then( function ( texture ) {
 
 					texture.encoding = THREE.sRGBEncoding;
 

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -2303,7 +2303,7 @@ class GLTFMaterialsVolumeExtension {
 		}
 
 		extensionDef.attenuationDistance = material.attenuationDistance;
-		extensionDef.attenuationColor = material.attenuationTint.toArray();
+		extensionDef.attenuationColor = material.attenuationColor.toArray();
 
 		materialDef.extensions = materialDef.extensions || {};
 		materialDef.extensions[ this.name ] = extensionDef;

+ 6 - 6
examples/jsm/loaders/GLTFLoader.js

@@ -749,7 +749,7 @@ class GLTFMaterialsSheenExtension {
 
 		const pending = [];
 
-		materialParams.sheenTint = new Color( 0, 0, 0 );
+		materialParams.sheenColor = new Color( 0, 0, 0 );
 		materialParams.sheenRoughness = 0;
 		materialParams.sheen = 1;
 
@@ -757,7 +757,7 @@ class GLTFMaterialsSheenExtension {
 
 		if ( extension.sheenColorFactor !== undefined ) {
 
-			materialParams.sheenTint.fromArray( extension.sheenColorFactor );
+			materialParams.sheenColor.fromArray( extension.sheenColorFactor );
 
 		}
 
@@ -769,7 +769,7 @@ class GLTFMaterialsSheenExtension {
 
 		if ( extension.sheenColorTexture !== undefined ) {
 
-			pending.push( parser.assignTexture( materialParams, 'sheenTintMap', extension.sheenColorTexture ) );
+			pending.push( parser.assignTexture( materialParams, 'sheenColorMap', extension.sheenColorTexture ) );
 
 		}
 
@@ -895,7 +895,7 @@ class GLTFMaterialsVolumeExtension {
 		materialParams.attenuationDistance = extension.attenuationDistance || 0;
 
 		const colorArray = extension.attenuationColor || [ 1, 1, 1 ];
-		materialParams.attenuationTint = new Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
+		materialParams.attenuationColor = new Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
 
 		return Promise.all( pending );
 
@@ -998,11 +998,11 @@ class GLTFMaterialsSpecularExtension {
 		}
 
 		const colorArray = extension.specularColorFactor || [ 1, 1, 1 ];
-		materialParams.specularTint = new Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
+		materialParams.specularColor = new Color( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ] );
 
 		if ( extension.specularColorTexture !== undefined ) {
 
-			pending.push( parser.assignTexture( materialParams, 'specularTintMap', extension.specularColorTexture ).then( function ( texture ) {
+			pending.push( parser.assignTexture( materialParams, 'specularColorMap', extension.specularColorTexture ).then( function ( texture ) {
 
 				texture.encoding = sRGBEncoding;
 

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

@@ -34,7 +34,7 @@ NodeUtils.addShortcuts( StandardNodeMaterial.prototype, 'fragment', [
 	'environment',
 	'mask',
 	'position',
-	'sheenTint'
+	'sheenColor'
 ] );
 
 export { StandardNodeMaterial };

+ 6 - 6
examples/jsm/nodes/materials/nodes/StandardNode.js

@@ -185,7 +185,7 @@ class StandardNode extends Node {
 
 			}
 
-			if ( this.sheenTint ) this.sheenTint.analyze( builder );
+			if ( this.sheenColor ) this.sheenColor.analyze( builder );
 
 			// build code
 
@@ -230,7 +230,7 @@ class StandardNode extends Node {
 
 			const clearcoatEnv = useClearcoat && environment ? this.environment.flow( builder, 'c', { cache: 'clearcoat', context: contextClearcoatEnvironment, slot: 'environment' } ) : undefined;
 
-			const sheenTint = this.sheenTint ? this.sheenTint.flow( builder, 'c' ) : undefined;
+			const sheenColor = this.sheenColor ? this.sheenColor.flow( builder, 'c' ) : undefined;
 
 			builder.requires.transparent = alpha !== undefined;
 
@@ -368,9 +368,9 @@ class StandardNode extends Node {
 
 			}
 
-			if ( sheenTint ) {
+			if ( sheenColor ) {
 
-				output.push( 'material.sheenTint = ' + sheenTint.result + ';' );
+				output.push( 'material.sheenColor = ' + sheenColor.result + ';' );
 
 			}
 
@@ -547,7 +547,7 @@ class StandardNode extends Node {
 
 		if ( source.environment ) this.environment = source.environment;
 
-		if ( source.sheenTint ) this.sheenTint = source.sheenTint;
+		if ( source.sheenColor ) this.sheenColor = source.sheenColor;
 
 		return this;
 
@@ -593,7 +593,7 @@ class StandardNode extends Node {
 
 			if ( this.environment ) data.environment = this.environment.toJSON( meta ).uuid;
 
-			if ( this.sheenTint ) data.sheenTint = this.sheenTint.toJSON( meta ).uuid;
+			if ( this.sheenColor ) data.sheenColor = this.sheenColor.toJSON( meta ).uuid;
 
 		}
 

+ 1 - 1
examples/jsm/renderers/nodes/ShaderNode.js

@@ -285,7 +285,7 @@ export const diffuseColor = new PropertyNode( 'DiffuseColor', 'vec4' );
 export const roughness = new PropertyNode( 'Roughness', 'float' );
 export const metalness = new PropertyNode( 'Metalness', 'float' );
 export const alphaTest = new PropertyNode( 'AlphaTest', 'float' );
-export const specularTint = new PropertyNode( 'SpecularTint', 'color' );
+export const specularColor = new PropertyNode( 'SpecularColor', 'color' );
 
 export const negate = ShaderNodeProxy( MathNode, 'negate' );
 export const floor = ShaderNodeProxy( MathNode, 'floor' );

+ 4 - 4
examples/jsm/renderers/nodes/accessors/MaterialNode.js

@@ -85,15 +85,15 @@ class MaterialNode extends Node {
 
 		} else if ( scope === MaterialNode.SPECULAR ) {
 
-			const specularTintNode = new MaterialReferenceNode( 'specularTint', 'color' );
+			const specularColorNode = new MaterialReferenceNode( 'specularColor', 'color' );
 
-			if ( material.specularTintMap !== null && material.specularTintMap !== undefined && material.specularTintMap.isTexture === true ) {
+			if ( material.specularColorMap !== null && material.specularColorMap !== undefined && material.specularColorMap.isTexture === true ) {
 
-				node = new OperatorNode( '*', specularTintNode, new MaterialReferenceNode( 'specularTintMap', 'texture' ) );
+				node = new OperatorNode( '*', specularColorNode, new MaterialReferenceNode( 'specularColorMap', 'texture' ) );
 
 			} else {
 
-				node = specularTintNode;
+				node = specularColorNode;
 
 			}
 

+ 2 - 2
examples/jsm/renderers/nodes/functions/BSDFs.js

@@ -2,7 +2,7 @@ import { ShaderNode,
 	add, addTo, sub, mul, div, saturate, dot, pow, pow2, exp2, normalize, max, sqrt, negate,
 	cond, greaterThan, and,
 	transformedNormalView, positionViewDirection,
-	diffuseColor, specularTint, roughness,
+	diffuseColor, specularColor, roughness,
 	PI, RECIPROCAL_PI, EPSILON
 } from '../ShaderNode.js';
 
@@ -109,7 +109,7 @@ export const RE_Direct_Physical = new ShaderNode( ( inputs ) => {
 
 	addTo( directDiffuse, mul( irradiance, BRDF_Lambert( { diffuseColor } ) ) );
 
-	addTo( directSpecular, mul( irradiance, BRDF_Specular_GGX( { lightDirection, f0: specularTint, f90: 1, roughness } ) ) );
+	addTo( directSpecular, mul( irradiance, BRDF_Specular_GGX( { lightDirection, f0: specularColor, f90: 1, roughness } ) ) );
 
 } );
 

+ 1 - 1
examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js

@@ -215,7 +215,7 @@ class WebGPUNodeBuilder extends NodeBuilder {
 
 				// SPECULAR_TINT
 
-				this.addFlow( 'fragment', new VarNode( new ExpressionNode( 'mix( vec3<f32>( 0.04 ), DiffuseColor.rgb, Metalness )', 'vec3' ), 'SpecularTint', 'color' ) );
+				this.addFlow( 'fragment', new VarNode( new ExpressionNode( 'mix( vec3<f32>( 0.04 ), DiffuseColor.rgb, Metalness )', 'vec3' ), 'SpecularColor', 'color' ) );
 
 				// NORMAL_VIEW
 

+ 4 - 4
examples/webgl_materials_physical_transmission.html

@@ -28,7 +28,7 @@
 				ior: 1.5,
 				thickness: 0.01,
 				specularIntensity: 1,
-				specularTint: 0xffffff,
+				specularColor: 0xffffff,
 				envMapIntensity: 1,
 				lightIntensity: 1,
 				exposure: 1
@@ -91,7 +91,7 @@
 					envMapIntensity: params.envMapIntensity,
 					transmission: params.transmission, // use material.transmission for glass materials
 					specularIntensity: params.specularIntensity,
-					specularTint: params.specularTint,
+					specularColor: params.specularColor,
 					opacity: params.opacity,
 					side: THREE.DoubleSide,
 					transparent: true
@@ -177,10 +177,10 @@
 
 					} );
 
-				gui.addColor( params, 'specularTint' )
+				gui.addColor( params, 'specularColor' )
 					.onChange( function () {
 
-						material.specularTint.set( params.specularTint );
+						material.specularColor.set( params.specularColor );
 						render();
 
 					} );

+ 5 - 5
src/loaders/MaterialLoader.js

@@ -75,19 +75,19 @@ class MaterialLoader extends Loader {
 		if ( json.roughness !== undefined ) material.roughness = json.roughness;
 		if ( json.metalness !== undefined ) material.metalness = json.metalness;
 		if ( json.sheen !== undefined ) material.sheen = json.sheen;
-		if ( json.sheenTint !== undefined ) material.sheenTint = new Color().setHex( json.sheenTint );
+		if ( json.sheenColor !== undefined ) material.sheenColor = new Color().setHex( json.sheenColor );
 		if ( json.sheenRoughness !== undefined ) material.sheenRoughness = json.sheenRoughness;
 		if ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive );
 		if ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular );
 		if ( json.specularIntensity !== undefined ) material.specularIntensity = json.specularIntensity;
-		if ( json.specularTint !== undefined && material.specularTint !== undefined ) material.specularTint.setHex( json.specularTint );
+		if ( json.specularColor !== undefined && material.specularColor !== undefined ) material.specularColor.setHex( json.specularColor );
 		if ( json.shininess !== undefined ) material.shininess = json.shininess;
 		if ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;
 		if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;
 		if ( json.transmission !== undefined ) material.transmission = json.transmission;
 		if ( json.thickness !== undefined ) material.thickness = json.thickness;
 		if ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance;
-		if ( json.attenuationTint !== undefined && material.attenuationTint !== undefined ) material.attenuationTint.setHex( json.attenuationTint );
+		if ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor );
 		if ( json.fog !== undefined ) material.fog = json.fog;
 		if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
 		if ( json.blending !== undefined ) material.blending = json.blending;
@@ -264,7 +264,7 @@ class MaterialLoader extends Loader {
 
 		if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );
 		if ( json.specularIntensityMap !== undefined ) material.specularIntensityMap = getTexture( json.specularIntensityMap );
-		if ( json.specularTintMap !== undefined ) material.specularTintMap = getTexture( json.specularTintMap );
+		if ( json.specularColorMap !== undefined ) material.specularColorMap = getTexture( json.specularColorMap );
 
 		if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );
 		if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;
@@ -288,7 +288,7 @@ class MaterialLoader extends Loader {
 		if ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap );
 		if ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap );
 
-		if ( json.sheenTintMap !== undefined ) material.sheenTintMap = getTexture( json.sheenTintMap );
+		if ( json.sheenColorMap !== undefined ) material.sheenColorMap = getTexture( json.sheenColorMap );
 		if ( json.sheenRoughnessMap !== undefined ) material.sheenRoughnessMap = getTexture( json.sheenRoughnessMap );
 
 		return material;

+ 4 - 4
src/materials/Material.js

@@ -192,14 +192,14 @@ class Material extends EventDispatcher {
 		if ( this.metalness !== undefined ) data.metalness = this.metalness;
 
 		if ( this.sheen !== undefined ) data.sheen = this.sheen;
-		if ( this.sheenTint && this.sheenTint.isColor ) data.sheenTint = this.sheenTint.getHex();
+		if ( this.sheenColor && this.sheenColor.isColor ) data.sheenColor = this.sheenColor.getHex();
 		if ( this.sheenRoughness !== undefined ) data.sheenRoughness = this.sheenRoughness;
 		if ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex();
 		if ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity;
 
 		if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();
 		if ( this.specularIntensity !== undefined ) data.specularIntensity = this.specularIntensity;
-		if ( this.specularTint && this.specularTint.isColor ) data.specularTint = this.specularTint.getHex();
+		if ( this.specularColor && this.specularColor.isColor ) data.specularColor = this.specularColor.getHex();
 		if ( this.shininess !== undefined ) data.shininess = this.shininess;
 		if ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;
 		if ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;
@@ -270,7 +270,7 @@ class Material extends EventDispatcher {
 		if ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid;
 		if ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;
 		if ( this.specularIntensityMap && this.specularIntensityMap.isTexture ) data.specularIntensityMap = this.specularIntensityMap.toJSON( meta ).uuid;
-		if ( this.specularTintMap && this.specularTintMap.isTexture ) data.specularTintMap = this.specularTintMap.toJSON( meta ).uuid;
+		if ( this.specularColorMap && this.specularColorMap.isTexture ) data.specularColorMap = this.specularColorMap.toJSON( meta ).uuid;
 
 		if ( this.envMap && this.envMap.isTexture ) {
 
@@ -295,7 +295,7 @@ class Material extends EventDispatcher {
 		if ( this.thickness !== undefined ) data.thickness = this.thickness;
 		if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;
 		if ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance;
-		if ( this.attenuationTint !== undefined ) data.attenuationTint = this.attenuationTint.getHex();
+		if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();
 
 		if ( this.size !== undefined ) data.size = this.size;
 		if ( this.shadowSide !== null ) data.shadowSide = this.shadowSide;

+ 15 - 15
src/materials/MeshPhysicalMaterial.js

@@ -16,8 +16,8 @@ import * as MathUtils from '../math/MathUtils.js';
  *  reflectivity: <float>,
  *
  *  sheen: <float>,
- *  sheenTint: <Color>,
- *  sheenTintMap: new THREE.Texture( <Image> ),
+ *  sheenColor: <Color>,
+ *  sheenColorMap: new THREE.Texture( <Image> ),
  *  sheenRoughness: <float>,
  *  sheenRoughnessMap: new THREE.Texture( <Image> ),
  *
@@ -27,12 +27,12 @@ import * as MathUtils from '../math/MathUtils.js';
  *  thickness: <float>,
  *  thicknessMap: new THREE.Texture( <Image> ),
  *  attenuationDistance: <float>,
- *  attenuationTint: <Color>,
+ *  attenuationColor: <Color>,
  *
  *  specularIntensity: <float>,
  *  specularIntensityhMap: new THREE.Texture( <Image> ),
- *  specularTint: <Color>,
- *  specularTintMap: new THREE.Texture( <Image> )
+ *  specularColor: <Color>,
+ *  specularColorMap: new THREE.Texture( <Image> )
  * }
  */
 
@@ -72,8 +72,8 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 			}
 		} );
 
-		this.sheenTint = new Color( 0x000000 );
-		this.sheenTintMap = null;
+		this.sheenColor = new Color( 0x000000 );
+		this.sheenColorMap = null;
 		this.sheenRoughness = 1.0;
 		this.sheenRoughnessMap = null;
 
@@ -82,12 +82,12 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 		this.thickness = 0.01;
 		this.thicknessMap = null;
 		this.attenuationDistance = 0.0;
-		this.attenuationTint = new Color( 1, 1, 1 );
+		this.attenuationColor = new Color( 1, 1, 1 );
 
 		this.specularIntensity = 1.0;
 		this.specularIntensityMap = null;
-		this.specularTint = new Color( 1, 1, 1 );
-		this.specularTintMap = null;
+		this.specularColor = new Color( 1, 1, 1 );
+		this.specularColorMap = null;
 
 		this._sheen = 0.0;
 		this._clearcoat = 0;
@@ -172,8 +172,8 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 		this.ior = source.ior;
 
 		this.sheen = source.sheen;
-		this.sheenTint.copy( source.sheenTint );
-		this.sheenTintMap = source.sheenTintMap;
+		this.sheenColor.copy( source.sheenColor );
+		this.sheenColorMap = source.sheenColorMap;
 		this.sheenRoughness = source.sheenRoughness;
 		this.sheenRoughnessMap = source.sheenRoughnessMap;
 
@@ -183,12 +183,12 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 		this.thickness = source.thickness;
 		this.thicknessMap = source.thicknessMap;
 		this.attenuationDistance = source.attenuationDistance;
-		this.attenuationTint.copy( source.attenuationTint );
+		this.attenuationColor.copy( source.attenuationColor );
 
 		this.specularIntensity = source.specularIntensity;
 		this.specularIntensityMap = source.specularIntensityMap;
-		this.specularTint.copy( source.specularTint );
-		this.specularTintMap = source.specularTintMap;
+		this.specularColor.copy( source.specularColor );
+		this.specularColorMap = source.specularColorMap;
 
 		return this;
 

+ 2 - 2
src/renderers/shaders/ShaderChunk/bsdfs.glsl.js

@@ -239,7 +239,7 @@ float V_Neubelt( float dotNV, float dotNL ) {
 
 }
 
-vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenTint, const in float sheenRoughness ) {
+vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
 
 	vec3 halfDir = normalize( lightDir + viewDir );
 
@@ -250,7 +250,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no
 	float D = D_Charlie( sheenRoughness, dotNH );
 	float V = V_Neubelt( dotNV, dotNL );
 
-	return sheenTint * ( D * V );
+	return sheenColor * ( D * V );
 
 }
 

+ 8 - 8
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js

@@ -14,7 +14,7 @@ material.roughness = min( material.roughness, 1.0 );
 	#ifdef SPECULAR
 
 		float specularIntensityFactor = specularIntensity;
-		vec3 specularTintFactor = specularTint;
+		vec3 specularColorFactor = specularColor;
 
 		#ifdef USE_SPECULARINTENSITYMAP
 
@@ -22,9 +22,9 @@ material.roughness = min( material.roughness, 1.0 );
 
 		#endif
 
-		#ifdef USE_SPECULARTINTMAP
+		#ifdef USE_SPECULARCOLORMAP
 
-			specularTintFactor *= specularTintMapTexelToLinear( texture2D( specularTintMap, vUv ) ).rgb;
+			specularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb;
 
 		#endif
 
@@ -33,12 +33,12 @@ material.roughness = min( material.roughness, 1.0 );
 	#else
 
 		float specularIntensityFactor = 1.0;
-		vec3 specularTintFactor = vec3( 1.0 );
+		vec3 specularColorFactor = vec3( 1.0 );
 		material.specularF90 = 1.0;
 
 	#endif
 
-	material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularTintFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
+	material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
 
 #else
 
@@ -75,11 +75,11 @@ material.roughness = min( material.roughness, 1.0 );
 
 #ifdef USE_SHEEN
 
-	material.sheenTint = sheenTint;
+	material.sheenColor = sheenColor;
 
-	#ifdef USE_SHEENTINTMAP
+	#ifdef USE_SHEENCOLORMAP
 
-		material.sheenTint *= sheenTintMapTexelToLinear( texture2D( sheenTintMap, vUv ) ).rgb;
+		material.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb;
 
 	#endif
 

+ 2 - 2
src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js

@@ -14,7 +14,7 @@ struct PhysicalMaterial {
 	#endif
 
 	#ifdef USE_SHEEN
-		vec3 sheenTint;
+		vec3 sheenColor;
 		float sheenRoughness;
 	#endif
 
@@ -133,7 +133,7 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
 
 	#ifdef USE_SHEEN
 
-		reflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenTint, material.sheenRoughness );
+		reflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );
 
 	#endif
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js

@@ -24,7 +24,7 @@ export default /* glsl */`
 	vec4 transmission = getIBLVolumeRefraction(
 		n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,
 		pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
-		attenuationTint, attenuationDistance );
+		attenuationColor, attenuationDistance );
 
 	totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );
 	transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );

+ 1 - 1
src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.js

@@ -7,7 +7,7 @@ export default /* glsl */`
 	uniform float transmission;
 	uniform float thickness;
 	uniform float attenuationDistance;
-	uniform vec3 attenuationTint;
+	uniform vec3 attenuationColor;
 
 	#ifdef USE_TRANSMISSIONMAP
 

+ 5 - 5
src/renderers/shaders/ShaderLib.js

@@ -297,8 +297,8 @@ ShaderLib.physical = {
 			clearcoatNormalScale: { value: new Vector2( 1, 1 ) },
 			clearcoatNormalMap: { value: null },
 			sheen: { value: 0 },
-			sheenTint: { value: new Color( 0x000000 ) },
-			sheenTintMap: { value: null },
+			sheenColor: { value: new Color( 0x000000 ) },
+			sheenColorMap: { value: null },
 			sheenRoughness: { value: 0 },
 			sheenRoughnessMap: { value: null },
 			transmission: { value: 0 },
@@ -308,11 +308,11 @@ ShaderLib.physical = {
 			thickness: { value: 0 },
 			thicknessMap: { value: null },
 			attenuationDistance: { value: 0 },
-			attenuationTint: { value: new Color( 0x000000 ) },
+			attenuationColor: { value: new Color( 0x000000 ) },
 			specularIntensity: { value: 0 },
 			specularIntensityMap: { value: null },
-			specularTint: { value: new Color( 1, 1, 1 ) },
-			specularTintMap: { value: null },
+			specularColor: { value: new Color( 1, 1, 1 ) },
+			specularColorMap: { value: null },
 		}
 	] ),
 

+ 6 - 6
src/renderers/shaders/ShaderLib/meshphysical.glsl.js

@@ -77,14 +77,14 @@ uniform float opacity;
 
 #ifdef SPECULAR
 	uniform float specularIntensity;
-	uniform vec3 specularTint;
+	uniform vec3 specularColor;
 
 	#ifdef USE_SPECULARINTENSITYMAP
 		uniform sampler2D specularIntensityMap;
 	#endif
 
-	#ifdef USE_SPECULARTINTMAP
-		uniform sampler2D specularTintMap;
+	#ifdef USE_SPECULARCOLORMAP
+		uniform sampler2D specularColorMap;
 	#endif
 #endif
 
@@ -94,11 +94,11 @@ uniform float opacity;
 #endif
 
 #ifdef USE_SHEEN
-	uniform vec3 sheenTint;
+	uniform vec3 sheenColor;
 	uniform float sheenRoughness;
 
-	#ifdef USE_SHEENTINTMAP
-		uniform sampler2D sheenTintMap;
+	#ifdef USE_SHEENCOLORMAP
+		uniform sampler2D sheenColorMap;
 	#endif
 
 	#ifdef USE_SHEENROUGHNESSMAP

+ 11 - 11
src/renderers/webgl/WebGLMaterials.js

@@ -253,9 +253,9 @@ function WebGLMaterials( properties ) {
 
 			uvScaleMap = material.specularIntensityMap;
 
-		} else if ( material.specularTintMap ) {
+		} else if ( material.specularColorMap ) {
 
-			uvScaleMap = material.specularTintMap;
+			uvScaleMap = material.specularColorMap;
 
 		} else if ( material.transmissionMap ) {
 
@@ -265,9 +265,9 @@ function WebGLMaterials( properties ) {
 
 			uvScaleMap = material.thicknessMap;
 
-		} else if ( material.sheenTintMap ) {
+		} else if ( material.sheenColorMap ) {
 
-			uvScaleMap = material.sheenTintMap;
+			uvScaleMap = material.sheenColorMap;
 
 		} else if ( material.sheenRoughnessMap ) {
 
@@ -608,13 +608,13 @@ function WebGLMaterials( properties ) {
 
 		if ( material.sheen > 0 ) {
 
-			uniforms.sheenTint.value.copy( material.sheenTint ).multiplyScalar( material.sheen );
+			uniforms.sheenColor.value.copy( material.sheenColor ).multiplyScalar( material.sheen );
 
 			uniforms.sheenRoughness.value = material.sheenRoughness;
 
-			if ( material.sheenTintMap ) {
+			if ( material.sheenColorMap ) {
 
-				uniforms.sheenTintMap.value = material.sheenTintMap;
+				uniforms.sheenColorMap.value = material.sheenColorMap;
 
 			}
 
@@ -679,12 +679,12 @@ function WebGLMaterials( properties ) {
 			}
 
 			uniforms.attenuationDistance.value = material.attenuationDistance;
-			uniforms.attenuationTint.value.copy( material.attenuationTint );
+			uniforms.attenuationColor.value.copy( material.attenuationColor );
 
 		}
 
 		uniforms.specularIntensity.value = material.specularIntensity;
-		uniforms.specularTint.value.copy( material.specularTint );
+		uniforms.specularColor.value.copy( material.specularColor );
 
 		if ( material.specularIntensityMap ) {
 
@@ -692,9 +692,9 @@ function WebGLMaterials( properties ) {
 
 		}
 
-		if ( material.specularTintMap ) {
+		if ( material.specularColorMap ) {
 
-			uniforms.specularTintMap.value = material.specularTintMap;
+			uniforms.specularColorMap.value = material.specularColorMap;
 
 		}
 

+ 6 - 6
src/renderers/webgl/WebGLProgram.js

@@ -478,7 +478,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.specularIntensityMap ? '#define USE_SPECULARINTENSITYMAP' : '',
-			parameters.specularTintMap ? '#define USE_SPECULARTINTMAP' : '',
+			parameters.specularColorMap ? '#define USE_SPECULARCOLORMAP' : '',
 
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
 			parameters.metalnessMap ? '#define USE_METALNESSMAP' : '',
@@ -488,7 +488,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 			parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',
 			parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',
 
-			parameters.sheenTintMap ? '#define USE_SHEENTINTMAP' : '',
+			parameters.sheenColorMap ? '#define USE_SHEENCOLORMAP' : '',
 			parameters.sheenRoughnessMap ? '#define USE_SHEENROUGHNESSMAP' : '',
 
 			parameters.vertexTangents ? '#define USE_TANGENT' : '',
@@ -629,7 +629,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.specularIntensityMap ? '#define USE_SPECULARINTENSITYMAP' : '',
-			parameters.specularTintMap ? '#define USE_SPECULARTINTMAP' : '',
+			parameters.specularColorMap ? '#define USE_SPECULARCOLORMAP' : '',
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
 			parameters.metalnessMap ? '#define USE_METALNESSMAP' : '',
 
@@ -637,7 +637,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 			parameters.alphaTest ? '#define USE_ALPHATEST' : '',
 
 			parameters.sheen ? '#define USE_SHEEN' : '',
-			parameters.sheenTintMap ? '#define USE_SHEENTINTMAP' : '',
+			parameters.sheenColorMap ? '#define USE_SHEENCOLORMAP' : '',
 			parameters.sheenRoughnessMap ? '#define USE_SHEENROUGHNESSMAP' : '',
 
 			parameters.transmission ? '#define USE_TRANSMISSION' : '',
@@ -685,8 +685,8 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 			parameters.matcap ? getTexelDecodingFunction( 'matcapTexelToLinear', parameters.matcapEncoding ) : '',
 			parameters.envMap ? getTexelDecodingFunction( 'envMapTexelToLinear', parameters.envMapEncoding ) : '',
 			parameters.emissiveMap ? getTexelDecodingFunction( 'emissiveMapTexelToLinear', parameters.emissiveMapEncoding ) : '',
-			parameters.specularTintMap ? getTexelDecodingFunction( 'specularTintMapTexelToLinear', parameters.specularTintMapEncoding ) : '',
-			parameters.sheenTintMap ? getTexelDecodingFunction( 'sheenTintMapTexelToLinear', parameters.sheenTintMapEncoding ) : '',
+			parameters.specularColorMap ? getTexelDecodingFunction( 'specularColorMapTexelToLinear', parameters.specularColorMapEncoding ) : '',
+			parameters.sheenColorMap ? getTexelDecodingFunction( 'sheenColorMapTexelToLinear', parameters.sheenColorMapEncoding ) : '',
 			parameters.lightMap ? getTexelDecodingFunction( 'lightMapTexelToLinear', parameters.lightMapEncoding ) : '',
 			getTexelEncodingFunction( 'linearToOutputTexel', parameters.outputEncoding ),
 

+ 8 - 8
src/renderers/webgl/WebGLPrograms.js

@@ -48,9 +48,9 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
 		'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows',
 		'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights',
 		'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering', 'format',
-		'specularIntensityMap', 'specularTintMap', 'specularTintMapEncoding',
+		'specularIntensityMap', 'specularColorMap', 'specularColorMapEncoding',
 		'transmission', 'transmissionMap', 'thicknessMap',
-		'sheen', 'sheenTintMap', 'sheenTintMapEncoding', 'sheenRoughnessMap'
+		'sheen', 'sheenColorMap', 'sheenColorMapEncoding', 'sheenRoughnessMap'
 	];
 
 	function getMaxBones( object ) {
@@ -214,8 +214,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
 			metalnessMap: !! material.metalnessMap,
 			specularMap: !! material.specularMap,
 			specularIntensityMap: !! material.specularIntensityMap,
-			specularTintMap: !! material.specularTintMap,
-			specularTintMapEncoding: getTextureEncodingFromMap( material.specularTintMap ),
+			specularColorMap: !! material.specularColorMap,
+			specularColorMapEncoding: getTextureEncodingFromMap( material.specularColorMap ),
 
 			alphaMap: !! material.alphaMap,
 			alphaTest: useAlphaTest,
@@ -223,8 +223,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
 			gradientMap: !! material.gradientMap,
 
 			sheen: material.sheen > 0,
-			sheenTintMap: !! material.sheenTintMap,
-			sheenTintMapEncoding: getTextureEncodingFromMap( material.sheenTintMap ),
+			sheenColorMap: !! material.sheenColorMap,
+			sheenColorMapEncoding: getTextureEncodingFromMap( material.sheenColorMap ),
 			sheenRoughnessMap: !! material.sheenRoughnessMap,
 
 			transmission: material.transmission > 0,
@@ -236,8 +236,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
 			vertexTangents: ( !! material.normalMap && !! object.geometry && !! object.geometry.attributes.tangent ),
 			vertexColors: material.vertexColors,
 			vertexAlphas: material.vertexColors === true && !! object.geometry && !! object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4,
-			vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap || !! material.thicknessMap || !! material.specularIntensityMap || !! material.specularTintMap || !! material.sheenTintMap || material.sheenRoughnessMap,
-			uvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || material.transmission > 0 || !! material.transmissionMap || !! material.thicknessMap || !! material.specularIntensityMap || !! material.specularTintMap || !! material.sheen > 0 || !! material.sheenTintMap || !! material.sheenRoughnessMap ) && !! material.displacementMap,
+			vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap || !! material.thicknessMap || !! material.specularIntensityMap || !! material.specularColorMap || !! material.sheenColorMap || material.sheenRoughnessMap,
+			uvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || material.transmission > 0 || !! material.transmissionMap || !! material.thicknessMap || !! material.specularIntensityMap || !! material.specularColorMap || !! material.sheen > 0 || !! material.sheenColorMap || !! material.sheenRoughnessMap ) && !! material.displacementMap,
 
 			fog: !! fog,
 			useFog: material.fog,