mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 14:59:43 -05:00
Updated UniGLTF
This commit is contained in:
@@ -50,7 +50,7 @@ namespace VRM
|
||||
var prefabPath = UnityPath.FromUnityPath(assetPath);
|
||||
var context = new VRMImporterContext();
|
||||
context.ParseGlb(File.ReadAllBytes(path));
|
||||
context.SaveTexturesAsPng(prefabPath);
|
||||
context.ExtranctImages(prefabPath);
|
||||
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace VRM
|
||||
var prefabPath = path.Parent.Child(path.FileNameWithoutExtension + ".prefab");
|
||||
|
||||
// save texture assets !
|
||||
context.SaveTexturesAsPng(prefabPath);
|
||||
context.ExtranctImages(prefabPath);
|
||||
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace VRM
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
MaterialImporter = new VRMMaterialImporter(this, glTF_VRM_Material.Parse(Json));
|
||||
SetMaterialImporter(new VRMMaterialImporter(this, glTF_VRM_Material.Parse(Json)));
|
||||
base.Load();
|
||||
OnLoadModel();
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace VRM
|
||||
{
|
||||
using (MeasureTime("new VRMMaterialImporter"))
|
||||
{
|
||||
MaterialImporter = new VRMMaterialImporter(this, gltfMaterials);
|
||||
SetMaterialImporter(new VRMMaterialImporter(this, gltfMaterials));
|
||||
}
|
||||
})
|
||||
.OnExecute(Scheduler.ThreadPool, parent =>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[PreExportShaders]
|
||||
public static SupportedShader[] VRMSupportedShaders = new SupportedShader[]
|
||||
{
|
||||
new SupportedShader(VRM_TARGET_FOLDER, "VRM/MToon", "_BumpMap"),
|
||||
new SupportedShader(VRM_TARGET_FOLDER, "VRM/MToon"),
|
||||
new SupportedShader(VRM_TARGET_FOLDER, "VRM/UnlitTexture"),
|
||||
new SupportedShader(VRM_TARGET_FOLDER, "VRM/UnlitCutout"),
|
||||
new SupportedShader(VRM_TARGET_FOLDER, "VRM/UnlitTransparent"),
|
||||
|
||||
@@ -15,36 +15,36 @@ namespace UniGLTF.ShaderPropExporter
|
||||
new ShaderProps
|
||||
{
|
||||
Properties = new ShaderProperty[]{
|
||||
new ShaderProperty("_Cutoff", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_Color", ShaderPropertyType.Color, false)
|
||||
,new ShaderProperty("_ShadeColor", ShaderPropertyType.Color, false)
|
||||
,new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_ShadeTexture", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_BumpScale", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_BumpMap", ShaderPropertyType.TexEnv, true)
|
||||
,new ShaderProperty("_ReceiveShadowRate", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_ReceiveShadowTexture", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_ShadeShift", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_ShadeToony", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_LightColorAttenuation", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_SphereAdd", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_EmissionColor", ShaderPropertyType.Color, false)
|
||||
,new ShaderProperty("_EmissionMap", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_OutlineWidthTexture", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_OutlineWidth", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_OutlineScaledMaxDistance", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_OutlineColor", ShaderPropertyType.Color, false)
|
||||
,new ShaderProperty("_OutlineLightingMix", ShaderPropertyType.Range, false)
|
||||
,new ShaderProperty("_DebugMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_BlendMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_OutlineWidthMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_OutlineColorMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_CullMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_OutlineCullMode", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_SrcBlend", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_DstBlend", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_ZWrite", ShaderPropertyType.Float, false)
|
||||
,new ShaderProperty("_IsFirstSetup", ShaderPropertyType.Float, false)
|
||||
new ShaderProperty("_Cutoff", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_Color", ShaderPropertyType.Color)
|
||||
,new ShaderProperty("_ShadeColor", ShaderPropertyType.Color)
|
||||
,new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_ShadeTexture", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_BumpScale", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_BumpMap", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_ReceiveShadowRate", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_ReceiveShadowTexture", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_ShadeShift", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_ShadeToony", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_LightColorAttenuation", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_SphereAdd", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_EmissionColor", ShaderPropertyType.Color)
|
||||
,new ShaderProperty("_EmissionMap", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_OutlineWidthTexture", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_OutlineWidth", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_OutlineScaledMaxDistance", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_OutlineColor", ShaderPropertyType.Color)
|
||||
,new ShaderProperty("_OutlineLightingMix", ShaderPropertyType.Range)
|
||||
,new ShaderProperty("_DebugMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_BlendMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_OutlineWidthMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_OutlineColorMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_CullMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_OutlineCullMode", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_SrcBlend", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_DstBlend", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_ZWrite", ShaderPropertyType.Float)
|
||||
,new ShaderProperty("_IsFirstSetup", ShaderPropertyType.Float)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace UniGLTF.ShaderPropExporter
|
||||
new ShaderProps
|
||||
{
|
||||
Properties = new ShaderProperty[]{
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv, false)
|
||||
,new ShaderProperty("_Cutoff", ShaderPropertyType.Range, false)
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
|
||||
,new ShaderProperty("_Cutoff", ShaderPropertyType.Range)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace UniGLTF.ShaderPropExporter
|
||||
new ShaderProps
|
||||
{
|
||||
Properties = new ShaderProperty[]{
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv, false)
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace UniGLTF.ShaderPropExporter
|
||||
new ShaderProps
|
||||
{
|
||||
Properties = new ShaderProperty[]{
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv, false)
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace UniGLTF.ShaderPropExporter
|
||||
new ShaderProps
|
||||
{
|
||||
Properties = new ShaderProperty[]{
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv, false)
|
||||
new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
2
UniGLTF
2
UniGLTF
Submodule UniGLTF updated: fb2176c8ea...25c88fb196
Reference in New Issue
Block a user