Remove supporting legacy vrm shaders.

This commit is contained in:
Masataka SUMI
2022-11-04 21:48:54 +09:00
parent d9e4a744a6
commit d0d845ab2a

View File

@@ -10,33 +10,16 @@ namespace VRM
public static readonly string[] SupportedShaderNames =
{
BuiltInVrmMToonMaterialExporter.TargetShaderName,
"VRM/UnlitTexture",
"VRM/UnlitTransparent",
"VRM/UnlitCutout",
"VRM/UnlitTransparentZWrite",
};
private readonly BuiltInGltfMaterialExporter _gltfExporter = new BuiltInGltfMaterialExporter();
public glTFMaterial ExportMaterial(Material src, ITextureExporter textureExporter, GltfExportSettings settings)
{
glTFMaterial dst = default;
switch (src.shader.name)
{
case BuiltInVrmMToonMaterialExporter.TargetShaderName:
if (BuiltInVrmMToonMaterialExporter.TryExportMaterial(src, textureExporter, out dst)) return dst;
break;
case "VRM/UnlitTexture":
if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.OPAQUE, textureExporter, out dst)) return dst;
break;
case "VRM/UnlitTransparent":
if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.BLEND, textureExporter, out dst)) return dst;
break;
case "VRM/UnlitCutout":
if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.MASK, textureExporter, out dst)) return dst;
break;
case "VRM/UnlitTransparentZWrite":
if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.BLEND, textureExporter, out dst)) return dst;
if (BuiltInVrmMToonMaterialExporter.TryExportMaterial(src, textureExporter, out var dst)) return dst;
break;
}