From b0de7d1bc1373855b2b7197588d427b1e89f8383 Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Fri, 19 Jul 2019 13:15:38 -0400 Subject: [PATCH] Added test --- specs/lib/loadMtlSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specs/lib/loadMtlSpec.js b/specs/lib/loadMtlSpec.js index 2af7f0a..72cedcd 100644 --- a/specs/lib/loadMtlSpec.js +++ b/specs/lib/loadMtlSpec.js @@ -321,6 +321,18 @@ describe('loadMtl', () => { expect(material.alphaMode).toBe('BLEND'); expect(material.doubleSided).toBe(true); }); + + it('uses diffuse texture if diffuse and alpha are the same', () => { + options.metallicRoughness = true; + + const material = loadMtl._createMaterial({ + diffuseTexture : diffuseTexture, + alphaTexture : diffuseTexture + }, options); + + const pbr = material.pbrMetallicRoughness; + expect(pbr.baseColorTexture).toBe(diffuseTexture); + }); }); describe('specularGlossiness', () => {