Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Possible to create UI Blur background !?

Discussion in 'High Definition Render Pipeline' started by Vagabond_, Oct 2, 2019.

  1. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    Hi, i am not a graphics programmer and was wondering if is it possible to create a UI shader to be used in these common cases where you blur a UI panel to hide scene when pausing game etc... ?
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
  3. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    If your UI works with HDRP, check the shader sources for the shader that's in use in the UI. Then modify it.
    EDIT: except it might not be easy, there's no GrabPass support for HDRP, so you probably have to think about something else + wait for someone more knowledgeable to help you.
     
  5. mephistonight

    mephistonight

    Joined:
    Dec 14, 2016
    Posts:
    75
    My understanding is that this is currently very difficult because grabpasses are not supported in shaders in any of the SRP's (it's terrible for performance).

    This https://twitter.com/andytouch/status/1181892667732643841 conversation on twitter with Andy Touch (Unity staff) is around the Universal RP but the difficulties are similar in the HDRP. Might be worth keeping an eye on that thread because he has been asked about doing the same for the HDRP. Note that as far as I'm aware, HDRP doesn't currently support custom render passes like the Universal RP does (?), so I'm not sure Andy's solution once released is even portable to the HDRP as things are.

    I'm currently using a 'hacky' method until I can find something else where I change the depth of field settings on a volume to blur the scene behind the UI.

    Hopefully someone else has a better suggestion.
     
    Pimpace likes this.
  6. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,105
    If you dont mind full screen blur, you can use the dof PP effect to get away with it.