mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-17 18:46:41 -05:00
28 lines
830 B
C#
28 lines
830 B
C#
using System;
|
|
using UniGLTF;
|
|
using UnityEngine;
|
|
using VRMShaders;
|
|
|
|
|
|
namespace VRM
|
|
{
|
|
public static class MToonTextureParam
|
|
{
|
|
public static (SubAssetKey, TextureImportParam) Create(GltfParser parser, int index, Vector2 offset, Vector2 scale, string prop, float metallicFactor, float roughnessFactor)
|
|
{
|
|
switch (prop)
|
|
{
|
|
case TextureImportParam.NORMAL_PROP:
|
|
return GltfTextureImporter.CreateNormal(parser, index, offset, scale);
|
|
|
|
default:
|
|
return GltfTextureImporter.CreateSRGB(parser, index, offset, scale);
|
|
|
|
case TextureImportParam.OCCLUSION_PROP:
|
|
case TextureImportParam.METALLIC_GLOSS_PROP:
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|
|
}
|