mirror of https://github.com/CesiumGS/obj2gltf.git
Added a check to see if diffuse and alpha texture is the same.
This commit is contained in:
parent
8fa5bf9d24
commit
b913b0fa5f
|
@ -387,6 +387,10 @@ function createDiffuseAlphaTexture(diffuseTexture, alphaTexture, options) {
|
||||||
return diffuseTexture;
|
return diffuseTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (diffuseTexture.path === alphaTexture.path) {
|
||||||
|
return diffuseTexture;
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined(diffuseTexture.pixels) || !defined(alphaTexture.pixels)) {
|
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.');
|
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;
|
return diffuseTexture;
|
||||||
|
|
Loading…
Reference in New Issue