Search Unity

How do I get my gameobject to appear in front of my UI?

Discussion in 'High Definition Render Pipeline' started by SdePauw, Aug 4, 2021.

  1. SdePauw

    SdePauw

    Joined:
    Oct 12, 2019
    Posts:
    3
    I'm working on a examine object mechanic in HDRP.
    When you examine the item everything else gets darker except the object your examining (I have a transparant black image which covers the whole screen).
    But I have been struggling actually getting the item to appear in front of the UI.

    Someone on reddit suggested using a custom pass because that worked for him in URP. Sadly I couldn't get that to work.

    Then I came across the graphic compositor which I kinda got it to work, with a second camera. But sadly the second cam also showed the sky in the main camera and had a pretty big impact on performance (±20 fps drop).

    Is there any way to get this right?