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); return(converted); }
public Texture2D GetImportTexture(Texture2D texture) { var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Import, null); TextureConverter.AppendTextureExtension(converted, m_extension); return(converted); }
// 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); }
public Texture2D GetExportTexture(Texture2D texture) { #if UNITY_WEBGL && !UNITY_EDITOR return(texture); #endif var mat = GetDecoder(); var converted = TextureConverter.Convert(texture, glTFTextureTypes.Normal, null, mat); TextureConverter.RemoveTextureExtension(converted, m_extension); return(converted); }
public Texture2D GetImportTexture(Texture2D texture) { if (!Application.isPlaying) { return(texture); } else { var mat = GetEncoder(); var converted = TextureConverter.Convert(texture, glTFTextureTypes.Normal, null, mat); TextureConverter.AppendTextureExtension(converted, m_extension); return(converted); } }
public Texture2D GetExportTexture(Texture2D texture) { var converted = TextureConverter.Convert(texture, glTFTextureTypes.Occlusion, Export, null); return(converted); }
public Texture2D GetImportTexture(Texture2D texture) { var converted = TextureConverter.Convert(texture, glTFTextureTypes.Metallic, Import, null); return(converted); }
// Unity texture to GLTF data // ConvertToRawColorWhenNormalValueIsCompressed public static Texture2D Export(Texture texture) { return(TextureConverter.Convert(texture, glTFTextureTypes.Normal, null, Decoder)); }