mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-18 16:53:15 -05:00
Merge pull request #1908 from Santarh/removeOlderShaderExporter
Stop supporting to export legacy vrm shaders.
This commit is contained in:
commit
a22c212a85
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user