您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
658 B

using UnityEngine;
namespace VRMShaders
{
public static class NormalConverter
{
private static Material _exporter;
private static Material Exporter
{
get
{
if (_exporter == null)
{
_exporter = new Material(Shader.Find("Hidden/UniGLTF/NormalMapExporter"));
}
return _exporter;
}
}
// Unity texture to GLTF data
public static Texture2D Export(Texture texture)
{
return TextureConverter.CopyTexture(texture, ColorSpace.Linear, false, Exporter);
}
}
}