From ba086dc0edf4bf8631b447f481e6e9cfe43ad584 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 24 Jun 2021 15:27:19 +0900 Subject: [PATCH] Don't export alpha channel if alphaMode was not opaque in vrm1.0 --- Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs index 9e13c4285..7df34e41a 100644 --- a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs +++ b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs @@ -42,7 +42,7 @@ namespace UniVRM10 // Lighting dst.pbrMetallicRoughness = new glTFPbrMetallicRoughness(); dst.pbrMetallicRoughness.baseColorFactor = context.BaseColorFactorSrgb.ToFloat4(ColorSpace.sRGB, ColorSpace.Linear); - var baseColorTextureIndex = textureExporter.RegisterExportingAsSRgb(context.BaseColorTexture, needsAlpha: true); + var baseColorTextureIndex = textureExporter.RegisterExportingAsSRgb(context.BaseColorTexture, context.AlphaMode != MToon10AlphaMode.Opaque); if (baseColorTextureIndex != -1) { dst.pbrMetallicRoughness.baseColorTexture = new glTFMaterialBaseColorTextureInfo