I am trying to use MetalKit newTextureWithContentsOfURL
to create the texture for a cow.
MTKTextureLoader *texture_loader = [[MTKTextureLoader alloc] initWithDevice:device];
NSURL *cow_image = [[NSBundle mainBundle] URLForResource:@"spot_texture" withExtension:@"png"];
NSError *error;
diffuse_texture = [texture_loader newTextureWithContentsOfURL:cow_image options:nil error:&error];
Here is the sample cow (top) and my cow (bottom) look.
I don't know the reason about this, but I think the options may help.
How to set this option using NSDictionary
?