mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-27 02:24:04 -05:00
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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user