Forum Discussion
rjmig88
11 years agoHonored Guest
[deleted]
[deleted]
4 Replies
Replies have been turned off for this discussion
- rjmig88Honored GuestAlso I tried OnPreRender, OnPreCull, and other variants I could think of. Other thread I started on the Unity forums: http://forum.unity3d.com/threads/blitti ... er.321683/
- rjmig88Honored GuestAnyone have any ideas?
- ddoubledeuceHonored GuestI'm currently in the exact same position as you - my solution is so far very similar to yours as well (Set up a 'monoCam', render that view into a RenderTexture, then blit / copy into the OVRdisplay's left and right eye textures).
I'm able to get it to work so far as rendering the scene entirely monoscopically by setting the OVR cameras to only render a 'stereo' layer - but never put anything in it. Then in OnPostRender of my monoscopic camera I blit its rendertexture into the left and right cameras.
This has the benefit of only rendering scene geometry once (just watching the profiler, I can see that the number of tris rendered is about half), but I am at a standstill as far as getting a blend of Monoscopic and Stereoscopic objects due to not being able to get the depth information into the OVRdisplay's eye textures - and as you said, I have some UI elements that are actually Monoscopic getting rendered on top of (closer to the camera than) some Stereo objects.
Unity's documentation (http://docs.unity3d.com/ScriptReference ... .Blit.html) states that in order to preserve the depth information one has to do a 'manual blit', however either their description is wrong, or it just doesn't work with Oculus' Unity Integration. When I call this before rendering the full screen quad:Graphics.SetRenderTarget(eyeTargets[eyeTexIx].colorBuffer, monoTexture.depthBuffer);
I'm not sure how this is supposed to 'copy' the depth buffer from monoTexture into eyeTargetssince the material that renders the full screen quad into eyeTargets has ZWrite disabled.
I've been thinking that in order to make this work, I might have to go down the route of writing a special shader and calling .Render() manually on the OVR cameras, but I haven't gone that far yet. Wondering if you've had any luck. - rjmig88Honored Guest[deleted]
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 4 months ago