mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-30 22:46:44 -05:00
Specify color space in exporting VRM0 Material.
This commit is contained in:
parent
d9588fcac2
commit
dc9bd07f51
|
|
@ -5,6 +5,7 @@ using UniGLTF;
|
|||
using UniGLTF.ShaderPropExporter;
|
||||
using UnityEngine;
|
||||
using VRMShaders;
|
||||
using ColorSpace = UniGLTF.ColorSpace;
|
||||
|
||||
namespace VRM
|
||||
{
|
||||
|
|
@ -160,7 +161,8 @@ namespace VRM
|
|||
{
|
||||
case ShaderPropertyType.Color:
|
||||
{
|
||||
var value = m.GetColor(kv.Key).ToArray();
|
||||
// No color conversion. Because color property is serialized to raw float array.
|
||||
var value = m.GetColor(kv.Key).ToFloat4(ColorSpace.Linear, ColorSpace.Linear);
|
||||
material.vectorProperties.Add(kv.Key, value);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user