From f44a9846e99d25bd798102a27207722d28cd9422 Mon Sep 17 00:00:00 2001 From: hiroj Date: Mon, 18 Mar 2019 19:54:38 +0900 Subject: [PATCH] If Emission keyword is false, do not output a value --- Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs index e8943e3363..07f72b544e 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs @@ -142,6 +142,9 @@ static void Export_Occlusion(Material m, TextureExportManager textureManager, gl static void Export_Emission(Material m, TextureExportManager textureManager, glTFMaterial material) { + if (m.IsKeywordEnabled("_EMISSION") == false) + return; + if (m.HasProperty("_EmissionColor")) { var color = m.GetColor("_EmissionColor");