Added a check to see if diffuse and alpha texture is the same.

This commit is contained in:
Tom Fili 2019-07-19 13:07:34 -04:00
parent 8fa5bf9d24
commit b913b0fa5f

View File

@ -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;