mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-11 21:38:56 -05:00
Rename
This commit is contained in:
@@ -12,15 +12,15 @@ namespace UniGLTF
|
||||
{
|
||||
public MaterialImportParam GetMaterialParam(GltfParser parser, int i)
|
||||
{
|
||||
if (!GltfUnlitMaterial.TryCreateParam(parser, i, out var param))
|
||||
if (!GltfUnlitMaterialImporter.TryCreateParam(parser, i, out var param))
|
||||
{
|
||||
if (!GltfPBRMaterial.TryCreateParam(parser, i, out param))
|
||||
if (!GltfPbrMaterialImporter.TryCreateParam(parser, i, out param))
|
||||
{
|
||||
// fallback
|
||||
#if VRM_DEVELOP
|
||||
Debug.LogWarning($"material: {i} out of range. fallback");
|
||||
#endif
|
||||
return new MaterialImportParam(GetMaterialName(i, null), GltfPBRMaterial.ShaderName);
|
||||
return new MaterialImportParam(GetMaterialName(i, null), GltfPbrMaterialImporter.ShaderName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace UniGLTF
|
||||
/// _ZWrite
|
||||
///
|
||||
/// </summary>
|
||||
public static class GltfPBRMaterial
|
||||
public static class GltfPbrMaterialImporter
|
||||
{
|
||||
public const string ShaderName = "Standard";
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace UniGLTF
|
||||
// base color
|
||||
if (m.pbrMetallicRoughness?.baseColorTexture != null)
|
||||
{
|
||||
yield return GltfPBRMaterial.BaseColorTexture(parser, m);
|
||||
yield return GltfPbrMaterialImporter.BaseColorTexture(parser, m);
|
||||
}
|
||||
|
||||
// metallic roughness
|
||||
@@ -51,13 +51,13 @@ namespace UniGLTF
|
||||
// emission
|
||||
if (m.emissiveTexture != null)
|
||||
{
|
||||
yield return GltfPBRMaterial.EmissiveTexture(parser, m);
|
||||
yield return GltfPbrMaterialImporter.EmissiveTexture(parser, m);
|
||||
}
|
||||
|
||||
// normal
|
||||
if (m.normalTexture != null)
|
||||
{
|
||||
yield return GltfPBRMaterial.NormalTexture(parser, m);
|
||||
yield return GltfPbrMaterialImporter.NormalTexture(parser, m);
|
||||
}
|
||||
|
||||
// occlusion
|
||||
@@ -70,7 +70,7 @@ namespace UniGLTF
|
||||
// metallicSmooth and occlusion
|
||||
if (metallicRoughnessTexture.HasValue || occlusionTexture.HasValue)
|
||||
{
|
||||
yield return GltfPBRMaterial.StandardTexture(parser, m);
|
||||
yield return GltfPbrMaterialImporter.StandardTexture(parser, m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using VRMShaders;
|
||||
|
||||
namespace UniGLTF
|
||||
{
|
||||
public static class GltfUnlitMaterial
|
||||
public static class GltfUnlitMaterialImporter
|
||||
{
|
||||
public const string ShaderName = "UniGLTF/UniUnlit";
|
||||
|
||||
@@ -100,16 +100,16 @@ namespace VRM
|
||||
if (!TryCreateParam(parser, i, out MaterialImportParam param))
|
||||
{
|
||||
// unlit
|
||||
if (!GltfUnlitMaterial.TryCreateParam(parser, i, out param))
|
||||
if (!GltfUnlitMaterialImporter.TryCreateParam(parser, i, out param))
|
||||
{
|
||||
// pbr
|
||||
if (!GltfPBRMaterial.TryCreateParam(parser, i, out param))
|
||||
if (!GltfPbrMaterialImporter.TryCreateParam(parser, i, out param))
|
||||
{
|
||||
// fallback
|
||||
#if VRM_DEVELOP
|
||||
Debug.LogWarning($"material: {i} out of range. fallback");
|
||||
#endif
|
||||
return new MaterialImportParam(GltfMaterialImporter.GetMaterialName(i, null), GltfPBRMaterial.ShaderName);
|
||||
return new MaterialImportParam(GltfMaterialImporter.GetMaterialName(i, null), GltfPbrMaterialImporter.ShaderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace UniVRM10
|
||||
{
|
||||
try
|
||||
{
|
||||
pair = GltfPBRMaterial.BaseColorTexture(parser, src);
|
||||
pair = GltfPbrMaterialImporter.BaseColorTexture(parser, src);
|
||||
return true;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
@@ -81,7 +81,7 @@ namespace UniVRM10
|
||||
{
|
||||
try
|
||||
{
|
||||
pair = GltfPBRMaterial.EmissiveTexture(parser, src);
|
||||
pair = GltfPbrMaterialImporter.EmissiveTexture(parser, src);
|
||||
return true;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
@@ -101,7 +101,7 @@ namespace UniVRM10
|
||||
{
|
||||
try
|
||||
{
|
||||
pair = GltfPBRMaterial.NormalTexture(parser, src);
|
||||
pair = GltfPbrMaterialImporter.NormalTexture(parser, src);
|
||||
return true;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
|
||||
@@ -12,16 +12,16 @@ namespace UniVRM10
|
||||
if (!TryCreateMToonParam(parser, i, out MaterialImportParam param))
|
||||
{
|
||||
// unlit
|
||||
if (!GltfUnlitMaterial.TryCreateParam(parser, i, out param))
|
||||
if (!GltfUnlitMaterialImporter.TryCreateParam(parser, i, out param))
|
||||
{
|
||||
// pbr
|
||||
if (!GltfPBRMaterial.TryCreateParam(parser, i, out param))
|
||||
if (!GltfPbrMaterialImporter.TryCreateParam(parser, i, out param))
|
||||
{
|
||||
// fallback
|
||||
#if VRM_DEVELOP
|
||||
Debug.LogWarning($"material: {i} out of range. fallback");
|
||||
#endif
|
||||
return new MaterialImportParam(GltfMaterialImporter.GetMaterialName(i, null), GltfPBRMaterial.ShaderName);
|
||||
return new MaterialImportParam(GltfMaterialImporter.GetMaterialName(i, null), GltfPbrMaterialImporter.ShaderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user