From d5c68f756db379687e034f562c4b292bf42130bf Mon Sep 17 00:00:00 2001 From: Paul Du Bois Date: Mon, 10 Feb 2020 17:18:11 -0800 Subject: [PATCH] glTF spec/gloss materials support textures Cherry-picked from TB Change-Id: Id000b015ab401d4269fee455d8dddb37cd0c52ae --- UnitySDK/Assets/TiltBrush/Scripts/Gltf/Gltf2Schema.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/Gltf2Schema.cs b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/Gltf2Schema.cs index 899337b6..0d1e9dea 100644 --- a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/Gltf2Schema.cs +++ b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/Gltf2Schema.cs @@ -234,6 +234,9 @@ private IEnumerable TextureInfos { if (pbrMetallicRoughness != null) { yield return pbrMetallicRoughness.baseColorTexture; yield return pbrMetallicRoughness.metallicRoughnessTexture; + } else if (extensions?.KHR_materials_pbrSpecularGlossiness != null) { + var specGloss = extensions.KHR_materials_pbrSpecularGlossiness; + yield return specGloss.diffuseTexture; } } }