Post

Replies

Boosts

Views

Activity

Reply to How to save and load MTLTexture, getting back same RGB values?
Topic is old, but just in case if anyone encounter the same issue in future. This line create CIImage, without options. By default it chooses wrong color space here. let ciImage = CIImage(mtlTexture: metalTexture, options: [:]) Do it like this let colorSpace = CGColorSpaceCreateDeviceRGB() let options: [CIImageOption : Any] = [             .colorSpace: colorSpace ] let ciImage = CIImage(mtlTexture: metalTexture, options: options) It fixed issue with too light images for me. Just in case, I'm not using these images for actual switch between image and texture in production, this is for debugging purpose, because metal debuggin not always provide proper texture or working at all on older devices/sims
Feb ’23