Search Unity

Bug 2022.2 Depth Still Broken

Discussion in 'High Definition Render Pipeline' started by EricFFG, May 25, 2023.

  1. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    We are having quite some troubles switching from 2022.1 to 2022.2.21

    It seems that the depth is still broken
    In a new unity project the depth is also broken, but similar to how it was in 2022.1

    upload_2023-5-25_13-55-41.png

    You see the depth repeating, which breaks depth based effects such as DOF and more

    Rendering debugger - material - gbuffer - depth
     
    Last edited: May 25, 2023
  2. Julien_Unity

    Julien_Unity

    Unity Technologies

    Joined:
    Nov 17, 2015
    Posts:
    72
    This representation is only used when using debug visualization and is expected. The goal of the repeating pattern is to make things more readable when most of the time the regular depth gradient would be too slow to change to make things easy to spot.
    It does not represent the actual state of the depth buffer (a quick capture with renderdoc will show the proper depth for example).
     
    Remy_Unity and chap-unity like this.
  3. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    upload_2023-5-25_14-54-23.png

    Ah really? Ok then I can't really explain why DOF does sometimes affect the top of our character when standing at a certain height on the screen, this looked exactly like that, and its somehow not shader related
     
  4. Julien_Unity

    Julien_Unity

    Unity Technologies

    Joined:
    Nov 17, 2015
    Posts:
    72
    Are you using orthographic projection? As stated in the documentation (here: HD Camera), it is currently not supported by HDRP for exactly the reason you are observing.
     
  5. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    183
    Hey, its using normal perspective, I think around 40°, not even close to parallel perspective

    Alright we will investigate what is going on there if this debug view is intentional