Help with self occluding transparent shader

Hello,

I’m attempting to work out how to make a self occluding transparent shader and was wondering if it was possible within shader graph?

The best visual example I have is of the Oculus Avatar shader on the hands in the attached picture.

Any help, or advice with regards to making a similar shader would be greatly appreciated. Thank you!

Not possible with Shader Graph unfortunately. This requires a multi-pass shader, or possible two materials with one writing to Z and not color, neither of which are possible with Shader Graph. Multi-pass shaders aren’t currently possible in SRPs in general.

LWRP info: Transparency using the LWRP

HDRP/lit should expose a ‘depth prepass’ option on the master node. Unfortunately it seems broken at the moment, on 2019.2.0b3 / HDRP 6.7.1 at least. I submitted a bug for it.