diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/MaterialExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/MaterialExporter.cs index ab5da1bf9..8a58d5a2a 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/MaterialExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialIO/MaterialExporter.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using UniGLTF.UniUnlit; using UnityEngine; using VRMShaders; @@ -38,7 +39,10 @@ namespace UniGLTF if (m.HasProperty("_MainTex")) { - var index = textureManager.ExportAsSRgb(m.GetTexture("_MainTex"), needsAlpha: true); + var hasTransparency = string.Equals(material.alphaMode, "MASK", StringComparison.Ordinal) || + string.Equals(material.alphaMode, "BLEND", StringComparison.Ordinal); + + var index = textureManager.ExportAsSRgb(m.GetTexture("_MainTex"), hasTransparency); if (index != -1) { material.pbrMetallicRoughness.baseColorTexture = new glTFMaterialBaseColorTextureInfo()