Example #1
0
        public Texture2D GetImportTexture(Texture2D texture)
        {
            var converted = TextureConverter.Convert(texture, GLTFTextureType.Metallic, Import, null);

            TextureConverter.AppendTextureExtension(converted, m_extension);
            return(converted);
        }
Example #2
0
        public Texture2D GetExportTexture(Texture2D texture)
        {
            var converted = TextureConverter.Convert(texture, GLTFTextureType.Metallic, Export, null);

            TextureConverter.RemoveTextureExtension(converted, m_extension);
            return(converted);
        }
Example #3
0
        public Texture2D GetExportTexture(Texture2D texture)
        {
#if UNITY_WEBGL && !UNITY_EDITOR
            return(texture);
#endif
            var mat       = GetDecoder();
            var converted = TextureConverter.Convert(texture, GLTFTextureType.Normal, null, mat);
            TextureConverter.RemoveTextureExtension(converted, m_extension);
            return(converted);
        }