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

            TextureConverter.AppendTextureExtension(converted, m_extension);
            return(converted);
        }
Exemple #2
0
        // GLTF data to Unity texture
        // ConvertToNormalValueFromRawColorWhenCompressionIsRequired
        public Texture2D GetImportTexture(Texture2D texture)
        {
            var mat       = GetEncoder();
            var converted = TextureConverter.Convert(texture, glTFTextureTypes.Normal, null, mat);

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