Ver código fonte

MeshPhysicalMaterial: Renamed clearCoat* to clearcoat*.

Mr.doob 6 anos atrás
pai
commit
b75dd04572
34 arquivos alterados com 224 adições e 224 exclusões
  1. 4 4
      docs/api/en/materials/MeshPhysicalMaterial.html
  2. 4 4
      docs/api/zh/materials/MeshPhysicalMaterial.html
  3. 2 2
      docs/scenes/material-browser.html
  4. 50 50
      editor/js/Sidebar.Material.js
  5. 4 4
      editor/js/Strings.js
  6. 2 2
      examples/js/loaders/LWOLoader.js
  7. 1 1
      examples/js/shaders/TranslucentShader.js
  8. 2 2
      examples/jsm/loaders/LWOLoader.js
  9. 2 2
      examples/jsm/loaders/sea3d/SEA3DLoader.js
  10. 2 2
      examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.js
  11. 3 3
      examples/jsm/nodes/materials/StandardNodeMaterial.js
  12. 33 33
      examples/jsm/nodes/materials/nodes/StandardNode.js
  13. 1 1
      examples/jsm/shaders/TranslucentShader.js
  14. 9 9
      examples/webgl_materials_clearcoat_normalmap.html
  15. 20 20
      examples/webgl_materials_nodes.html
  16. 6 6
      examples/webgl_materials_variations_physical.html
  17. 4 4
      src/loaders/MaterialLoader.js
  18. 5 5
      src/materials/Material.js
  19. 8 8
      src/materials/MeshPhysicalMaterial.d.ts
  20. 12 12
      src/materials/MeshPhysicalMaterial.js
  21. 6 6
      src/renderers/WebGLRenderer.js
  22. 1 1
      src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.js
  23. 4 4
      src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.js
  24. 2 2
      src/renderers/shaders/ShaderChunk/clearcoat_normalmap_pars_fragment.glsl.js
  25. 1 1
      src/renderers/shaders/ShaderChunk/common.glsl.js
  26. 2 2
      src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js
  27. 1 1
      src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.js
  28. 1 1
      src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js
  29. 2 2
      src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js
  30. 18 18
      src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js
  31. 4 4
      src/renderers/shaders/ShaderLib.js
  32. 2 2
      src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js
  33. 3 3
      src/renderers/webgl/WebGLProgram.js
  34. 3 3
      src/renderers/webgl/WebGLPrograms.js

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

@@ -55,13 +55,13 @@
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 		<p>See the base [page:Material] and [page:MeshStandardMaterial] classes for common properties.</p>
 		<p>See the base [page:Material] and [page:MeshStandardMaterial] classes for common properties.</p>
 
 
-		<h3>[property:Float clearCoat]</h3>
+		<h3>[property:Float clearcoat]</h3>
 		<p>
 		<p>
-		ClearCoat level, from *0.0* to *1.0*. Default is *0.0*.
+		Clearcoat level, from *0.0* to *1.0*. Default is *0.0*.
 		</p>
 		</p>
 
 
-		<h3>[property:Float clearCoatRoughness]</h3>
-		<p>How rough the clearCoat appears, from *0.0* to *1.0*. Default is *0.0*.</p>
+		<h3>[property:Float clearcoatRoughness]</h3>
+		<p>How rough the clearcoat appears, from *0.0* to *1.0*. Default is *0.0*.</p>
 
 
 		<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
 		<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
 		<p>
 		<p>

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

@@ -50,13 +50,13 @@
 		<h2>属性(Properties)</h2>
 		<h2>属性(Properties)</h2>
 		<p>共有属性请参见其基类[page:Material]。</p>
 		<p>共有属性请参见其基类[page:Material]。</p>
 
 
-		<h3>[property:Float clearCoat]</h3>
+		<h3>[property:Float clearcoat]</h3>
 		<p>
 		<p>
-			ClearCoat级别,从*0.0*到*1.0*。默认值为*0.0*。
+			Clearcoat级别,从*0.0*到*1.0*。默认值为*0.0*。
 		</p>
 		</p>
 
 
-		<h3>[property:Float clearCoatRoughness]</h3>
-		<p> clearCoat看起来的粗糙程度,从*0.0*到*1.0*。默认值为*0.0*。</p>
+		<h3>[property:Float clearcoatRoughness]</h3>
+		<p> clearcoat看起来的粗糙程度,从*0.0*到*1.0*。默认值为*0.0*。</p>
 
 
 		<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
 		<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
 		<p> 用于检查此类或派生类是否为Lambert网格材质。默认值为 *true*。<br /><br />
 		<p> 用于检查此类或派生类是否为Lambert网格材质。默认值为 *true*。<br /><br />

+ 2 - 2
docs/scenes/material-browser.html

@@ -595,8 +595,8 @@
 				folder.add( material, 'roughness', 0, 1 );
 				folder.add( material, 'roughness', 0, 1 );
 				folder.add( material, 'metalness', 0, 1 );
 				folder.add( material, 'metalness', 0, 1 );
 				folder.add( material, 'reflectivity', 0, 1 );
 				folder.add( material, 'reflectivity', 0, 1 );
-				folder.add( material, 'clearCoat', 0, 1 ).step( 0.01 );
-				folder.add( material, 'clearCoatRoughness', 0, 1 ).step( 0.01 );
+				folder.add( material, 'clearcoat', 0, 1 ).step( 0.01 );
+				folder.add( material, 'clearcoatRoughness', 0, 1 ).step( 0.01 );
 				folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframe' );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );
 				folder.add( material, 'wireframeLinewidth', 0, 10 );

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

@@ -225,25 +225,25 @@ Sidebar.Material = function ( editor ) {
 
 
 	container.add( materialShininessRow );
 	container.add( materialShininessRow );
 
 
-	// clearCoat
+	// clearcoat
 
 
-	var materialClearCoatRow = new UI.Row();
-	var materialClearCoat = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
+	var materialClearcoatRow = new UI.Row();
+	var materialClearcoat = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
 
 
-	materialClearCoatRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoat' ) ).setWidth( '90px' ) );
-	materialClearCoatRow.add( materialClearCoat );
+	materialClearcoatRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoat' ) ).setWidth( '90px' ) );
+	materialClearcoatRow.add( materialClearcoat );
 
 
-	container.add( materialClearCoatRow );
+	container.add( materialClearcoatRow );
 
 
-	// clearCoatRoughness
+	// clearcoatRoughness
 
 
-	var materialClearCoatRoughnessRow = new UI.Row();
-	var materialClearCoatRoughness = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
+	var materialClearcoatRoughnessRow = new UI.Row();
+	var materialClearcoatRoughness = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
 
 
-	materialClearCoatRoughnessRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatroughness' ) ).setWidth( '90px' ) );
-	materialClearCoatRoughnessRow.add( materialClearCoatRoughness );
+	materialClearcoatRoughnessRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatroughness' ) ).setWidth( '90px' ) );
+	materialClearcoatRoughnessRow.add( materialClearcoatRoughness );
 
 
-	container.add( materialClearCoatRoughnessRow );
+	container.add( materialClearcoatRoughnessRow );
 
 
 	// vertex colors
 	// vertex colors
 
 
@@ -353,19 +353,19 @@ Sidebar.Material = function ( editor ) {
 
 
 	// clearcoat normal map
 	// clearcoat normal map
 
 
-	var materialClearCoatNormalMapRow = new UI.Row();
-	var materialClearCoatNormalMapEnabled = new UI.Checkbox( false ).onChange( update );
-	var materialClearCoatNormalMap = new UI.Texture().onChange( update );
-	var materialClearCoatNormalScaleX = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
-	var materialClearCoatNormalScaleY = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
+	var materialClearcoatNormalMapRow = new UI.Row();
+	var materialClearcoatNormalMapEnabled = new UI.Checkbox( false ).onChange( update );
+	var materialClearcoatNormalMap = new UI.Texture().onChange( update );
+	var materialClearcoatNormalScaleX = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
+	var materialClearcoatNormalScaleY = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
 
 
-	materialClearCoatNormalMapRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatnormalmap' ) ).setWidth( '90px' ) );
-	materialClearCoatNormalMapRow.add( materialClearCoatNormalMapEnabled );
-	materialClearCoatNormalMapRow.add( materialClearCoatNormalMap );
-	materialClearCoatNormalMapRow.add( materialClearCoatNormalScaleX );
-	materialClearCoatNormalMapRow.add( materialClearCoatNormalScaleY );
+	materialClearcoatNormalMapRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatnormalmap' ) ).setWidth( '90px' ) );
+	materialClearcoatNormalMapRow.add( materialClearcoatNormalMapEnabled );
+	materialClearcoatNormalMapRow.add( materialClearcoatNormalMap );
+	materialClearcoatNormalMapRow.add( materialClearcoatNormalScaleX );
+	materialClearcoatNormalMapRow.add( materialClearcoatNormalScaleY );
 
 
-	container.add( materialClearCoatNormalMapRow );
+	container.add( materialClearcoatNormalMapRow );
 
 
 	// displacement map
 	// displacement map
 
 
@@ -654,15 +654,15 @@ Sidebar.Material = function ( editor ) {
 
 
 			}
 			}
 
 
-			if ( material.clearCoat !== undefined && Math.abs( material.clearCoat - materialClearCoat.getValue() ) >= 0.01 ) {
+			if ( material.clearcoat !== undefined && Math.abs( material.clearcoat - materialClearcoat.getValue() ) >= 0.01 ) {
 
 
-				editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearCoat', materialClearCoat.getValue(), currentMaterialSlot ) );
+				editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearcoat', materialClearcoat.getValue(), currentMaterialSlot ) );
 
 
 			}
 			}
 
 
-			if ( material.clearCoatRoughness !== undefined && Math.abs( material.clearCoatRoughness - materialClearCoatRoughness.getValue() ) >= 0.01 ) {
+			if ( material.clearcoatRoughness !== undefined && Math.abs( material.clearcoatRoughness - materialClearcoatRoughness.getValue() ) >= 0.01 ) {
 
 
-				editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearCoatRoughness', materialClearCoatRoughness.getValue(), currentMaterialSlot ) );
+				editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearcoatRoughness', materialClearcoatRoughness.getValue(), currentMaterialSlot ) );
 
 
 			}
 			}
 
 
@@ -817,34 +817,34 @@ Sidebar.Material = function ( editor ) {
 
 
 			}
 			}
 
 
-			if ( material.clearCoatNormalMap !== undefined ) {
+			if ( material.clearcoatNormalMap !== undefined ) {
 
 
-				var clearCoatNormalMapEnabled = materialClearCoatNormalMapEnabled.getValue() === true;
+				var clearcoatNormalMapEnabled = materialClearcoatNormalMapEnabled.getValue() === true;
 
 
 				if ( objectHasUvs ) {
 				if ( objectHasUvs ) {
 
 
-					var clearCoatNormalMap = clearCoatNormalMapEnabled ? materialClearCoatNormalMap.getValue() : null;
+					var clearcoatNormalMap = clearcoatNormalMapEnabled ? materialClearcoatNormalMap.getValue() : null;
 
 
-					if ( material.clearCoatNormalMap !== clearCoatNormalMap ) {
+					if ( material.clearcoatNormalMap !== clearcoatNormalMap ) {
 
 
-						editor.execute( new SetMaterialMapCommand( editor, currentObject, 'clearCoatNormalMap', clearCoatNormalMap, currentMaterialSlot ) );
+						editor.execute( new SetMaterialMapCommand( editor, currentObject, 'clearcoatNormalMap', clearcoatNormalMap, currentMaterialSlot ) );
 
 
 					}
 					}
 
 
-					if ( material.clearCoatNormalScale.x !== materialClearCoatNormalScaleX.getValue() ||
-						material.clearCoatNormalScale.y !== materialClearCoatNormalScaleY.getValue() ) {
+					if ( material.clearcoatNormalScale.x !== materialClearcoatNormalScaleX.getValue() ||
+						material.clearcoatNormalScale.y !== materialClearcoatNormalScaleY.getValue() ) {
 
 
 						var value = [
 						var value = [
-							materialClearCoatNormalScaleX.getValue(),
-							materialClearCoatNormalScaleY.getValue()
+							materialClearcoatNormalScaleX.getValue(),
+							materialClearcoatNormalScaleY.getValue()
 						];
 						];
-						editor.execute( new SetMaterialVectorCommand( editor, currentObject, 'clearCoatNormalScale', value, currentMaterialSlot ) );
+						editor.execute( new SetMaterialVectorCommand( editor, currentObject, 'clearcoatNormalScale', value, currentMaterialSlot ) );
 
 
 					}
 					}
 
 
 				} else {
 				} else {
 
 
-					if ( clearCoatNormalMapEnabled ) textureWarning = true;
+					if ( clearcoatNormalMapEnabled ) textureWarning = true;
 
 
 				}
 				}
 
 
@@ -1159,8 +1159,8 @@ Sidebar.Material = function ( editor ) {
 			'emissive': materialEmissiveRow,
 			'emissive': materialEmissiveRow,
 			'specular': materialSpecularRow,
 			'specular': materialSpecularRow,
 			'shininess': materialShininessRow,
 			'shininess': materialShininessRow,
-			'clearCoat': materialClearCoatRow,
-			'clearCoatRoughness': materialClearCoatRoughnessRow,
+			'clearcoat': materialClearcoatRow,
+			'clearcoatRoughness': materialClearcoatRoughnessRow,
 			'vertexShader': materialProgramRow,
 			'vertexShader': materialProgramRow,
 			'vertexColors': materialVertexColorsRow,
 			'vertexColors': materialVertexColorsRow,
 			'depthPacking': materialDepthPackingRow,
 			'depthPacking': materialDepthPackingRow,
@@ -1287,15 +1287,15 @@ Sidebar.Material = function ( editor ) {
 
 
 		}
 		}
 
 
-		if ( material.clearCoat !== undefined ) {
+		if ( material.clearcoat !== undefined ) {
 
 
-			materialClearCoat.setValue( material.clearCoat );
+			materialClearcoat.setValue( material.clearcoat );
 
 
 		}
 		}
 
 
-		if ( material.clearCoatRoughness !== undefined ) {
+		if ( material.clearcoatRoughness !== undefined ) {
 
 
-			materialClearCoatRoughness.setValue( material.clearCoatRoughness );
+			materialClearcoatRoughness.setValue( material.clearcoatRoughness );
 
 
 		}
 		}
 
 
@@ -1382,18 +1382,18 @@ Sidebar.Material = function ( editor ) {
 
 
 		}
 		}
 
 
-		if ( material.clearCoatNormalMap !== undefined ) {
+		if ( material.clearcoatNormalMap !== undefined ) {
 
 
-			materialClearCoatNormalMapEnabled.setValue( material.clearCoatNormalMap !== null );
+			materialClearcoatNormalMapEnabled.setValue( material.clearcoatNormalMap !== null );
 
 
-			if ( material.clearCoatNormalMap !== null || resetTextureSelectors ) {
+			if ( material.clearcoatNormalMap !== null || resetTextureSelectors ) {
 
 
-				materialClearCoatNormalMap.setValue( material.clearCoatNormalMap );
+				materialClearcoatNormalMap.setValue( material.clearcoatNormalMap );
 
 
 			}
 			}
 
 
-			materialClearCoatNormalScaleX.setValue( material.clearCoatNormalScale.x );
-			materialClearCoatNormalScaleY.setValue( material.clearCoatNormalScale.y );
+			materialClearcoatNormalScaleX.setValue( material.clearcoatNormalScale.x );
+			materialClearcoatNormalScaleY.setValue( material.clearcoatNormalScale.y );
 
 
 		}
 		}
 
 

+ 4 - 4
editor/js/Strings.js

@@ -224,8 +224,8 @@ var Strings = function ( config ) {
 			'sidebar/material/emissive': 'Emissive',
 			'sidebar/material/emissive': 'Emissive',
 			'sidebar/material/specular': 'Specular',
 			'sidebar/material/specular': 'Specular',
 			'sidebar/material/shininess': 'Shininess',
 			'sidebar/material/shininess': 'Shininess',
-			'sidebar/material/clearcoat': 'ClearCoat',
-			'sidebar/material/clearcoatroughness': 'ClearCoat Roughness',
+			'sidebar/material/clearcoat': 'Clearcoat',
+			'sidebar/material/clearcoatroughness': 'Clearcoat Roughness',
 			'sidebar/material/vertexcolors': 'Vertex Colors',
 			'sidebar/material/vertexcolors': 'Vertex Colors',
 			'sidebar/material/vertexcolors/no': 'No',
 			'sidebar/material/vertexcolors/no': 'No',
 			'sidebar/material/vertexcolors/face': 'Face',
 			'sidebar/material/vertexcolors/face': 'Face',
@@ -236,7 +236,7 @@ var Strings = function ( config ) {
 			'sidebar/material/alphamap': 'Alpha Map',
 			'sidebar/material/alphamap': 'Alpha Map',
 			'sidebar/material/bumpmap': 'Bump Map',
 			'sidebar/material/bumpmap': 'Bump Map',
 			'sidebar/material/normalmap': 'Normal Map',
 			'sidebar/material/normalmap': 'Normal Map',
-			'sidebar/material/clearcoatnormalmap': 'ClearCoat Normal Map',
+			'sidebar/material/clearcoatnormalmap': 'Clearcoat Normal Map',
 			'sidebar/material/displacemap': 'Displace Map',
 			'sidebar/material/displacemap': 'Displace Map',
 			'sidebar/material/roughmap': 'Rough. Map',
 			'sidebar/material/roughmap': 'Rough. Map',
 			'sidebar/material/metalmap': 'Metal. Map',
 			'sidebar/material/metalmap': 'Metal. Map',
@@ -508,7 +508,7 @@ var Strings = function ( config ) {
 			'sidebar/material/alphamap': '透明贴图',
 			'sidebar/material/alphamap': '透明贴图',
 			'sidebar/material/bumpmap': '凹凸贴图',
 			'sidebar/material/bumpmap': '凹凸贴图',
 			'sidebar/material/normalmap': '法线贴图',
 			'sidebar/material/normalmap': '法线贴图',
-			'sidebar/material/clearcoatnormalmap': 'ClearCoat Normal Map',
+			'sidebar/material/clearcoatnormalmap': 'Clearcoat Normal Map',
 			'sidebar/material/displacemap': '置换贴图',
 			'sidebar/material/displacemap': '置换贴图',
 			'sidebar/material/roughmap': '粗糙贴图',
 			'sidebar/material/roughmap': '粗糙贴图',
 			'sidebar/material/metalmap': '金属贴图',
 			'sidebar/material/metalmap': '金属贴图',

+ 2 - 2
examples/js/loaders/LWOLoader.js

@@ -2593,11 +2593,11 @@ MaterialParser.prototype = {
 
 
 		if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {
 		if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {
 
 
-			params.clearCoat = attributes.Clearcoat.value;
+			params.clearcoat = attributes.Clearcoat.value;
 
 
 			if ( attributes[ 'Clearcoat Gloss' ] ) {
 			if ( attributes[ 'Clearcoat Gloss' ] ) {
 
 
-				params.clearCoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
+				params.clearcoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
 
 
 			}
 			}
 
 

+ 1 - 1
examples/js/shaders/TranslucentShader.js

@@ -187,7 +187,7 @@ THREE.TranslucentShader = {
 		"	#if defined( RE_IndirectSpecular )",
 		"	#if defined( RE_IndirectSpecular )",
 
 
 		"		vec3 radiance = vec3( 0.0 );",
 		"		vec3 radiance = vec3( 0.0 );",
-		"		vec3 clearCoatRadiance = vec3( 0.0 );",
+		"		vec3 clearcoatRadiance = vec3( 0.0 );",
 
 
 		"	#endif",
 		"	#endif",
 		THREE.ShaderChunk[ "lights_fragment_end" ],
 		THREE.ShaderChunk[ "lights_fragment_end" ],

+ 2 - 2
examples/jsm/loaders/LWOLoader.js

@@ -2622,11 +2622,11 @@ MaterialParser.prototype = {
 
 
 		if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {
 		if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {
 
 
-			params.clearCoat = attributes.Clearcoat.value;
+			params.clearcoat = attributes.Clearcoat.value;
 
 
 			if ( attributes[ 'Clearcoat Gloss' ] ) {
 			if ( attributes[ 'Clearcoat Gloss' ] ) {
 
 
-				params.clearCoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
+				params.clearcoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
 
 
 			}
 			}
 
 

+ 2 - 2
examples/jsm/loaders/sea3d/SEA3DLoader.js

@@ -2715,8 +2715,8 @@ SEA3D.prototype.materialTechnique =
 	techniques[ SEA3DSDK.Material.CLEAR_COAT ] =
 	techniques[ SEA3DSDK.Material.CLEAR_COAT ] =
 	function ( mat, tech ) {
 	function ( mat, tech ) {
 
 
-		mat.clearCoat = tech.strength;
-		mat.clearCoatRoughness = tech.roughness;
+		mat.clearcoat = tech.strength;
+		mat.clearcoatRoughness = tech.roughness;
 
 
 	};
 	};
 
 

+ 2 - 2
examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.js

@@ -16,9 +16,9 @@ BlinnShininessExponentNode.prototype.nodeType = "BlinnShininessExponent";
 
 
 BlinnShininessExponentNode.prototype.generate = function ( builder, output ) {
 BlinnShininessExponentNode.prototype.generate = function ( builder, output ) {
 
 
-	if ( builder.isCache( 'clearCoat' ) ) {
+	if ( builder.isCache( 'clearcoat' ) ) {
 
 
-		return builder.format( 'Material_ClearCoat_BlinnShininessExponent( material )', this.type, output );
+		return builder.format( 'Material_Clearcoat_BlinnShininessExponent( material )', this.type, output );
 
 
 	} else {
 	} else {
 
 

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

@@ -25,9 +25,9 @@ NodeUtils.addShortcuts( StandardNodeMaterial.prototype, 'fragment', [
 	'roughness',
 	'roughness',
 	'metalness',
 	'metalness',
 	'reflectivity',
 	'reflectivity',
-	'clearCoat',
-	'clearCoatRoughness',
-	'clearCoatNormal',
+	'clearcoat',
+	'clearcoatRoughness',
+	'clearcoatNormal',
 	'normal',
 	'normal',
 	'emissive',
 	'emissive',
 	'ambient',
 	'ambient',

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

@@ -33,7 +33,7 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 	var code;
 	var code;
 
 
-	builder.define( this.clearCoat || this.clearCoatRoughness || this.clearCoatNormal ? 'PHYSICAL' : 'STANDARD' );
+	builder.define( this.clearcoat || this.clearcoatRoughness || this.clearcoatNormal ? 'PHYSICAL' : 'STANDARD' );
 
 
 	builder.requires.lights = true;
 	builder.requires.lights = true;
 
 
@@ -131,13 +131,13 @@ StandardNode.prototype.build = function ( builder ) {
 			gamma: true
 			gamma: true
 		};
 		};
 
 
-		var contextClearCoatEnvironment = {
+		var contextClearcoatEnvironment = {
 			bias: RoughnessToBlinnExponentNode,
 			bias: RoughnessToBlinnExponentNode,
-			viewNormal: new ExpressionNode('clearCoatNormal', 'v3'),
+			viewNormal: new ExpressionNode('clearcoatNormal', 'v3'),
 			gamma: true
 			gamma: true
 		};
 		};
 
 
-		var useClearCoat = ! builder.isDefined( 'STANDARD' );
+		var useClearcoat = ! builder.isDefined( 'STANDARD' );
 
 
 		// analyze all nodes to reuse generate codes
 		// analyze all nodes to reuse generate codes
 
 
@@ -151,9 +151,9 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 		if ( this.normal ) this.normal.analyze( builder );
 		if ( this.normal ) this.normal.analyze( builder );
 
 
-		if ( this.clearCoat ) this.clearCoat.analyze( builder );
-		if ( this.clearCoatRoughness ) this.clearCoatRoughness.analyze( builder );
-		if ( this.clearCoatNormal ) this.clearCoatNormal.analyze( builder );
+		if ( this.clearcoat ) this.clearcoat.analyze( builder );
+		if ( this.clearcoatRoughness ) this.clearcoatRoughness.analyze( builder );
+		if ( this.clearcoatNormal ) this.clearcoatNormal.analyze( builder );
 
 
 		if ( this.reflectivity ) this.reflectivity.analyze( builder );
 		if ( this.reflectivity ) this.reflectivity.analyze( builder );
 
 
@@ -193,9 +193,9 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 		var normal = this.normal ? this.normal.flow( builder, 'v3' ) : undefined;
 		var normal = this.normal ? this.normal.flow( builder, 'v3' ) : undefined;
 
 
-		var clearCoat = this.clearCoat ? this.clearCoat.flow( builder, 'f' ) : undefined;
-		var clearCoatRoughness = this.clearCoatRoughness ? this.clearCoatRoughness.flow( builder, 'f' ) : undefined;
-		var clearCoatNormal = this.clearCoatNormal ? this.clearCoatNormal.flow( builder, 'v3' ) : undefined;
+		var clearcoat = this.clearcoat ? this.clearcoat.flow( builder, 'f' ) : undefined;
+		var clearcoatRoughness = this.clearcoatRoughness ? this.clearcoatRoughness.flow( builder, 'f' ) : undefined;
+		var clearcoatNormal = this.clearcoatNormal ? this.clearcoatNormal.flow( builder, 'v3' ) : undefined;
 
 
 		var reflectivity = this.reflectivity ? this.reflectivity.flow( builder, 'f' ) : undefined;
 		var reflectivity = this.reflectivity ? this.reflectivity.flow( builder, 'f' ) : undefined;
 
 
@@ -222,7 +222,7 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 		}
 		}
 
 
-		var clearCoatEnv = useClearCoat && environment ? this.environment.flow( builder, 'c', { cache: 'clearCoat', context: contextClearCoatEnvironment, slot: 'environment' } ) : undefined;
+		var clearcoatEnv = useClearcoat && environment ? this.environment.flow( builder, 'c', { cache: 'clearcoat', context: contextClearcoatEnvironment, slot: 'environment' } ) : undefined;
 
 
 		var sheen = this.sheen ? this.sheen.flow( builder, 'c' ) : undefined;
 		var sheen = this.sheen ? this.sheen.flow( builder, 'c' ) : undefined;
 
 
@@ -304,11 +304,11 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 		}
 		}
 
 
-		if ( clearCoatNormal ) {
+		if ( clearcoatNormal ) {
 
 
 			output.push(
 			output.push(
-				clearCoatNormal.code,
-				'clearCoatNormal = ' + clearCoatNormal.result + ';'
+				clearcoatNormal.code,
+				'clearcoatNormal = ' + clearcoatNormal.result + ';'
 			);
 			);
 
 
 		}
 		}
@@ -320,29 +320,29 @@ StandardNode.prototype.build = function ( builder ) {
 			'material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );'
 			'material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );'
 		);
 		);
 
 
-		if ( clearCoat ) {
+		if ( clearcoat ) {
 
 
 			output.push(
 			output.push(
-				clearCoat.code,
-				'material.clearCoat = saturate( ' + clearCoat.result + ' );'
+				clearcoat.code,
+				'material.clearcoat = saturate( ' + clearcoat.result + ' );'
 			);
 			);
 
 
-		} else if ( useClearCoat ) {
+		} else if ( useClearcoat ) {
 
 
-			output.push( 'material.clearCoat = 0.0;' );
+			output.push( 'material.clearcoat = 0.0;' );
 
 
 		}
 		}
 
 
-		if ( clearCoatRoughness ) {
+		if ( clearcoatRoughness ) {
 
 
 			output.push(
 			output.push(
-				clearCoatRoughness.code,
-				'material.clearCoatRoughness = clamp( ' + clearCoatRoughness.result + ', 0.04, 1.0 );'
+				clearcoatRoughness.code,
+				'material.clearcoatRoughness = clamp( ' + clearcoatRoughness.result + ', 0.04, 1.0 );'
 			);
 			);
 
 
-		} else if ( useClearCoat ) {
+		} else if ( useClearcoat ) {
 
 
-			output.push( 'material.clearCoatRoughness = 0.0;' );
+			output.push( 'material.clearcoatRoughness = 0.0;' );
 
 
 		}
 		}
 
 
@@ -438,11 +438,11 @@ StandardNode.prototype.build = function ( builder ) {
 
 
 			}
 			}
 
 
-			if ( clearCoatEnv ) {
+			if ( clearcoatEnv ) {
 
 
 				output.push(
 				output.push(
-					clearCoatEnv.code,
-					"clearCoatRadiance += " + clearCoatEnv.result + ";"
+					clearcoatEnv.code,
+					"clearcoatRadiance += " + clearcoatEnv.result + ";"
 				);
 				);
 
 
 			}
 			}
@@ -509,9 +509,9 @@ StandardNode.prototype.copy = function ( source ) {
 
 
 	if ( source.normal ) this.normal = source.normal;
 	if ( source.normal ) this.normal = source.normal;
 
 
-	if ( source.clearCoat ) this.clearCoat = source.clearCoat;
-	if ( source.clearCoatRoughness ) this.clearCoatRoughness = source.clearCoatRoughness;
-	if ( source.clearCoatNormal ) this.clearCoatNormal = source.clearCoatNormal;
+	if ( source.clearcoat ) this.clearcoat = source.clearcoat;
+	if ( source.clearcoatRoughness ) this.clearcoatRoughness = source.clearcoatRoughness;
+	if ( source.clearcoatNormal ) this.clearcoatNormal = source.clearcoatNormal;
 
 
 	if ( source.reflectivity ) this.reflectivity = source.reflectivity;
 	if ( source.reflectivity ) this.reflectivity = source.reflectivity;
 
 
@@ -555,9 +555,9 @@ StandardNode.prototype.toJSON = function ( meta ) {
 
 
 		if ( this.normal ) data.normal = this.normal.toJSON( meta ).uuid;
 		if ( this.normal ) data.normal = this.normal.toJSON( meta ).uuid;
 
 
-		if ( this.clearCoat ) data.clearCoat = this.clearCoat.toJSON( meta ).uuid;
-		if ( this.clearCoatRoughness ) data.clearCoatRoughness = this.clearCoatRoughness.toJSON( meta ).uuid;
-		if ( this.clearCoatNormal ) data.clearCoatNormal = this.clearCoatNormal.toJSON( meta ).uuid;
+		if ( this.clearcoat ) data.clearcoat = this.clearcoat.toJSON( meta ).uuid;
+		if ( this.clearcoatRoughness ) data.clearcoatRoughness = this.clearcoatRoughness.toJSON( meta ).uuid;
+		if ( this.clearcoatNormal ) data.clearcoatNormal = this.clearcoatNormal.toJSON( meta ).uuid;
 
 
 		if ( this.reflectivity ) data.reflectivity = this.reflectivity.toJSON( meta ).uuid;
 		if ( this.reflectivity ) data.reflectivity = this.reflectivity.toJSON( meta ).uuid;
 
 

+ 1 - 1
examples/jsm/shaders/TranslucentShader.js

@@ -194,7 +194,7 @@ var TranslucentShader = {
 		"	#if defined( RE_IndirectSpecular )",
 		"	#if defined( RE_IndirectSpecular )",
 
 
 		"		vec3 radiance = vec3( 0.0 );",
 		"		vec3 radiance = vec3( 0.0 );",
-		"		vec3 clearCoatRadiance = vec3( 0.0 );",
+		"		vec3 clearcoatRadiance = vec3( 0.0 );",
 
 
 		"	#endif",
 		"	#endif",
 		ShaderChunk[ "lights_fragment_end" ],
 		ShaderChunk[ "lights_fragment_end" ],

+ 9 - 9
examples/webgl_materials_clearcoat_normalmap.html

@@ -87,12 +87,12 @@
 
 
 						var normalMap2 = textureLoader.load( "textures/water/Water_1_M_Normal.jpg" );
 						var normalMap2 = textureLoader.load( "textures/water/Water_1_M_Normal.jpg" );
 
 
-						var clearCoatNormaMap = textureLoader.load( "textures/pbr/Scratched_gold/Scratched_gold_01_1K_Normal.png" );
+						var clearcoatNormaMap = textureLoader.load( "textures/pbr/Scratched_gold/Scratched_gold_01_1K_Normal.png" );
 
 
 						//
 						//
 
 
 						var material = new THREE.MeshPhysicalMaterial( {
 						var material = new THREE.MeshPhysicalMaterial( {
-							clearCoat: 1.0,
+							clearcoat: 1.0,
 							envMap: hdrCubeRenderTarget.texture,
 							envMap: hdrCubeRenderTarget.texture,
 							map: diffuse
 							map: diffuse
 						} );
 						} );
@@ -105,7 +105,7 @@
 						// normalmap
 						// normalmap
 
 
 						var material = new THREE.MeshPhysicalMaterial( {
 						var material = new THREE.MeshPhysicalMaterial( {
-							clearCoat: 1.0,
+							clearcoat: 1.0,
 							envMap: hdrCubeRenderTarget.texture,
 							envMap: hdrCubeRenderTarget.texture,
 							map: diffuse,
 							map: diffuse,
 							normalMap: normalMap
 							normalMap: normalMap
@@ -118,12 +118,12 @@
 						// clearcoat
 						// clearcoat
 
 
 						var material = new THREE.MeshPhysicalMaterial( {
 						var material = new THREE.MeshPhysicalMaterial( {
-							clearCoat: 1.0,
+							clearcoat: 1.0,
 							metalness: 0.0,
 							metalness: 0.0,
 							color: 0xff0000,
 							color: 0xff0000,
 							envMap: hdrCubeRenderTarget.texture,
 							envMap: hdrCubeRenderTarget.texture,
-							clearCoatNormalMap: clearCoatNormaMap,
-							clearCoatNormalScale: new THREE.Vector2( 2.0, 2.0 )
+							clearcoatNormalMap: clearcoatNormaMap,
+							clearcoatNormalScale: new THREE.Vector2( 2.0, 2.0 )
 						} );
 						} );
 						var mesh = new THREE.Mesh( geometry, material );
 						var mesh = new THREE.Mesh( geometry, material );
 						mesh.position.x = - 100;
 						mesh.position.x = - 100;
@@ -133,14 +133,14 @@
 						// clearcoat + normalmap
 						// clearcoat + normalmap
 
 
 						var material = new THREE.MeshPhysicalMaterial( {
 						var material = new THREE.MeshPhysicalMaterial( {
-							clearCoat: 1.0,
+							clearcoat: 1.0,
 							metalness: 1.0,
 							metalness: 1.0,
 							color: 0xff0000,
 							color: 0xff0000,
 							envMap: hdrCubeRenderTarget.texture,
 							envMap: hdrCubeRenderTarget.texture,
 							normalMap: normalMap2,
 							normalMap: normalMap2,
 							normalScale: new THREE.Vector2( 0.15, 0.15 ),
 							normalScale: new THREE.Vector2( 0.15, 0.15 ),
-							clearCoatNormalMap: clearCoatNormaMap,
-							clearCoatNormalScale: new THREE.Vector2( 2.0, 2.0 )
+							clearcoatNormalMap: clearcoatNormaMap,
+							clearcoatNormalScale: new THREE.Vector2( 2.0, 2.0 )
 						} );
 						} );
 						var mesh = new THREE.Mesh( geometry, material );
 						var mesh = new THREE.Mesh( geometry, material );
 						mesh.position.x = 100;
 						mesh.position.x = 100;

+ 20 - 20
examples/webgl_materials_nodes.html

@@ -740,9 +740,9 @@
 						//mtl.roughness = // roughness (float)
 						//mtl.roughness = // roughness (float)
 						//mtl.metalness = // metalness (float)
 						//mtl.metalness = // metalness (float)
 						//mtl.reflectivity = // reflectivity (float)
 						//mtl.reflectivity = // reflectivity (float)
-						//mtl.clearCoat = // clearCoat (float)
-						//mtl.clearCoatRoughness = // clearCoatRoughness (float)
-						//mtl.clearCoatNormal = // clearCoatNormal (vec3)
+						//mtl.clearcoat = // clearcoat (float)
+						//mtl.clearcoatRoughness = // clearcoatRoughness (float)
+						//mtl.clearcoatNormal = // clearcoatNormal (vec3)
 						//mtl.normal = // normal (vec3)
 						//mtl.normal = // normal (vec3)
 						//mtl.emissive = // emissive color (vec3)
 						//mtl.emissive = // emissive color (vec3)
 						//mtl.ambient = // ambient color (vec3)
 						//mtl.ambient = // ambient color (vec3)
@@ -755,7 +755,7 @@
 						var mask = new Nodes.SwitchNode( new Nodes.TextureNode( getTexture( "decalDiffuse" ) ), 'w' );
 						var mask = new Nodes.SwitchNode( new Nodes.TextureNode( getTexture( "decalDiffuse" ) ), 'w' );
 
 
 						var normalScale = new Nodes.FloatNode( .3 );
 						var normalScale = new Nodes.FloatNode( .3 );
-						var clearCoatNormalScale = new Nodes.FloatNode( .1 );
+						var clearcoatNormalScale = new Nodes.FloatNode( .1 );
 
 
 						var roughnessA = new Nodes.FloatNode( .5 );
 						var roughnessA = new Nodes.FloatNode( .5 );
 						var metalnessA = new Nodes.FloatNode( .5 );
 						var metalnessA = new Nodes.FloatNode( .5 );
@@ -764,8 +764,8 @@
 						var metalnessB = new Nodes.FloatNode( 1 );
 						var metalnessB = new Nodes.FloatNode( 1 );
 
 
 						var reflectivity = new Nodes.FloatNode( 0 );
 						var reflectivity = new Nodes.FloatNode( 0 );
-						var clearCoat = new Nodes.FloatNode( 1 );
-						var clearCoatRoughness = new Nodes.FloatNode( 1 );
+						var clearcoat = new Nodes.FloatNode( 1 );
+						var clearcoatRoughness = new Nodes.FloatNode( 1 );
 
 
 						var roughness = new Nodes.MathNode(
 						var roughness = new Nodes.MathNode(
 							roughnessA,
 							roughnessA,
@@ -787,9 +787,9 @@
 							Nodes.OperatorNode.MUL
 							Nodes.OperatorNode.MUL
 						);
 						);
 
 
-						var clearCoatNormalMask = new Nodes.OperatorNode(
+						var clearcoatNormalMask = new Nodes.OperatorNode(
 							mask,
 							mask,
-							clearCoatNormalScale,
+							clearcoatNormalScale,
 							Nodes.OperatorNode.MUL
 							Nodes.OperatorNode.MUL
 						);
 						);
 
 
@@ -797,10 +797,10 @@
 						mtl.roughness = roughness;
 						mtl.roughness = roughness;
 						mtl.metalness = metalness;
 						mtl.metalness = metalness;
 						mtl.reflectivity = reflectivity;
 						mtl.reflectivity = reflectivity;
-						mtl.clearCoat = clearCoat;
-						mtl.clearCoatRoughness = clearCoatRoughness;
-						mtl.clearCoatNormal = new Nodes.NormalMapNode( new Nodes.TextureNode( getTexture( "grassNormal" ) ) );
-						mtl.clearCoatNormal.scale = clearCoatNormalMask;
+						mtl.clearcoat = clearcoat;
+						mtl.clearcoatRoughness = clearcoatRoughness;
+						mtl.clearcoatNormal = new Nodes.NormalMapNode( new Nodes.TextureNode( getTexture( "grassNormal" ) ) );
+						mtl.clearcoatNormal.scale = clearcoatNormalMask;
 						mtl.environment = new Nodes.CubeTextureNode( cubemap );
 						mtl.environment = new Nodes.CubeTextureNode( cubemap );
 						mtl.normal = new Nodes.NormalMapNode( new Nodes.TextureNode( getTexture( "grassNormal" ) ) );
 						mtl.normal = new Nodes.NormalMapNode( new Nodes.TextureNode( getTexture( "grassNormal" ) ) );
 						mtl.normal.scale = normalMask;
 						mtl.normal.scale = normalMask;
@@ -819,21 +819,21 @@
 
 
 						}, false, 0, 1 );
 						}, false, 0, 1 );
 
 
-						addGui( 'clearCoat', clearCoat.value, function ( val ) {
+						addGui( 'clearcoat', clearcoat.value, function ( val ) {
 
 
-							clearCoat.value = val;
+							clearcoat.value = val;
 
 
 						}, false, 0, 1 );
 						}, false, 0, 1 );
 
 
-						addGui( 'clearCoatRoughness', clearCoatRoughness.value, function ( val ) {
+						addGui( 'clearcoatRoughness', clearcoatRoughness.value, function ( val ) {
 
 
-							clearCoatRoughness.value = val;
+							clearcoatRoughness.value = val;
 
 
 						}, false, 0, 1 );
 						}, false, 0, 1 );
 
 
-						addGui( 'clearCoatNormalScale', clearCoatNormalScale.value, function ( val ) {
+						addGui( 'clearcoatNormalScale', clearcoatNormalScale.value, function ( val ) {
 
 
-							clearCoatNormalScale.value = val;
+							clearcoatNormalScale.value = val;
 
 
 						}, false, 0, 1 );
 						}, false, 0, 1 );
 
 
@@ -2236,8 +2236,8 @@
 							mtl.metalness = new Nodes.FloatNode( 0 );
 							mtl.metalness = new Nodes.FloatNode( 0 );
 							mtl.roughness = new Nodes.FloatNode( 1 );
 							mtl.roughness = new Nodes.FloatNode( 1 );
 							mtl.reflectivity = new Nodes.FloatNode( 0 );
 							mtl.reflectivity = new Nodes.FloatNode( 0 );
-							mtl.clearCoat = new Nodes.FloatNode( .2 );
-							mtl.clearCoatRoughness = new Nodes.FloatNode( .3 );
+							mtl.clearcoat = new Nodes.FloatNode( .2 );
+							mtl.clearcoatRoughness = new Nodes.FloatNode( .3 );
 							mtl.environment = new Nodes.CubeTextureNode( cubemap );
 							mtl.environment = new Nodes.CubeTextureNode( cubemap );
 
 
 						} else {
 						} else {

+ 6 - 6
examples/webgl_materials_variations_physical.html

@@ -96,8 +96,8 @@
 										color: diffuseColor,
 										color: diffuseColor,
 										metalness: 0,
 										metalness: 0,
 										roughness: 0.5,
 										roughness: 0.5,
-										clearCoat: 1.0 - alpha,
-										clearCoatRoughness: 1.0 - beta,
+										clearcoat: 1.0 - alpha,
+										clearcoatRoughness: 1.0 - beta,
 										reflectivity: 1.0 - gamma,
 										reflectivity: 1.0 - gamma,
 										envMap: ( index % 2 ) == 1 ? hdrCubeRenderTarget.texture : null
 										envMap: ( index % 2 ) == 1 ? hdrCubeRenderTarget.texture : null
 									} );
 									} );
@@ -148,11 +148,11 @@
 
 
 				}
 				}
 
 
-				addLabel( "+clearCoat", new THREE.Vector3( - 350, 0, 0 ) );
-				addLabel( "-clearCoat", new THREE.Vector3( 350, 0, 0 ) );
+				addLabel( "+clearcoat", new THREE.Vector3( - 350, 0, 0 ) );
+				addLabel( "-clearcoat", new THREE.Vector3( 350, 0, 0 ) );
 
 
-				addLabel( "+clearCoatRoughness", new THREE.Vector3( 0, - 300, 0 ) );
-				addLabel( "-clearCoatRoughness", new THREE.Vector3( 0, 300, 0 ) );
+				addLabel( "+clearcoatRoughness", new THREE.Vector3( 0, - 300, 0 ) );
+				addLabel( "-clearcoatRoughness", new THREE.Vector3( 0, 300, 0 ) );
 
 
 				addLabel( "+reflectivity", new THREE.Vector3( 0, 0, - 300 ) );
 				addLabel( "+reflectivity", new THREE.Vector3( 0, 0, - 300 ) );
 				addLabel( "-reflectivity", new THREE.Vector3( 0, 0, 300 ) );
 				addLabel( "-reflectivity", new THREE.Vector3( 0, 0, 300 ) );

+ 4 - 4
src/loaders/MaterialLoader.js

@@ -61,8 +61,8 @@ Object.assign( MaterialLoader.prototype, {
 		if ( json.emissive !== undefined ) material.emissive.setHex( json.emissive );
 		if ( json.emissive !== undefined ) material.emissive.setHex( json.emissive );
 		if ( json.specular !== undefined ) material.specular.setHex( json.specular );
 		if ( json.specular !== undefined ) material.specular.setHex( json.specular );
 		if ( json.shininess !== undefined ) material.shininess = json.shininess;
 		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.clearcoat !== undefined ) material.clearcoat = json.clearcoat;
+		if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;
 		if ( json.vertexColors !== undefined ) material.vertexColors = json.vertexColors;
 		if ( json.vertexColors !== undefined ) material.vertexColors = json.vertexColors;
 		if ( json.fog !== undefined ) material.fog = json.fog;
 		if ( json.fog !== undefined ) material.fog = json.fog;
 		if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
 		if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
@@ -229,8 +229,8 @@ Object.assign( MaterialLoader.prototype, {
 
 
 		if ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );
 		if ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );
 
 
-		if ( json.clearCoatNormalMap !== undefined ) material.clearCoatNormalMap = getTexture( json.clearCoatNormalMap );
-		if ( json.clearCoatNormalScale !== undefined ) material.clearCoatNormalScale = new Vector2().fromArray( json.clearCoatNormalScale );
+		if ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap );
+		if ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale );
 
 
 		return material;
 		return material;
 
 

+ 5 - 5
src/materials/Material.js

@@ -172,13 +172,13 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 		if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();
 		if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();
 		if ( this.shininess !== undefined ) data.shininess = this.shininess;
 		if ( this.shininess !== undefined ) data.shininess = this.shininess;
-		if ( this.clearCoat !== undefined ) data.clearCoat = this.clearCoat;
-		if ( this.clearCoatRoughness !== undefined ) data.clearCoatRoughness = this.clearCoatRoughness;
+		if ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;
+		if ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;
 
 
-		if ( this.clearCoatNormalMap && this.clearCoatNormalMap.isTexture ) {
+		if ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) {
 
 
-			data.clearCoatNormalMap = this.clearCoatNormalMap.toJSON( meta ).uuid;
-			data.clearCoatNormalScale = this.clearCoatNormalScale.toArray();
+			data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid;
+			data.clearcoatNormalScale = this.clearcoatNormalScale.toArray();
 
 
 		}
 		}
 
 

+ 8 - 8
src/materials/MeshPhysicalMaterial.d.ts

@@ -9,13 +9,13 @@ import { Color } from './../math/Color';
 export interface MeshPhysicalMaterialParameters
 export interface MeshPhysicalMaterialParameters
 	extends MeshStandardMaterialParameters {
 	extends MeshStandardMaterialParameters {
 	reflectivity?: number;
 	reflectivity?: number;
-	clearCoat?: number;
-	clearCoatRoughness?: number;
+	clearcoat?: number;
+	clearcoatRoughness?: number;
 
 
 	sheen?: Color;
 	sheen?: Color;
 
 
-	clearCoatNormalScale?: Vector2;
-	clearCoatNormalMap?: Texture;
+	clearcoatNormalScale?: Vector2;
+	clearcoatNormalMap?: Texture;
 }
 }
 
 
 export class MeshPhysicalMaterial extends MeshStandardMaterial {
 export class MeshPhysicalMaterial extends MeshStandardMaterial {
@@ -24,12 +24,12 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 
 	defines: any;
 	defines: any;
 	reflectivity: number;
 	reflectivity: number;
-	clearCoat: number;
-	clearCoatRoughness: number;
+	clearcoat: number;
+	clearcoatRoughness: number;
 
 
 	sheen: Color | null;
 	sheen: Color | null;
 
 
-	clearCoatNormalScale: Vector2;
-	clearCoatNormalMap: Texture | null;
+	clearcoatNormalScale: Vector2;
+	clearcoatNormalMap: Texture | null;
 
 
 }
 }

+ 12 - 12
src/materials/MeshPhysicalMaterial.js

@@ -7,13 +7,13 @@ import { Color } from '../math/Color.js';
  *
  *
  * parameters = {
  * parameters = {
  *  reflectivity: <float>
  *  reflectivity: <float>
- *  clearCoat: <float>
- *  clearCoatRoughness: <float>
+ *  clearcoat: <float>
+ *  clearcoatRoughness: <float>
  *
  *
  *  sheen: <Color>
  *  sheen: <Color>
  *
  *
- *  clearCoatNormalScale: <Vector2>,
- *  clearCoatNormalMap: new THREE.Texture( <Image> ),
+ *  clearcoatNormalScale: <Vector2>,
+ *  clearcoatNormalMap: new THREE.Texture( <Image> ),
  * }
  * }
  */
  */
 
 
@@ -27,13 +27,13 @@ function MeshPhysicalMaterial( parameters ) {
 
 
 	this.reflectivity = 0.5; // maps to F0 = 0.04
 	this.reflectivity = 0.5; // maps to F0 = 0.04
 
 
-	this.clearCoat = 0.0;
-	this.clearCoatRoughness = 0.0;
+	this.clearcoat = 0.0;
+	this.clearcoatRoughness = 0.0;
 
 
 	this.sheen = null; // null will disable sheen bsdf
 	this.sheen = null; // null will disable sheen bsdf
 
 
-	this.clearCoatNormalScale = new Vector2( 1, 1 );
-	this.clearCoatNormalMap = null;
+	this.clearcoatNormalScale = new Vector2( 1, 1 );
+	this.clearcoatNormalMap = null;
 
 
 	this.setValues( parameters );
 	this.setValues( parameters );
 
 
@@ -52,14 +52,14 @@ MeshPhysicalMaterial.prototype.copy = function ( source ) {
 
 
 	this.reflectivity = source.reflectivity;
 	this.reflectivity = source.reflectivity;
 
 
-	this.clearCoat = source.clearCoat;
-	this.clearCoatRoughness = source.clearCoatRoughness;
+	this.clearcoat = source.clearcoat;
+	this.clearcoatRoughness = source.clearcoatRoughness;
 
 
 	if ( source.sheen ) this.sheen = ( this.sheen || new Color() ).copy( source.sheen );
 	if ( source.sheen ) this.sheen = ( this.sheen || new Color() ).copy( source.sheen );
 	else this.sheen = null;
 	else this.sheen = null;
 
 
-	this.clearCoatNormalMap = source.clearCoatNormalMap;
-	this.clearCoatNormalScale.copy( source.clearCoatNormalScale );
+	this.clearcoatNormalMap = source.clearcoatNormalMap;
+	this.clearcoatNormalScale.copy( source.clearcoatNormalScale );
 
 
 	return this;
 	return this;
 
 

+ 6 - 6
src/renderers/WebGLRenderer.js

@@ -2269,18 +2269,18 @@ function WebGLRenderer( parameters ) {
 
 
 		uniforms.reflectivity.value = material.reflectivity; // also part of uniforms common
 		uniforms.reflectivity.value = material.reflectivity; // also part of uniforms common
 
 
-		uniforms.clearCoat.value = material.clearCoat;
-		uniforms.clearCoatRoughness.value = material.clearCoatRoughness;
+		uniforms.clearcoat.value = material.clearcoat;
+		uniforms.clearcoatRoughness.value = material.clearcoatRoughness;
 		if ( material.sheen ) uniforms.sheen.value.copy( material.sheen );
 		if ( material.sheen ) uniforms.sheen.value.copy( material.sheen );
 
 
-		if ( material.clearCoatNormalMap ) {
+		if ( material.clearcoatNormalMap ) {
 
 
-			uniforms.clearCoatNormalScale.value.copy( material.clearCoatNormalScale );
-			uniforms.clearCoatNormalMap.value = material.clearCoatNormalMap;
+			uniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale );
+			uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;
 
 
 			if ( material.side === BackSide ) {
 			if ( material.side === BackSide ) {
 
 
-				uniforms.clearCoatNormalScale.value.negate();
+				uniforms.clearcoatNormalScale.value.negate();
 
 
 			}
 			}
 
 

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

@@ -1,7 +1,7 @@
 export default /* glsl */`
 export default /* glsl */`
 #ifdef PHYSICAL
 #ifdef PHYSICAL
 
 
-	vec3 clearCoatNormal = geometryNormal;
+	vec3 clearcoatNormal = geometryNormal;
 
 
 #endif
 #endif
 `;
 `;

+ 4 - 4
src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.js

@@ -3,14 +3,14 @@ export default /* glsl */`
 
 
 	#ifdef USE_TANGENT
 	#ifdef USE_TANGENT
 
 
-		mat3 vTBN = mat3( tangent, bitangent, clearCoatNormal );
+		mat3 vTBN = mat3( tangent, bitangent, clearcoatNormal );
 		vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
 		vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
-		mapN.xy = clearCoatNormalScale * mapN.xy;
-		clearCoatNormal = normalize( vTBN * mapN );
+		mapN.xy = clearcoatNormalScale * mapN.xy;
+		clearcoatNormal = normalize( vTBN * mapN );
 
 
 	#else
 	#else
 
 
-		clearCoatNormal = perturbNormal2Arb( - vViewPosition, clearCoatNormal, clearCoatNormalScale, clearCoatNormalMap );
+		clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatNormalScale, clearcoatNormalMap );
 
 
 	#endif
 	#endif
 
 

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

@@ -1,8 +1,8 @@
 export default /* glsl */`
 export default /* glsl */`
 #ifdef USE_CLEARCOAT_NORMALMAP
 #ifdef USE_CLEARCOAT_NORMALMAP
 
 
-	uniform sampler2D clearCoatNormalMap;
-	uniform vec2 clearCoatNormalScale;
+	uniform sampler2D clearcoatNormalMap;
+	uniform vec2 clearcoatNormalScale;
 
 
 #endif
 #endif
 `;
 `;

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

@@ -40,7 +40,7 @@ struct GeometricContext {
 	vec3 normal;
 	vec3 normal;
 	vec3 viewDir;
 	vec3 viewDir;
 #ifdef PHYSICAL
 #ifdef PHYSICAL
-	vec3 clearCoatNormal;
+	vec3 clearcoatNormal;
 #endif
 #endif
 };
 };
 
 

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

@@ -22,7 +22,7 @@ geometry.viewDir = normalize( vViewPosition );
 
 
 #ifdef PHYSICAL
 #ifdef PHYSICAL
 
 
-	geometry.clearCoatNormal = clearCoatNormal;
+	geometry.clearcoatNormal = clearcoatNormal;
 
 
 #endif
 #endif
 
 
@@ -127,7 +127,7 @@ IncidentLight directLight;
 #if defined( RE_IndirectSpecular )
 #if defined( RE_IndirectSpecular )
 
 
 	vec3 radiance = vec3( 0.0 );
 	vec3 radiance = vec3( 0.0 );
-	vec3 clearCoatRadiance = vec3( 0.0 );
+	vec3 clearcoatRadiance = vec3( 0.0 );
 
 
 #endif
 #endif
 `;
 `;

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

@@ -7,7 +7,7 @@ export default /* glsl */`
 
 
 #if defined( RE_IndirectSpecular )
 #if defined( RE_IndirectSpecular )
 
 
-	RE_IndirectSpecular( radiance, irradiance, clearCoatRadiance, geometry, material, reflectedLight );
+	RE_IndirectSpecular( radiance, irradiance, clearcoatRadiance, geometry, material, reflectedLight );
 
 
 #endif
 #endif
 `;
 `;

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

@@ -29,7 +29,7 @@ export default /* glsl */`
 
 
 	#ifdef PHYSICAL
 	#ifdef PHYSICAL
 
 
-		clearCoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearCoatNormal, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );
+		clearcoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearcoatNormal, Material_Clearcoat_BlinnShininessExponent( material ), maxMipLevel );
 
 
 	#endif
 	#endif
 
 

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

@@ -6,8 +6,8 @@ material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );
 	material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
 	material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
 #else
 #else
 	material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
 	material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
-	material.clearCoat = saturate( clearCoat ); // Burley clearcoat model
-	material.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );
+	material.clearcoat = saturate( clearcoat ); // Burley clearcoat model
+	material.clearcoatRoughness = clamp( clearcoatRoughness, 0.04, 1.0 );
 #endif
 #endif
 #ifdef USE_SHEEN
 #ifdef USE_SHEEN
 	material.sheenColor = sheen;
 	material.sheenColor = sheen;

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

@@ -6,8 +6,8 @@ struct PhysicalMaterial {
 	vec3	specularColor;
 	vec3	specularColor;
 
 
 	#ifdef PHYSICAL
 	#ifdef PHYSICAL
-		float clearCoat;
-		float clearCoatRoughness;
+		float clearcoat;
+		float clearcoatRoughness;
 	#endif
 	#endif
 
 
 	#ifdef USE_SHEEN
 	#ifdef USE_SHEEN
@@ -20,7 +20,7 @@ struct PhysicalMaterial {
 #define DEFAULT_SPECULAR_COEFFICIENT 0.04
 #define DEFAULT_SPECULAR_COEFFICIENT 0.04
 
 
 // Clear coat directional hemishperical reflectance (this approximation should be improved)
 // Clear coat directional hemishperical reflectance (this approximation should be improved)
-float clearCoatDHRApprox( const in float roughness, const in float dotNL ) {
+float clearcoatDHRApprox( const in float roughness, const in float dotNL ) {
 
 
 	return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );
 	return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );
 
 
@@ -82,7 +82,7 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
 
 
 	#ifdef PHYSICAL
 	#ifdef PHYSICAL
 
 
-		float ccDotNL = saturate( dot( geometry.clearCoatNormal, directLight.direction ) );
+		float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );
 
 
 		vec3 ccIrradiance = ccDotNL * directLight.color;
 		vec3 ccIrradiance = ccDotNL * directLight.color;
 
 
@@ -92,28 +92,28 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
 
 
 		#endif
 		#endif
 
 
-		float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, ccDotNL );
+		float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
 
 
-		reflectedLight.directSpecular += ccIrradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearCoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );
+		reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
 
 
 	#else
 	#else
 
 
-		float clearCoatDHR = 0.0;
+		float clearcoatDHR = 0.0;
 
 
 	#endif
 	#endif
 
 
 	#ifdef USE_SHEEN
 	#ifdef USE_SHEEN
-		reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_Sheen(
+		reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(
 			material.specularRoughness,
 			material.specularRoughness,
 			directLight.direction,
 			directLight.direction,
 			geometry,
 			geometry,
 			material.sheenColor
 			material.sheenColor
 		);
 		);
 	#else
 	#else
-		reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);
+		reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);
 	#endif
 	#endif
 
 
-	reflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
+	reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
 }
 }
 
 
 void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
 void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
@@ -121,24 +121,24 @@ void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricCo
 
 
 }
 }
 
 
-void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
+void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
 
 
 	#ifdef PHYSICAL
 	#ifdef PHYSICAL
 
 
-		float ccDotNV = saturate( dot( geometry.clearCoatNormal, geometry.viewDir ) );
+		float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );
 
 
-		reflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearCoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );
+		reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
 
 
 		float ccDotNL = ccDotNV;
 		float ccDotNL = ccDotNV;
-		float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, ccDotNL );
+		float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
 
 
 	#else
 	#else
 
 
-		float clearCoatDHR = 0.0;
+		float clearcoatDHR = 0.0;
 
 
 	#endif
 	#endif
 
 
-	float clearCoatInv = 1.0 - clearCoatDHR;
+	float clearcoatInv = 1.0 - clearcoatDHR;
 
 
 	// Both indirect specular and diffuse light accumulate here
 	// Both indirect specular and diffuse light accumulate here
 	// if energy preservation enabled, and PMREM provided.
 	// if energy preservation enabled, and PMREM provided.
@@ -151,7 +151,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia
 
 
 	vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
 	vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
 
 
-	reflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;
+	reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;
 	reflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;
 	reflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;
 	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
 	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
 
 
@@ -163,7 +163,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia
 #define RE_IndirectSpecular		RE_IndirectSpecular_Physical
 #define RE_IndirectSpecular		RE_IndirectSpecular_Physical
 
 
 #define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )
 #define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )
-#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )
+#define Material_Clearcoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearcoatRoughness )
 
 
 // ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
 // ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
 float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
 float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {

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

@@ -273,11 +273,11 @@ ShaderLib.physical = {
 	uniforms: mergeUniforms( [
 	uniforms: mergeUniforms( [
 		ShaderLib.standard.uniforms,
 		ShaderLib.standard.uniforms,
 		{
 		{
-			clearCoat: { value: 0 },
-			clearCoatRoughness: { value: 0 },
+			clearcoat: { value: 0 },
+			clearcoatRoughness: { value: 0 },
 			sheen: { value: new Color( 0x000000 ) },
 			sheen: { value: new Color( 0x000000 ) },
-			clearCoatNormalScale: { value: new Vector2( 1, 1 ) },
-			clearCoatNormalMap: { value: null },
+			clearcoatNormalScale: { value: new Vector2( 1, 1 ) },
+			clearcoatNormalMap: { value: null },
 		}
 		}
 	] ),
 	] ),
 
 

+ 2 - 2
src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js

@@ -8,8 +8,8 @@ uniform float metalness;
 uniform float opacity;
 uniform float opacity;
 
 
 #ifdef PHYSICAL
 #ifdef PHYSICAL
-	uniform float clearCoat;
-	uniform float clearCoatRoughness;
+	uniform float clearcoat;
+	uniform float clearcoatRoughness;
 #endif
 #endif
 
 
 #ifdef USE_SHEEN
 #ifdef USE_SHEEN

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

@@ -120,7 +120,7 @@ function generateExtensions( extensions, parameters, rendererExtensions ) {
 	extensions = extensions || {};
 	extensions = extensions || {};
 
 
 	var chunks = [
 	var chunks = [
-		( extensions.derivatives || parameters.envMapCubeUV || parameters.bumpMap || ( parameters.normalMap && ! parameters.objectSpaceNormalMap ) || parameters.clearCoatNormalMap || parameters.flatShading ) ? '#extension GL_OES_standard_derivatives : enable' : '',
+		( extensions.derivatives || parameters.envMapCubeUV || parameters.bumpMap || ( parameters.normalMap && ! parameters.objectSpaceNormalMap ) || parameters.clearcoatNormalMap || parameters.flatShading ) ? '#extension GL_OES_standard_derivatives : enable' : '',
 		( extensions.fragDepth || parameters.logarithmicDepthBuffer ) && rendererExtensions.get( 'EXT_frag_depth' ) ? '#extension GL_EXT_frag_depth : enable' : '',
 		( extensions.fragDepth || parameters.logarithmicDepthBuffer ) && rendererExtensions.get( 'EXT_frag_depth' ) ? '#extension GL_EXT_frag_depth : enable' : '',
 		( extensions.drawBuffers ) && rendererExtensions.get( 'WEBGL_draw_buffers' ) ? '#extension GL_EXT_draw_buffers : require' : '',
 		( extensions.drawBuffers ) && rendererExtensions.get( 'WEBGL_draw_buffers' ) ? '#extension GL_EXT_draw_buffers : require' : '',
 		( extensions.shaderTextureLOD || parameters.envMap ) && rendererExtensions.get( 'EXT_shader_texture_lod' ) ? '#extension GL_EXT_shader_texture_lod : enable' : ''
 		( extensions.shaderTextureLOD || parameters.envMap ) && rendererExtensions.get( 'EXT_shader_texture_lod' ) ? '#extension GL_EXT_shader_texture_lod : enable' : ''
@@ -391,7 +391,7 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters,
 			parameters.bumpMap ? '#define USE_BUMPMAP' : '',
 			parameters.bumpMap ? '#define USE_BUMPMAP' : '',
 			parameters.normalMap ? '#define USE_NORMALMAP' : '',
 			parameters.normalMap ? '#define USE_NORMALMAP' : '',
 			( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',
 			( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',
-			parameters.clearCoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',
+			parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',
 			parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '',
 			parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '',
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
@@ -509,7 +509,7 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters,
 			parameters.bumpMap ? '#define USE_BUMPMAP' : '',
 			parameters.bumpMap ? '#define USE_BUMPMAP' : '',
 			parameters.normalMap ? '#define USE_NORMALMAP' : '',
 			parameters.normalMap ? '#define USE_NORMALMAP' : '',
 			( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',
 			( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',
-			parameters.clearCoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',
+			parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.specularMap ? '#define USE_SPECULARMAP' : '',
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
 			parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',
 			parameters.metalnessMap ? '#define USE_METALNESSMAP' : '',
 			parameters.metalnessMap ? '#define USE_METALNESSMAP' : '',

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

@@ -29,7 +29,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
 
 
 	var parameterNames = [
 	var parameterNames = [
 		"precision", "supportsVertexTextures", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding",
 		"precision", "supportsVertexTextures", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding",
-		"lightMap", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "clearCoatNormalMap", "displacementMap", "specularMap",
+		"lightMap", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "clearcoatNormalMap", "displacementMap", "specularMap",
 		"roughnessMap", "metalnessMap", "gradientMap",
 		"roughnessMap", "metalnessMap", "gradientMap",
 		"alphaMap", "combine", "vertexColors", "vertexTangents", "fog", "useFog", "fogExp2",
 		"alphaMap", "combine", "vertexColors", "vertexTangents", "fog", "useFog", "fogExp2",
 		"flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning",
 		"flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning",
@@ -154,7 +154,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
 			bumpMap: !! material.bumpMap,
 			bumpMap: !! material.bumpMap,
 			normalMap: !! material.normalMap,
 			normalMap: !! material.normalMap,
 			objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,
 			objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,
-			clearCoatNormalMap: !! material.clearCoatNormalMap,
+			clearcoatNormalMap: !! material.clearcoatNormalMap,
 			displacementMap: !! material.displacementMap,
 			displacementMap: !! material.displacementMap,
 			roughnessMap: !! material.roughnessMap,
 			roughnessMap: !! material.roughnessMap,
 			metalnessMap: !! material.metalnessMap,
 			metalnessMap: !! material.metalnessMap,
@@ -169,7 +169,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
 
 
 			vertexTangents: ( material.normalMap && material.vertexTangents ),
 			vertexTangents: ( material.normalMap && material.vertexTangents ),
 			vertexColors: material.vertexColors,
 			vertexColors: material.vertexColors,
-			vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearCoatNormalMap,
+			vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap,
 
 
 			fog: !! fog,
 			fog: !! fog,
 			useFog: material.fog,
 			useFog: material.fog,