Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

_CameraDepthTexture completely wrong in Oculus Quest 2

Discussion in '2021.2 Beta' started by creat327, May 9, 2021.

  1. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Hi

    I'm testing different shaders that got Depth Texture in the Oculus Quest and they are all displayed wrong. They are fine in the editor but messed up on the Quest.

    The problem seems to be with the calculation of the function
    LinearEyeDepth

    For instance, you can check the built in
    Legacy Shaders/Particles/Additive

    Or whichever you like. If you move up and down, it seems the depth texture also moves with you up and down. Something very weird going on there using LinearEyeDepth

    They work perfectly fine in editor or even on htc vive and pc vr tests. It only happens on the Quest 2 of all my devices.

    I posted images and a video with the issue in the VR section here
    Bug - Oculus Quest Camera Depth buffer calculations are off - Unity Forum
     
    Last edited: May 9, 2021
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,127
    Hi @creat327,

    Could you please submit a bug report for this issue with a reproduction project attached?