Browse Source

fixed copy/constructors of standard/physical materials

arobertson0 6 years ago
parent
commit
641e4f927a
2 changed files with 8 additions and 3 deletions
  1. 6 1
      src/materials/MeshPhysicalMaterial.js
  2. 2 2
      src/materials/MeshStandardMaterial.js

+ 6 - 1
src/materials/MeshPhysicalMaterial.js

@@ -48,7 +48,12 @@ MeshPhysicalMaterial.prototype.copy = function ( source ) {
 
 	MeshStandardMaterial.prototype.copy.call( this, source );
 
-	this.defines = { 'PHYSICAL': '' };
+	this.defines = {
+
+		'PHYSICAL': '',
+		'ADVANCED_PHYSICAL': ''
+
+	};
 
 	this.reflectivity = source.reflectivity;
 

+ 2 - 2
src/materials/MeshStandardMaterial.js

@@ -59,8 +59,8 @@ function MeshStandardMaterial( parameters ) {
 
 	Material.call( this );
 
-	this.defines = { 'STANDARD': '' };
-
+	this.defines = { 'PHYSICAL': '' };
+	
 	this.type = 'MeshStandardMaterial';
 
 	this.color = new Color( 0xffffff ); // diffuse