diff --git a/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs index 07f72b544..8824eb7ab 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/MaterialExporter.cs @@ -40,7 +40,7 @@ namespace UniGLTF { if (m.HasProperty("_Color")) { - material.pbrMetallicRoughness.baseColorFactor = m.color.ToArray(); + material.pbrMetallicRoughness.baseColorFactor = m.color.linear.ToArray(); } if (m.HasProperty("_MainTex")) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/MaterialImporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/MaterialImporter.cs index 7ee5008d4..9d87cf084 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/MaterialImporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/MaterialImporter.cs @@ -102,7 +102,7 @@ namespace UniGLTF if (x.pbrMetallicRoughness.baseColorFactor != null && x.pbrMetallicRoughness.baseColorFactor.Length == 4) { var color = x.pbrMetallicRoughness.baseColorFactor; - material.color = new Color(color[0], color[1], color[2], color[3]); + material.color = (new Color(color[0], color[1], color[2], color[3])).gamma; } //renderMode @@ -145,7 +145,7 @@ namespace UniGLTF if (x.pbrMetallicRoughness.baseColorFactor != null && x.pbrMetallicRoughness.baseColorFactor.Length == 4) { var color = x.pbrMetallicRoughness.baseColorFactor; - material.color = new Color(color[0], color[1], color[2], color[3]); + material.color = (new Color(color[0], color[1], color[2], color[3])).gamma; } if (x.pbrMetallicRoughness.baseColorTexture != null && x.pbrMetallicRoughness.baseColorTexture.index != -1)