rename vrm10 material importer class names

This commit is contained in:
Masataka SUMI
2022-11-10 21:41:01 +09:00
parent 77e87eba38
commit 62085d255a
13 changed files with 11 additions and 11 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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

View File

@@ -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 の場合にマテリアル生成情報を作成する

View File

@@ -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)
{

View File

@@ -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)

View File

@@ -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);

View File

@@ -297,11 +297,11 @@ namespace UniVRM10.VRM10Viewer
{
if (useUrp)
{
return new Vrm10UrpMaterialDescriptorGenerator();
return new UrpVrm10MaterialDescriptorGenerator();
}
else
{
return new Vrm10MaterialDescriptorGenerator();
return new BuiltInVrm10MaterialDescriptorGenerator();
}
}