diff --git a/lib/obj2gltf.js b/lib/obj2gltf.js index 0ceeb37..fe51a20 100644 --- a/lib/obj2gltf.js +++ b/lib/obj2gltf.js @@ -63,8 +63,8 @@ function obj2gltf(objPath, options) { throw new DeveloperError('Either options.writer or options.outputDirectory must be defined when writing separate resources.'); } - if (options.metallicRoughness + options.specularGlossiness > 1) { - throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness].'); + if (options.metallicRoughness + options.specularGlossiness + options.unlit > 1) { + throw new DeveloperError('Only one material type may be set from [metallicRoughness, specularGlossiness, unlit].'); } if (defined(options.overridingTextures.metallicRoughnessOcclusionTexture) && defined(options.overridingTextures.specularGlossinessTexture)) {