Search Unity

Rendered camera on top of the other buggy in HDRP

Discussion in 'High Definition Render Pipeline' started by methusalah999, Aug 5, 2020.

  1. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    643
    Hi!

    I need to render a second camera (cam2) on top of the main one, with a different culling mask to draw UI element through everything else.

    The cam2 setup is:
    - no background,
    - only the UI layer in the culling mask,
    - same target display,
    - superior Depth (main camera is 0, cam2 is 1).

    Both camera have a TrackedPoseDriver component with the same parameters (center eye). Everything was working fine with this setup in built-in rendering. Now I've switched in HDRP, I've got bugs.

    upload_2020-8-5_12-16-32.png

    Each sphere should appear in front of the cubes, being rendered at a superior depth. This fails in must situations. Also, the line of sphere is duplicated with an horizontal offset.

    On the next screenshots, I've only rendered the cam2 on a single eye with the parameter Camera => XR => TargetEye. The spheres are drawn on both eyes (but no offset here) and the culling is ok only for the right eye when I target the right eye.

    upload_2020-8-5_12-27-1.png

    Again, this setup worked just fine in 2019.4 built-in rendering. This is made with 2019.4.6, HDRP 7.3.1, XR plugin Management 3.2.13 and OpenVR descktop 2.0.5

    How to solve this?