Hi, I am using the code from this page (at the very bottom, full code): Shader Pass and Multi-Pass Shader - codinBlack
When I tried to run this, I see that only 1 pass gets rendered, which is the main pass not the outline one.
So I tried using the UsePass directive twice after giving each pass a name, and it only renders the first UsePass directive.
It seems else where this code would work, because I have seen other examples just like this, could it be a configuration issue? …Thx in adv.
So after reading up on it, it turns out URP doesn’t support more than a single pass, unfortunately, but there are work arounds to this.
- You can just attach another material using a new shader that contains just the other pass. This will give you warnings and cause optimization issues.
- What I did (but I am not sure if this is more optimal than the above), use the Render Object Feature. Added Render Feature “Render Objects”, assigned it a name, and configured it use material and pass index 1. See the image below.