Remove unused class

This commit is contained in:
Masataka SUMI
2021-05-07 19:26:12 +09:00
parent 77087f04e1
commit 07a3de4baa
2 changed files with 0 additions and 63 deletions

View File

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

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1a3edb24329fd454db97cac12f30c0d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: