Custom Pass not working on Shader Graph shaders

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/com.unity.render-pipelines.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

Could the devs investigate this? Thank you

Just wondering if anyone is aware of this…

1 Like

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?

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 ?

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!

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.

1 Like

Thanks for the detailed information!