Ejemplo n.º 1
0
        public Texture2D GetImportTexture(Texture2D texture)
        {
            var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Import, null);

            TextureConverter.AppendTextureExtension(converted, m_extension);
            return(converted);
        }
Ejemplo n.º 2
0
        public Texture2D GetExportTexture(Texture2D texture)
        {
            var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Export, null);

            TextureConverter.RemoveTextureExtension(converted, m_extension);
            return(converted);
        }
Ejemplo n.º 3
0
        // Unity texture to GLTF data
        // ConvertToRawColorWhenNormalValueIsCompressed
        public Texture2D GetExportTexture(Texture2D texture)
        {
            var mat       = GetDecoder();
            var converted = TextureConverter.Convert(texture, glTFTextureTypes.Normal, null, mat);

            TextureConverter.RemoveTextureExtension(converted, m_extension);
            return(converted);
        }