瀏覽代碼

fixed copy/constructors of standard/physical materials

arobertson0 6 年之前
父節點
當前提交
641e4f927a
共有 2 個文件被更改,包括 8 次插入3 次删除
  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