I’m converting an existing project, and I’m getting an error in Xcode when running in the simulator.
In Classes/Unity/MetalHelper.c, surface->layer.pixelFormat = colorFormat; is throwing unsupported extended range format
Debugging this line in Xcode, it’s being set to MTLPixelFormatBGR10_XR_sRGB.
I’ve stripped back the project to just a cube and a volume camera in an empty scene, and stripped back the all the project settings to match a known good working visionOS project.
In my known good visionOS project, debugging that same line, it’s being set toMTLPixelFormatBGRA8Unorm_sRGB
The fact that it’s happening with a scene with just a cube suggests to me that it’s caused by our transfer of the default reflection probe (ReflectionProbe.defaultTexture). This is typically stored as 24-bit RGB, which Metal doesn’t support, and hence we fall back to 32-bit RGBA (MTLPixelFormatBGRA8Unorm_sRGB). I’m not sure offhand why your default reflection probe would be in that format, but the lighting settings may hold a clue. There are some tips here about disabling the default reflection probe (which is only used in PolySpatial if you’re using our shader graph lighting node).
Think I figured it out - project had colour gamut set, but controls for that are not exposed in the visionOS tab, so didn’t see it there - ended up comparing the projectsettings.asset yaml with a known working one, then working back from there, where i found it in the iOS tab.