(?) Custom pass not visible in final build

I havve this setup, very simple, just a plain color material for objects on a particular layer and then a pass that makes that color pulse using the time to animate… this works on the editor but once i build (in my case windows/pc) i don’t see the effect anymore…

Any idea why could this be working on editor but not on final build?

In case someone has this issue, solved this by setting the lit shader mode to forward only in the HDRP setting:

“Forward” is stripped for opaque objects in deferred rendering in a build
Reference: [Custom pass volume does not work in build](https://discussions.unity.com/t/921874/6)

1 Like

Setting the entire HDRP project to “forward only” might impact on your overall performance, depending on how you use real-time lights, etc.

Why not set it to “Both” instead?

2 Likes

Hi @mgeorgedeveloper_1 , I don’t want to necro this, but wouldn’t enabling only one option be better than enabling both? Wouldn’t both forward and deferred hurt performance more?

So from the documentation, the way I understand it is that certain shaders or lit shader in certain modes (for example transparent rendering) will force Forward, and that this setting has no effect on those shaders. So in theory, setting it to Both is only required if you want to render lit opaque surfaces using both Forward and Deferred. So you could try to set it to Deferred Only and see if you notice any side effects or broken things, especially in a build.

I remember switching it to Deferred Only at some point (long ago), then I had some weird issue in a build and from what I can remember, something that I was using actually required Forward mode. Not sure what, or if it was a bug, or if it was something that changed over time and would no longer be the case. I will also test this on my side some time.

1 Like

Thank you for the explanation.

I had a similar problem with custom passes. Their effects were not appearing in the final build when using Deferred only. So, I changed it to Both and it fixed it, thanks to your comment.