Skip to content

Commit

Permalink
fix: glTF texture should ignore texture colorspace conversion, fix #32
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Feb 22, 2021
1 parent ddd170b commit 08f1252
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/loader/GLTFParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ const GLTFParser = Class.create(/** @lends GLTFParser.prototype */{
texture.resType = this.getImageType(textureData.source);
texture.src = uri;
texture.name = textureData.name || textureName;

// In glTF spec: Any colorspace information (such as ICC profiles, intents, etc) from PNG or JPEG containers must be ignored.
texture.colorSpaceConversion = false;

if (util.isBlobUrl(uri)) {
const onTextureLoad = () => {
util.revokeBlobUrl(uri);
Expand Down

0 comments on commit 08f1252

Please sign in to comment.