浏览代码

USDZExporter: Only include metalnessMap/roughnessMap when metalness/roughness is 1 (#22201)

Mr.doob 4 年之前
父节点
当前提交
e203359dc8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/jsm/exporters/USDZExporter.js

+ 2 - 2
examples/jsm/exporters/USDZExporter.js

@@ -425,7 +425,7 @@ function buildMaterial( material, textures ) {
 
 	}
 
-	if ( material.roughnessMap !== null ) {
+	if ( material.roughnessMap !== null && material.roughness === 1 ) {
 
 		inputs.push( `${ pad }float inputs:roughness.connect = </Materials/Material_${ material.id }/Texture_${ material.roughnessMap.id }_roughness.outputs:g>` );
 
@@ -437,7 +437,7 @@ function buildMaterial( material, textures ) {
 
 	}
 
-	if ( material.metalnessMap !== null ) {
+	if ( material.metalnessMap !== null && material.metalness === 1 ) {
 
 		inputs.push( `${ pad }float inputs:metallic.connect = </Materials/Material_${ material.id }/Texture_${ material.metalnessMap.id }_metallic.outputs:b>` );