diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs deleted file mode 100644 index 1274075ee..000000000 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs +++ /dev/null @@ -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; - } - } - } -} diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs.meta b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs.meta deleted file mode 100644 index d5bf0544c..000000000 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ColorSpace.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a3edb24329fd454db97cac12f30c0d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: