Anonymous
6 years agounity_StereoEyeIndex always set to 0 for Oculus Quest?
Hi,
I'm trying to create a portal effect using render textures with no luck. I create two cameras to observe the other side of the portal, using the stereo settings from the main camera (separation and projection matrices), rendering to two separate render textures. Then, to render the portal itself, I want to select the appropriate texture based on the eye index.
But this test shows that the eye index is always 0 (renders red to both eyes):
I've also noticed that UNITY_SINGLE_PASS_STEREO is not defined when building for Quest. I have set "Multiview" rendering in the XR plugin, which is supposed to enable Unity's single pass stereo infrastructure.
Any ideas?
Thank you!
I'm trying to create a portal effect using render textures with no luck. I create two cameras to observe the other side of the portal, using the stereo settings from the main camera (separation and projection matrices), rendering to two separate render textures. Then, to render the portal itself, I want to select the appropriate texture based on the eye index.
But this test shows that the eye index is always 0 (renders red to both eyes):
fixed4 color = unity_StereoEyeIndex == 0 ? fixed4(1.0, 0.0, 0.0, 1) : fixed4(0.0, 0.0, 1.0, 1.0);
I've also noticed that UNITY_SINGLE_PASS_STEREO is not defined when building for Quest. I have set "Multiview" rendering in the XR plugin, which is supposed to enable Unity's single pass stereo infrastructure.
Any ideas?
Thank you!