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

HDRP Unlit Shader "Distortion Only" does not work

Discussion in 'Assets and Asset Store' started by Nerochoosingname, Jul 31, 2021.

  1. Nerochoosingname

    Nerochoosingname

    Joined:
    Oct 11, 2020
    Posts:
    5
    Would be cool if the buttons in Unity would actually do what they say.
    Distortion Only is checked, and not only is not showing any distortion, no matter what you put into the distortion value, it also shows the texture! That's the opposite of what "Distortion only" means! It's everything but Distortion!
    Can someone explain this to me? If the answer is( as it always is with this engine) "Oh yeah it's a bug that's been there since the beginning of time and everyone knows about it and Unity hasn't lifted a finger but made 30 new input systems, 24 new versions that change nothing and 200 new Render Pipelines in the meantime" I think I might just break my own ribs.
    upload_2021-7-31_15-58-20.png
     
    Mark_01, april_4_short and firstuser like this.
  2. firstuser

    firstuser

    Joined:
    May 5, 2016
    Posts:
    147
    Life is pain
     
    april_4_short likes this.
  3. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    I haven't used HDRP for a while, not since the last time I checked to see if it was worth using. Spoiler Alert: it still wasn't.

    But, to my thinking, the problem might be in the Rendering Pass dropdown, that's currently set to "Default".

    A distortion needs to be in a later pass (which usually won't be the default pass) so that it has something to distort.

    You'd be 100% correct if you said that pressing a button labelled "Distortion Only" should automatically change the rendering pass to something later in the rendering process, ideally one pass later than it was before pressing the Distortion button, even if that meant a new pass needed to be created.
     
  4. Nerochoosingname

    Nerochoosingname

    Joined:
    Oct 11, 2020
    Posts:
    5

    Interesting idea! So I changed the Default pass to "after post-processing" and nothing changed!
    I'm beginning to believe this is just an empty button in the shader graph that just does nothing, no matter what you do.
     
  5. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    Did you ever get this working?
     
  6. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    494
    Sorry to necro this thread a bit, but I thought the same thing, searched around and came here.

    The distortion input in the master node seems to be in pixels. I multiply this by pixel count (available in screen node). For safety, I clamp it to the min of (width, height). Probably not needed, but it sets a good upper limit and that gets me distortion on a 0-1 scale I can multiply by a slider.

    Check the attachments, and it should work.
     

    Attached Files: