Post

Replies

Boosts

Views

Activity

Reply to MTLTextureUsageShaderWrite & MetalKit
MTLTextureDescriptor *textureDescriptor = [[MTLTextureDescriptor alloc] init];   textureDescriptor.textureType = inTexture.textureType;   textureDescriptor.pixelFormat = inTexture.pixelFormat;   textureDescriptor.width = inTexture.width;   textureDescriptor.height = inTexture.height;   textureDescriptor.usage = inTexture.usage;   textureDescriptor.usage = MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite; // the key statement solved the issue
Oct ’22