From b913b0fa5ff8584d6c94433542d3f8a1fd3d17a8 Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Fri, 19 Jul 2019 13:07:34 -0400 Subject: [PATCH] Added a check to see if diffuse and alpha texture is the same. --- lib/loadMtl.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/loadMtl.js b/lib/loadMtl.js index dc42545..1e55990 100644 --- a/lib/loadMtl.js +++ b/lib/loadMtl.js @@ -387,6 +387,10 @@ function createDiffuseAlphaTexture(diffuseTexture, alphaTexture, options) { return diffuseTexture; } + if (diffuseTexture.path === alphaTexture.path) { + return diffuseTexture; + } + if (!defined(diffuseTexture.pixels) || !defined(alphaTexture.pixels)) { options.logger('Could not get decoded texture data for ' + diffuseTexture.path + ' or ' + alphaTexture.path + '. The material will be created without an alpha texture.'); return diffuseTexture;