mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-12 05:24:14 -05:00
fix UseUnlit
This commit is contained in:
parent
cc353d1b10
commit
ca3f9cb835
|
|
@ -199,21 +199,6 @@ namespace UniGLTF
|
|||
}
|
||||
}
|
||||
|
||||
public static bool UseUnlit(string shaderName)
|
||||
{
|
||||
switch (shaderName)
|
||||
{
|
||||
case "Unlit/Color":
|
||||
case "Unlit/Texture":
|
||||
case "Unlit/Transparent":
|
||||
case "Unlit/Transparent Cutout":
|
||||
case "UniGLTF/UniUnlit":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
protected virtual glTFMaterial CreateMaterial(Material m)
|
||||
{
|
||||
switch (m.shader.name)
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ namespace VRM
|
|||
continue;
|
||||
}
|
||||
|
||||
if (MaterialExporter.UseUnlit(material.shader.name))
|
||||
if (VRMMaterialExporter.UseUnlit(material.shader.name))
|
||||
{
|
||||
// unlit
|
||||
continue;
|
||||
|
|
@ -240,7 +240,7 @@ namespace VRM
|
|||
continue;
|
||||
}
|
||||
|
||||
yield return Validation.Warning(string.Format("{0}: unknown material '{0}' is used. this will export as `Standard` fallback",
|
||||
yield return Validation.Warning(string.Format("{0}: unknown shader '{1}' is used. this will export as `Standard` fallback",
|
||||
material.name,
|
||||
material.shader.name));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,23 @@ namespace VRM
|
|||
{
|
||||
public class VRMMaterialExporter : MaterialExporter
|
||||
{
|
||||
public static bool UseUnlit(string shaderName)
|
||||
{
|
||||
switch (shaderName)
|
||||
{
|
||||
case "Unlit/Color":
|
||||
case "Unlit/Texture":
|
||||
case "Unlit/Transparent":
|
||||
case "Unlit/Transparent Cutout":
|
||||
case "UniGLTF/UniUnlit":
|
||||
case "VRM/UnlitTexture":
|
||||
case "VRM/UnlitTransparent":
|
||||
case "VRM/UnlitCutout":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override glTFMaterial CreateMaterial(Material m)
|
||||
{
|
||||
switch (m.shader.name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user