Enable alpha clipping for physical material hdrp

I am having difficulty adding alpha clipping for the physical material shader, I need to replicate the same effect as natively with the Lit shader. In my project I have several PNG images (such as logos or grids), and they all come from the physical material shader, so manual conversion to Lit is not practicable (I have many materials). I started experimenting with the shader graph but despite the tutorials on the internet I can’t figure out how to make it work and what links to add (considering that the physical material shader has to be modified so I’m not starting from scratch).

Thank you very much

As far as I can tell from the Shader Graph, this shader uses a separate transparency map and not the alpha channel of the BaseColorMap, which is what I assume you want. To get this to work you need to connect the alpha channel of the BaseColorMap to the “Alpha” output node, and you also have to create your own property for the Alpha Clip Threshold.

Thank you PhiMue for your reply, I will try to be more specific. I made some attempts both before and after my post, but I can’t get the desired effect. I will try to post some screenshots below for better understanding.
In the first screenshot we can see the original situation of the shader physical material within shader graph, in the following screenshots we go into more detail. I would need to understand from the existing nodes which links to add to enable alpha clipping and the corresponding slider to manage the threshold, exactly as is done in shader lit natively.
(as a new user I can only post one screenshot at a time, I had to merge them into one)

This is how you do it:


Set the float property to Slider mode. It will be in the Exposed Properties section of the material, not directly under the Alpha Clipping checkbox like in the Lit shader. But it will work the same way. You can also delete everything connected to the Transparency Map, including the properties.

Perfect thank you very much, it works perfectly. At this stage if we also want to maintain transparency (e.g. for glasses), what should I do? I added a multiply node and it seems to work fine but is this the correct way?
Thanks again

If you only need to change the overall transparency you can just multiply it with a float property. Otherwise the shader will take the Transparency Map (which is treated as White if none is provided), multiply it with the “Transparency” color (also white by default), then with the “Transparency Weight” value, which is then subtracted from 1. As you are using the alpha channel of the Base Color map and not a separate transparency map, this setup is probably unnecessarily complex.