Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Custom Pass not working on Shader Graph shaders

Discussion in 'High Definition Render Pipeline' started by jjejj87, Mar 8, 2020.

  1. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    I am running Unity 2019.3f.4 HDRP 7.1.2
    I am using the outline custom pass shown here
    https://docs.unity3d.com/Packages/c....high-definition@7.1/changelog/CHANGELOG.html

    Basically, all shaders made with shader graph does not work(outline does not show). HDRP Lit shaders work just fine.
    When I build in Dev Mode, it all works fine.

    I am assuming this is related to this same issue I posted a few weeks ago
    https://forum.unity.com/threads/outline-custom-pass-issues.792972/

    Could the devs investigate this? Thank you
     
  2. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    Just wondering if anyone is aware of this...
     
    konsic likes this.
  3. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    Another update: The issue is still not fixed on Unity 2019.3.6f.1 HDRP 7.3.1

    Can we please get to this now?
     
  4. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    67
    Hello, are you using the Lit Shader Mode 'Deferred Only' mode in your HDRP asset config ? If you are, can you try setting it to Both and see if it fixes the issue ?
     
  5. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    Setting it to 'Both' did the job, but is there a performance overhead for this workaround?

    FYI, it also works in dev build mode with 'Deferred Only' setting.

    Can we get this fixed? Thanks!
     
  6. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    67
    Setting the Lit Shader Mode to Both doesn't affect the performance, it only increases your build time since you have to compile both deferred and forward shader variants.

    There is indeed an issue with dev build because it's not supposed to work, there must be a shader striping issue here, i'll take a look at that.
    And for the custom pass rendering issue i'm afraid the only thing we can do is to put a warning in the custom pass UI to warn about this behavior when rendering opaque objects. Even if we could fix it we'd end up with the exact same behavior than setting the Lit Shader Mode to Both (because you need to include and compile all the Forward variants even if you're in deferred only since custom passes uses only Forward) so i guess this workaround is not so bad for now.
     
    jjejj87 likes this.
  7. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    Thanks for the detailed information!
     
unityunity