Skip to content

Commit

Permalink
fix incorrect colorspace usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Sep 7, 2023
1 parent a52dfae commit 34a9a05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/jsm/loaders/USDZLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ClampToEdgeWrapping,
FileLoader,
Group,
LinearSRGBColorSpace,
NoColorSpace,
Loader,
Mesh,
MeshStandardMaterial,
Expand Down Expand Up @@ -489,7 +489,7 @@ class USDZLoader extends Loader {
const sampler = findTexture( root, /(\w+).output/.exec( path )[ 1 ] );

material.normalMap = buildTexture( sampler );
material.normalMap.colorSpace = LinearSRGBColorSpace;
material.normalMap.colorSpace = NoColorSpace;

}

Expand All @@ -500,7 +500,7 @@ class USDZLoader extends Loader {

material.roughness = 1.0;
material.roughnessMap = buildTexture( sampler );
material.roughnessMap.colorSpace = LinearSRGBColorSpace;
material.roughnessMap.colorSpace = NoColorSpace;

} else if ( 'float inputs:roughness' in surface ) {

Expand All @@ -515,7 +515,7 @@ class USDZLoader extends Loader {

material.metalness = 1.0;
material.metalnessMap = buildTexture( sampler );
material.metalnessMap.colorSpace = LinearSRGBColorSpace;
material.metalnessMap.colorSpace = NoColorSpace;

} else if ( 'float inputs:metallic' in surface ) {

Expand All @@ -529,7 +529,7 @@ class USDZLoader extends Loader {
const sampler = findTexture( root, /(\w+).output/.exec( path )[ 1 ] );

material.aoMap = buildTexture( sampler );
material.aoMap.colorSpace = LinearSRGBColorSpace;
material.aoMap.colorSpace = NoColorSpace;

}

Expand All @@ -549,7 +549,7 @@ class USDZLoader extends Loader {
const sampler = data[ 'def Shader "normal_texture"' ];

material.normalMap = buildTexture( sampler );
material.normalMap.colorSpace = LinearSRGBColorSpace;
material.normalMap.colorSpace = NoColorSpace;

}

Expand Down

0 comments on commit 34a9a05

Please sign in to comment.