It looks like this is something that has added to the latest versions of HDRP, but I haven’t seen anything for LWRP yet. Technically production on LWRP has ceased as they’ve moved to the Universal RP (really, renamed the next version of LWRP to URP), so I would expect that feature to show up in the URP eventually.
+1000 on this ! I mean it is just dumb to not have the Ztesting from the beginning in any shader tools … it’s been almost 2 years now! It’s impractical/impossible to have a good looking transparent shader, I’ve been bypassing this with tweaking a scenecolor node in opaque (which even if not supposed to work, did the tricks for a while) … let’s just say it’s a less than ideal solution.
Custom MasterNode seems the way to go, but as anything these days in unity, it’s a complete mess to try to find documentation on the matter. Getting a bit worned up to feel like a noob with 10 years of dev I would really hope that unity would stop shooting from the hip everywhere and actually finish/polish features.
You can add the objects you want to attach your material to a new layer, then in the URP_Renderer asset add a new renderer feature. Give it a name, select the layer you want and check the box Depth, then Write Depth, and choose a Depth Test setting.
I use this quite a lot, for example for water or grass, and it works really well.
that worked for me! In trying to understand why (as I can’t find any documentation about this feature lol…?) the post by Andre here was helpful:
"
Yes this works as if filtering objects based on some settings and then rendering them again(or the first time if they are not already rendered) and there are some options to override some settings such as how they affect/test againt depth/stencil and also material override.
It’s not quite the same as shader replacement as that replaces the shader, here we are replacing the whole material."
It is really basic but does not include, really weird. We have shader graph but without basic settings.
In fact, we do not need fresnel, noise, rotation and a bunch of nodes because they can be implemented but ZTest!!!