How to write transparent shader?

I know that in URP we can easily get transparent or masked effect by directly enabling clipping , or switching to transparent shading-mode , in material inspector, while using unity-provided URP shaders, which provided us the interfaces . But I wonder how do you enable alpha test in shaders ?

I checked implementations of URP shaders . Unlit and Lit shaders do this by discarding . Sprite2D does this by blending . I wonder if there’s other way to do this . As pixel shader outputs float4 representing RGBA . I think by default the w component affects nothing , whatever whether you set it to 1 or 0 . I think there might be a way to make use of this component . Maybe some post processing effects ?