I have a very basic usdz file from this repo
I call loadTextures()
after loading the usdz via MDLAsset
. Inspecting the MDLTexture
object I can tell it is assigning a colorspace of linear rgb instead of srgb although the image file in the usdz is srgb.
This causes the textures to ultimately render as over saturated.
In the code I later convert the MDLTexture
to MTLTexture
via MTKTextureLoader
but if I set the srgb option it seems to ignore it.
This significantly impacts the usefulness of Model I/O if it can't load a simple usdz texture correctly. Am I missing something?
Thanks!
Hi,
FWIW I can't reproduce the issue with Reality Composer Pro or the Xcode viewer.
It's unclear what's going with the transfer function (gamma vs linear) and/or jpeg support without more details.
Since this may be a defect in ModelIO or Metal, please file a bug report with the Feedback Assistant. To help expedite attach a focused sample project that demonstrates this issue.
Also of note, jpeg format doesn't support an alpha channel.