Camera Chains, Depth Clearing and Timewarp?
I'm working on upgrading a game from the 0.3 sdk to 0.4.1 and I've run into this problem.
Short version: I'm using multiple cameras and clearing depth, so I'm not giving the timewarp filter depth values for most pixels.

Click to enbiggen.
The game uses the following cameras (simplified a bit)
- Background
- World
- HUD
In 0.3 these would all be OVRCameraControllers and that worked fine. In 0.4.1 that's not an option so I'm currently doing the following.
- The HUD camera is the OVRCameraController
- All other cameras are active objects but disabled
- In OnPreRender each OVRCamera has a component that calls camera.Render on the world camera, which has a similar component/does the same for background
- All cameras are set to clear to depth (background will always draw all pixels)
This looks good! There's no lag, no doubling, draw orders are fine and there's no intersections.
But my understanding is that the timewarp post process makes use of the depth buffer, and in this method only the HUD camera has preserved it's depth.
My present plan is that once full screen effects work again (I can't get them to work at all on mac), I can clone off the depth of each camera and composite a depth buffer for opaque pixels as a post process on the OVRCamera. Just getting the world camera would be fine, I get the feeling I might need to rescale Z regions so that the filter has depth to work on for the background.
It seems like a lot of work to do something that should be quite simple,
is there any easier way to go about it? Also is my plan going to work? (I'm pretty rusty at this stuff)
Short version: I'm using multiple cameras and clearing depth, so I'm not giving the timewarp filter depth values for most pixels.

Click to enbiggen.
The game uses the following cameras (simplified a bit)
- Background
- World
- HUD
In 0.3 these would all be OVRCameraControllers and that worked fine. In 0.4.1 that's not an option so I'm currently doing the following.
- The HUD camera is the OVRCameraController
- All other cameras are active objects but disabled
- In OnPreRender each OVRCamera has a component that calls camera.Render on the world camera, which has a similar component/does the same for background
- All cameras are set to clear to depth (background will always draw all pixels)
This looks good! There's no lag, no doubling, draw orders are fine and there's no intersections.
But my understanding is that the timewarp post process makes use of the depth buffer, and in this method only the HUD camera has preserved it's depth.
My present plan is that once full screen effects work again (I can't get them to work at all on mac), I can clone off the depth of each camera and composite a depth buffer for opaque pixels as a post process on the OVRCamera. Just getting the world camera would be fine, I get the feeling I might need to rescale Z regions so that the filter has depth to work on for the background.
It seems like a lot of work to do something that should be quite simple,
is there any easier way to go about it? Also is my plan going to work? (I'm pretty rusty at this stuff)
