I am getting images just like the one in this question:
Confused about thread_position_in_grid
The dark black color is in the lower-left corner, which means the gid.x
and gid.y
are both 0
in that part of the image. Yet the Metal docs (as well as answers like this: What is the coordinate system used in metal?) state that the origin is in the upper left corner, which means that should be where you see the dark black corner.
Why does this seem to not be the case?
I view the texture using CoreImage. I make a CIImage
like so:
CIImage(mtlTexture: kernelOutputTexture,
options: [CIImageOption.colorSpace: colorSpace])!
And then I view it in NSImageView like so:
let rep = NSCIImageRep(ciImage: image)
let nsImage = NSImage(size: rep.size)
nsImage.addRepresentation(rep)