Skip to content

Commit

Permalink
addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish committed Dec 20, 2019
1 parent 07e2ba9 commit 91bb014
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions examples/js/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2111,6 +2111,13 @@ THREE.GLTFLoader = ( function () {

}

// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
if ( material.normalScale && ! useVertexTangents ) {

material.normalScale.y = - material.normalScale.y;

}

mesh.material = material;

};
Expand Down Expand Up @@ -2262,13 +2269,6 @@ THREE.GLTFLoader = ( function () {

if ( materialDef.name !== undefined ) material.name = materialDef.name;

// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
if ( material.normalScale && ! material.vertexTangents ) {

material.normalScale.y = - material.normalScale.y;

}

// baseColorTexture, emissiveTexture, and specularGlossinessTexture use sRGB encoding.
if ( material.map ) material.map.encoding = THREE.sRGBEncoding;
if ( material.emissiveMap ) material.emissiveMap.encoding = THREE.sRGBEncoding;
Expand Down
14 changes: 7 additions & 7 deletions examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2178,6 +2178,13 @@ var GLTFLoader = ( function () {

}

// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
if ( material.normalScale && ! useVertexTangents ) {

material.normalScale.y = - material.normalScale.y;

}

mesh.material = material;

};
Expand Down Expand Up @@ -2329,13 +2336,6 @@ var GLTFLoader = ( function () {

if ( materialDef.name !== undefined ) material.name = materialDef.name;

// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995
if ( material.normalScale && ! material.vertexTangents ) {

material.normalScale.y = - material.normalScale.y;

}

// baseColorTexture, emissiveTexture, and specularGlossinessTexture use sRGB encoding.
if ( material.map ) material.map.encoding = sRGBEncoding;
if ( material.emissiveMap ) material.emissiveMap.encoding = sRGBEncoding;
Expand Down

0 comments on commit 91bb014

Please sign in to comment.