Post

Replies

Boosts

Views

Activity

Reply to Cannot Load Texture with MTKTextureLoader
I know this is an old post, but there are still problems it seems even with the latest XCode 14 -- wondering if others can confirm this. I got this same error on a small 16x16 PNG that was just a white antialiased dot in PNG format. The file loaded fine into preview -- there was nothing wrong with it. After much experimentation (different sizes, remaking it) I finally discovered why it would not load -- I simply added some color tinting to the image so it was no longer greyscale and it loaded fine. Thinking there is some odd bug where it cannot handle a greyscale PNG. For my purposes I did not care about the color so it is a decent workaround. If others can confirm this I will try to file a bug report.
Nov ’22