mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-20 01:25:45 -05:00
rename vrm10 material importer class names
This commit is contained in:
@@ -72,7 +72,7 @@ namespace UniVRM10
|
||||
|
||||
var tmp = m_importer.GetExternalObjectMap();
|
||||
|
||||
var generator = new Vrm10MaterialDescriptorGenerator();
|
||||
var generator = new BuiltInVrm10MaterialDescriptorGenerator();
|
||||
var materialKeys = m_result.Data.GLTF.materials.Select((x, i) => generator.Get(m_result.Data, i).SubAssetKey);
|
||||
var textureKeys = new Vrm10TextureDescriptorGenerator(m_result.Data).Get().GetEnumerable().Select(x => x.SubAssetKey);
|
||||
m_materialEditor = new RemapEditorMaterial(materialKeys.Concat(textureKeys), GetEditorMap, SetEditorMap);
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace UniVRM10
|
||||
switch (renderPipeline)
|
||||
{
|
||||
case RenderPipelineTypes.BuiltinRenderPipeline:
|
||||
return new Vrm10MaterialDescriptorGenerator();
|
||||
return new BuiltInVrm10MaterialDescriptorGenerator();
|
||||
|
||||
case RenderPipelineTypes.UniversalRenderPipeline:
|
||||
return new Vrm10UrpMaterialDescriptorGenerator();
|
||||
return new UrpVrm10MaterialDescriptorGenerator();
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -6,12 +6,12 @@ using VRMShaders;
|
||||
|
||||
namespace UniVRM10
|
||||
{
|
||||
public sealed class Vrm10MaterialDescriptorGenerator : IMaterialDescriptorGenerator
|
||||
public sealed class BuiltInVrm10MaterialDescriptorGenerator : IMaterialDescriptorGenerator
|
||||
{
|
||||
public MaterialDescriptor Get(GltfData data, int i)
|
||||
{
|
||||
// mtoon
|
||||
if (Vrm10MToonMaterialImporter.TryCreateParam(data, i, out MaterialDescriptor matDesc)) return matDesc;
|
||||
if (BuiltInVrm10MToonMaterialImporter.TryCreateParam(data, i, out MaterialDescriptor matDesc)) return matDesc;
|
||||
// unlit
|
||||
if (BuiltInGltfUnlitMaterialImporter.TryCreateParam(data, i, out matDesc)) return matDesc;
|
||||
// pbr
|
||||
@@ -14,7 +14,7 @@ namespace UniVRM10
|
||||
/// <summary>
|
||||
/// Convert MToon parameters from glTF specification to Unity implementation.
|
||||
/// </summary>
|
||||
public static class Vrm10MToonMaterialImporter
|
||||
public static class BuiltInVrm10MToonMaterialImporter
|
||||
{
|
||||
/// <summary>
|
||||
/// VMRC_materials_mtoon の場合にマテリアル生成情報を作成する
|
||||
@@ -6,7 +6,7 @@ using VRMShaders;
|
||||
|
||||
namespace UniVRM10
|
||||
{
|
||||
public sealed class Vrm10UrpMaterialDescriptorGenerator : IMaterialDescriptorGenerator
|
||||
public sealed class UrpVrm10MaterialDescriptorGenerator : IMaterialDescriptorGenerator
|
||||
{
|
||||
public MaterialDescriptor Get(GltfData data, int i)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace UniVRM10
|
||||
m_controlRigGenerationOption = controlRigGenerationOption;
|
||||
|
||||
TextureDescriptorGenerator = new Vrm10TextureDescriptorGenerator(Data);
|
||||
MaterialDescriptorGenerator = materialGenerator ?? new Vrm10MaterialDescriptorGenerator();
|
||||
MaterialDescriptorGenerator = materialGenerator ?? new BuiltInVrm10MaterialDescriptorGenerator();
|
||||
|
||||
m_externalMap = externalObjectMap;
|
||||
if (m_externalMap == null)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace UniVRM10
|
||||
using (var data = new GlbLowLevelParser(AliciaPath, migratedBytes).Parse())
|
||||
{
|
||||
|
||||
var matDesc = new Vrm10MaterialDescriptorGenerator().Get(data, 0);
|
||||
var matDesc = new BuiltInVrm10MaterialDescriptorGenerator().Get(data, 0);
|
||||
Assert.AreEqual("Alicia_body", matDesc.Name);
|
||||
Assert.AreEqual("VRM10/MToon10", matDesc.ShaderName);
|
||||
Assert.AreEqual("Alicia_body", matDesc.TextureSlots["_MainTex"].UnityObjectName);
|
||||
|
||||
@@ -297,11 +297,11 @@ namespace UniVRM10.VRM10Viewer
|
||||
{
|
||||
if (useUrp)
|
||||
{
|
||||
return new Vrm10UrpMaterialDescriptorGenerator();
|
||||
return new UrpVrm10MaterialDescriptorGenerator();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Vrm10MaterialDescriptorGenerator();
|
||||
return new BuiltInVrm10MaterialDescriptorGenerator();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user