Search Unity

How To Remove A World Space Ui From Post Processing?

Discussion in 'Cinemachine' started by supaworst, Apr 14, 2019.

  1. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    Hello everyones, i've just implemented cinemachine in my project to replace the old cameras but i can't figure out how to disable post processing on my UI layer to remove the blurring effect produced the dof.

    I've already tried to do what i usually do:

    1. i create a camera with post processing that draws all the layer except the UI one
    2. i create a second camera that draws just the UI layer and without post processing
    3. i give to the second camera an higher depth value to move it on top of the first one and i set the clear value to "none"
    It always worked with the old cameras but, using this technique with cinemachine, totally break the post processing so that it's swithced off.

    What am i missing? Does anyone have any suggestion?

    Thanks in advance and thanks for cinemachine!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,712
    Are you confusing camera with virtual camera?
    Set it up like this:

    Camera 1 (main camera with CM brain) with PP
    Lots of vcams with PP, controlling Camera 1

    Camera 2: UI camera. No cinemachine. Set is up as you would ordinarily, drawing just the UI layer
     
  3. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45

    First of all thanks for the reply, i've just tried again your suggestion but i had no luck.

    I forgot to mention that i'm using HDRP so maybe it could cause troubles with a double camera setup.
    Could it be a bug?

    Anyway, i'm attaching you a screenshot with two images: the top one is the post processed image with the GUI camera swithced off, the bottom one has also the GUI camera enabled (just the UI layer without the PP and depth value = 1).

    As you can see, the GUI camera on top of the other totally disable the PP.

    I hope i've been clear with my explanation, thanks again!
     

    Attached Files:

  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,712
  5. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    Thanks for the suggestion, i'm going ask there than!

    Best regards!
     
  6. RealArt1994

    RealArt1994

    Joined:
    Jul 7, 2019
    Posts:
    5
    just make new Unlit HDR Shader with Shadergraph
    you need multiply vertex color with your TextureMap2D to work with UI property olso you should rename TextureMap2D to _MainTex
    Now set your Material RenderingPass to After post-process
    use this shader for your UI
     
  7. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    488
    Using this shader on UI elements will exclude from Post-Processing?
    Could you show how to achieve this? Do you have a working example?
     
    lacas8282 likes this.