I've recently started using Amplify Shader Editor to replicate a shader showcased here. The objective is to dissolve the objects in front of the player, and it consists in a 3D noise generator tied to the world position, blended with the distance from screen center, witch then gets used as the value for opacity masking.
This is the result of just applying the noise. Shadows behave as expected.
However I've encountered a problem related with the use of screen position in the shader: Whenever the screen pos. value is involved in the final calulation, shadows stop working correctly. As you can see in the screenshot below, both the projected shadows and the self-shadowing keeps getting rendered for the pixels that are discarded by the opacity mask.
Then after a certain value of the Mask Clip, they disappear altogether. Interestingly enough, this value is either zero, one, or sqrt(2)/2.
We took a look at your shader. The issue on shadows appearing on clipped geometry is fairly simple, you just need to set your Render Queue to Transparent.
The fact of clipped fragments are still generating shadow, this is a bit more complicated and is in fact happening because you are using a screen position to determine the Clip operation. Unity renders shadow maps through a different camera/projection which is dependent on the scene light sources thus the screen position results are different.
You can even see this happening on the link you sent. When the cat character passes through the hallway, its fragments starts to get discarded but the shadow remains the same.
There's a small hack you can do to slightly overcome this, but it is far from perfect. By adding a Vertex To Fragment node between the Screen Position node and what comes next ( in your case the Component Mask ) we are forcing an ASE to not use Unity pre-calculated Screen Position but manually calculate our own and interpolate it into the surface body which provide different results from Unity default behavior.
VertexToFragHack.JPG (34.77 KiB) Viewed 68 times
But again, this is far from perfect and wont take into account all the discarded fragments on your main camera.
Please let us know if you require further help as we will gladly help you out!
Thank you very much for your help and the explanation!
I will apply the fix you proposed and tinker around with the results a bit. Honestly, I didn't even notice the shadows in the example. Now I'm starting to think it even looks better, as it helps to reinforce the idea that the object is still present in the scene.