mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-11 05:19:14 -05:00
Remove unused class
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniGLTF
|
||||
{
|
||||
public static class ColorSpace
|
||||
{
|
||||
public static RenderTextureReadWrite GetColorSpace(this glTFTextureTypes textureType)
|
||||
{
|
||||
switch (textureType)
|
||||
{
|
||||
case glTFTextureTypes.SRGB:
|
||||
return RenderTextureReadWrite.sRGB;
|
||||
case glTFTextureTypes.OcclusionMetallicRoughness:
|
||||
case glTFTextureTypes.Normal:
|
||||
return RenderTextureReadWrite.Linear;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TryGetglTFTextureType(this glTF glTf, int textureIndex, out glTFTextureTypes textureType)
|
||||
{
|
||||
foreach (var material in glTf.materials)
|
||||
{
|
||||
var textureInfo = material.GetTextures().FirstOrDefault(x => (x != null) && x.index == textureIndex);
|
||||
if (textureInfo != null)
|
||||
{
|
||||
textureType = textureInfo.TextureType;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// textureIndex is not used by Material.
|
||||
textureType = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static RenderTextureReadWrite GetColorSpace(this glTF gltf, int textureIndex)
|
||||
{
|
||||
if (TryGetglTFTextureType(gltf, textureIndex, out glTFTextureTypes textureType))
|
||||
{
|
||||
return GetColorSpace(textureType);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RenderTextureReadWrite.sRGB;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a3edb24329fd454db97cac12f30c0d8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user