Search Unity

HDRP postprocessing + world space canvas = blurred UI

Discussion in 'High Definition Render Pipeline' started by Evangeder, Jul 30, 2019.

  1. Evangeder

    Evangeder

    Joined:
    Feb 5, 2014
    Posts:
    11
    Steps to reproduce:
    1. Set up project / scene with hdrp
    2. Add scene settings with motion blur and/or depth of field
    3. Change canvas rendering to World Space - Camera
    4. Use manual settings in depth of field
    By doing this, canvas is getting blurred out with post processing along with terrain around. I was looking for a fix, because I need world space canvas in order to display a shader effect from shader graph.

    I tried (will edit this):
    • I looked for option to exclude layer from post processing in HDRP settings, scene setting and camera settings. There aren't any.
    • I made a separate camera for UI only that doesn't postprocess, and set it's depth to be above main camera. It disables post processing for main camera aswell, and I don't want that to happen.
    • Every script related workarounds are from old versions of unity that use old camera post-processing scripts, so they doesn't work anymore.
    Is there any way to solve this issue, or should I just simply give up on trying make FX in canvas, and just pay someone to do spritesheet animation for that?

    Thank you!

    Edit: workaround found.

    Make a new unlit hdrp shader and change Render Pass to After Postprocessing, save and drag the material with said shader into raw image.
     
    Last edited: Jul 31, 2019
    whogas likes this.
  2. whogas

    whogas

    Joined:
    Oct 18, 2013
    Posts:
    46
    @Evangeder

    I am having similar issues, trying to show a world-space UI with some transparency in an HDRP scene using Depth of Field. The entire canvas and all of its elements are blurred based on what is behind them. For instance, if an object is closer to the canvas, therefore receiving less DOF blur, the canvas portions in front of that object are clearer than the rest.

    I applied your solution, making a shadergraph shader with the Render Pass option changed. This allows me to apply this material to the background canvas and then the other elements are no longer blurred. However, the DOF effects behind the transparent element are also no longer blurred. It has created a clear window into the background area. Did you experience this or is it somewhat different than your situation?

    Thanks for helping me get this far, and any other info you have would be appreciated!
     
  3. Evangeder

    Evangeder

    Joined:
    Feb 5, 2014
    Posts:
    11
    @whogas

    I haven't got issues like those you said. Only UI is transparent, world post-processing is correct.
    You can see how it works here:


    The effects on UI are made in shadergraph, those are not animated sprites, so it clearly works great on my end :)
     
    whogas likes this.
  4. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    And update on this?
    What is the intended workflow?
    The forced 1 camera workflow from HDRP makes this not very easy

    The tone mapping and bloom affecting the Unity UI elements make them hard to read and blurry
     
  5. SunnyChow

    SunnyChow

    Joined:
    Jun 6, 2013
    Posts:
    360
    i think the keyowrd is world space canvas
     
  6. jirimotejlek

    jirimotejlek

    Joined:
    Nov 8, 2016
    Posts:
    20
    This is clearly an intended behaviour. Players can squint their eyes and/or guess what the UI elements do.
     
    Bubunski likes this.
  7. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Also wondering this. Bump.
     
  8. PlasmaByte

    PlasmaByte

    Joined:
    Sep 18, 2012
    Posts:
    6
    Had this problem but finally found a solution!
    The shadergraphs in this blog post allow for post processing effects to be ignored on the UI elements.
     
    Last edited: Oct 2, 2021
  9. EnricoSBmt

    EnricoSBmt

    Joined:
    Jan 7, 2022
    Posts:
    1
  10. Bubunski

    Bubunski

    Joined:
    Jun 11, 2021
    Posts:
    1
    pts cts pts cts