Skip to content

Commit e203359

Browse files
authored
USDZExporter: Only include metalnessMap/roughnessMap when metalness/roughness is 1 (#22201)
1 parent f92d90b commit e203359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/jsm/exporters/USDZExporter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ function buildMaterial( material, textures ) {
425425

426426
}
427427

428-
if ( material.roughnessMap !== null ) {
428+
if ( material.roughnessMap !== null && material.roughness === 1 ) {
429429

430430
inputs.push( `${ pad }float inputs:roughness.connect = </Materials/Material_${ material.id }/Texture_${ material.roughnessMap.id }_roughness.outputs:g>` );
431431

@@ -437,7 +437,7 @@ function buildMaterial( material, textures ) {
437437

438438
}
439439

440-
if ( material.metalnessMap !== null ) {
440+
if ( material.metalnessMap !== null && material.metalness === 1 ) {
441441

442442
inputs.push( `${ pad }float inputs:metallic.connect = </Materials/Material_${ material.id }/Texture_${ material.metalnessMap.id }_metallic.outputs:b>` );
443443

0 commit comments

Comments
 (0)