Pass depth offset with shader graph?

Hi,

I’m using the new URP and need to render a mesh without writing to the depth buffer and with an offset for the depth test.

Normally this is configured in the shader’s pass (Unity - Manual: ShaderLab: defining a Pass).

How can I do this with a shader graph (I’m using PBR Master)?

Best, Martin

For now I have found a workaround:

I’m using the shader graph to generate the shader code and manualy adjust Zwrite and Offset in the pass.
This is not ideal, but I have to do it anyway, because I also need some instancing params, which is also not supported by URP shader graph at this point.

Is there somewhere a system to vote for these features being added to the URP shader graph?

2 Likes

Can you give me more details on how you did this? need to fix hair cards seems and HDRP had this depth offset in the hair shader but in URP I don’t know how to do it or if is possible

Thank You

Right-click the master node in the shader graph and pick the “Show generated code” option. This will open the shader code. You can edit it as needed and save it to your assets folder.