Jump to content
 
glenwrhodes

Stereo Eye Index for video

Recommended Posts

I have an over/under stereo video that I'm playing in a scene, but for some reason the image is coming in as monoscopic 360.  I suspect it's because Unity isn't properly setting the unity_StereoEyeIndex in the shader, which is needed to deteremine which part of the video to render to which eye.

 

Is there a workaround for this? Has anyone had any luck getting this kind of thing to work?

 

Thanks!

Share this post


Link to post
Share on other sites

Unfortunately this isn't actually working as stereo.  This is similar to what I had working, but the problem is the top image of the over/under is being sent to both eyes.

 

In the shader, there's this code to determine which portion of the source video to render into each fragment.

 

            if (_Layout == 0) // No 3D layout                o.layout3DScaleAndOffset = float4(0,0,1,1);            else if (_Layout == 1) // Side-by-Side 3D layout                o.layout3DScaleAndOffset = float4(unity_StereoEyeIndex,0,0.5,1);            else // Over-Under 3D layout                o.layout3DScaleAndOffset = float4(0, 1-unity_StereoEyeIndex,1,0.5);

It's dependent on unity_StereoEyeIndex being either 1 or 0.  In the SDK it appears to always be 0, no matter which eye the pixels are rendering to.  It appears that both eyes are being sent the same half of the video.

 

 

Share this post


Link to post
Share on other sites

Currently, unity_StereoEyeIndex  is not integrated with the Wave SDK.

 

We will have a separate solution in the next update, and will announce here as soon as it's available.

 

best,

Dario

Share this post


Link to post
Share on other sites

HI @Dario

At the risk of bumping an old thread. We just ran into the same issue on WaveVR v3.0.2. 

unity_StereoEyeIndex appears to be 0 always, regardless of whether multi-pass or single pass rendering is used. I scanned through all release notes but failed to find any reference to a "solution in the next update". Is this part of the new v3.1.1 beta? Your help is greatly appreciated. 

Arjen

@Tony PH Lin @Cotta

 

Share this post


Link to post
Share on other sites

HI @DarioFirst of all; thanks for reporting back on this issue. We have updated to Wave VR v3.1.6 beta but from our tests it looks like the unity_StereoEyeIndex field is still always zero regardless of multi-pass/single-pass rendering. We are using Unity 2018.3.0f2. Would this fix by any chance only work on another/newer version of Unity? Or is there some other setting we might be missing? Or, is there an alternative and efficient approach we can use to detect whether we are rendering to the left or right eye?

Thanks!

@Cotta @Tony PH Lin

Share this post


Link to post
Share on other sites

Hi @ArjenVeenhuizen

unity_StereoEyeIndex should be working with your Wave SDK and Unity versions. Please check if the preference settings are all correct.

1.png.d5d8a59e7f06587db72a2e79ce4003a0.png

You'll see this dialog describing the settings needed.

2.png.10c3fbeb9e2e5f829c7927b93aa1a86a.png

If everything is set correctly, you should see it shows current setting is True, as marked in yellow.

3.png.d54e63040c995691d4bf9a3dc381350e.png

If not, please check if you're following all settings as below.

4.png.6e2384c6d4febf76562ef7999644e85c.png

5.png.aebacfb4bcd053b78f7e04d094979944.png

If you confirm all settings are correct but still not seeing it works as expected, we'd suggest you can try create a new empty project and see if it helps. It clarifies if there's any unknown factor related.

Share this post


Link to post
Share on other sites

Please sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...