SKTexture not showing in Simulator

I am having a problem using SKTextures from SpriteKit in SceneKit. When using an SCNMaterial with an SKTexture the app will just show black shapes on the screen without any shades. This applies when when you run in the app in the simulator (iPhone/iPad, iOS9/iOS10). However on the real device the same code will work fine.

SCNMaterial *material = [SCNMaterial material];
material.diffuse.contents = [SKTexture textureWithImageNamed:@"tex128.png"];     // showing black in simulator
//material.diffuse.contents = [UIImage imageNamed:@"tex128.png"];      // showing the texture

This is probably due to the use of Metal in the framework, which isn't supported in the simulator. There's a few other visual things that don't work in the simulator for this reason.


Not documented, of course. You're supposed to surmise this, I suppose...

You are right. Disabling OpenGL on the device results in the same wrong behavior.

I will stay with using UIImage but SKTexture would have made a few things easier.

SKTexture not showing in Simulator
 
 
Q