The documentation says the pixel format of the environmentTexture
in an AREnvironmentProbeAnchor is bgra8Unorm_srgb
.
https://developer.apple.com/documentation/arkit/arenvironmentprobeanchor/2977511-environmenttexture
However, when I inspect the pixelFormat
property of the MTLTexture
it says it's rgba16Float
.
I'm trying to read the texture out as a PNG, and because it's a 16-bit float image, I'm assuming its color space is CGColorSpace.displayP3
, but I'm not 100% sure. The texture looks darker than what I expected.
Could it be that the color space is sRGB, but it's 16-bit because it's actually an HDR texture stored as linear RGB?
(Tested on iPhone 12, iOS 15)