- Home /
Can I render two cameras simultaneously?
Hi guys,
I'm currently working on a VR app based on Google VR SDK. The VR object has two cameras (left eye and right eye). But the problem I realized is that the two cameras are rendered in sequence, which means the left eye camera calls OnPreCull(), OnPostRender(), etc., and then the right eye calls those functions afterward.
So here's my question: is it possible to make these two cameras render in parallel? So that they can start the same time and finish almost the same time.
If this is possible, will I benefit from this operation? Let's say currently the left eye camera takes 1ms to render, and then the right eye takes another 1ms, so it is totally 2ms for the VR camera to render. If I can make them render in parallel, can I finish all renderings in 1ms?
Thank you very much!
Answer by unidad2pete · Aug 14, 2017 at 06:03 AM
Clone your main camera, on this clone, on camera component (inspector) set Viewport Rect X to 0.5
I tried, but the clone camera is still rendering after the original camera.
Try to use RenderTexture and render only 1 camera.
http://i.imgur.com/kyZ2EUC.jpg
In this Example, there are only 1 camera.
Thank you very much for your posts. Could you share some sample codes or more detail to me?
$$anonymous$$y current situation is that two cameras need to render the scene in different view point, which means two cameras are placed in different locations (although they are pretty close to each other). I can hardly imagine how to achieve this with only one camera.
Thanks again!