I’ve run into an issue with my deferred rendering pipeline on mobile. It looks like there aren’t any 32-bit precision surface formats that MG supports on iOS, so I’m forced to use a 16-bit depth render target, which causes noticeable error in my lighting. I see the same error when running on my PC when I change from Single to HalfSingle in DesktopGL, and similar results are documented here. I’ve read in a few places that you can’t directly sample from the depth buffer (where the standard 24-bit would produce less error) in XNA, so I assume the same is probably still true, and thus I’m manually writing depth to a render target.
I can’t find a definitive list from Apple, but based on examples, I believe there should be 32-bit precision pixel formats available for iOS.
So my questions and ideas are:
- Are there really no supported 32-bit precision formats in iOS, or what would it take to enable them?
- Since there are formats available that are 32 bits in size, but not precision, is it doable to hack apart my depth and piece it back together?
- Are there any other ways around this? Surely there are iOS games where shaders reconstruct position from depth.