Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question [portal VR - steamVR] Unity depth buffer in VR / IPD issue ?

Discussion in 'VR' started by Yoirgla, Mar 27, 2022.

  1. Yoirgla

    Yoirgla

    Joined:
    Jan 2, 2015
    Posts:
    17
    Hello everyone.

    I'm resuming work on "Pathmaker", a portal-like game in VR.
    I'm having a weird issue maybe you fellas can help me with.
    I'm using steamVR plugin.

    I created a custom rig to manage both eyes separately with the objective of having the possibility to have one eye on each side of the portal for more "realism"

    upload_2022-3-27_12-2-15.png

    when going sideways trough a portal, here's how it unfolds from the left eye point of view :

    1 : portal on my left
    upload_2022-3-27_12-53-43.png
    2 : left eye went trough portal, head center didn't yet.
    upload_2022-3-27_12-54-17.png
    3 : left eye trough portal, head center trough portal
    upload_2022-3-27_12-54-40.png


    and here's the video :



    My theory is that while the eye itself is trough the portal, the head center is still the place where the depth buffer gets computed from. and here's my question :

    how can i force a per-eye (per camera) depth buffer with the correct eye position ?

    Any help is welcome :)

    Yoirgl.