public Texture2D GetImportTexture(Texture2D texture) { var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Import, null); TextureConverter.AppendTextureExtension(converted, m_extension); return(converted); }
public Texture2D GetExportTexture(Texture2D texture) { var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Export, null); TextureConverter.RemoveTextureExtension(converted, m_extension); return(converted); }
// 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); }