Hey moosefreak,
We've been doing some tests on our end and it seems this is a Unity limitation. But don't worry as we have figured out a way to surpass it.
So what is happening is exactly like you said, the Depth Normals are not being correctly written, as it's ignoring the clipped values.
This issue is only present when rendering in the Forward Rendering path as when on deferred, the G-Buffer is used and it is correctly constructed.
So lets head to how to fix it in Forward. The way you make it write the depth normals correctly is by setting the properties you use on your shader to create the mask, to have the exact name as the ones used by the Unity internal Depth Normal shader and also their usage to also be exactly the same as Unity as well.
It's a bit confusing but here's a screenshot exemplifying what I've said:
- AOTest.jpg (178 KiB) Viewed 7991 times
Notice that we've created a Texture Sampler node with the name MainTex and a Color node with the name Color. The Alpha channel of both nodes are multiplied with each other and its result is set into the Opacity Mask port.
Again, for this method to work, both the properties names must be those ones and usage of each nodes alpha channel to create the opacity mask must be that exact way.
Please let us know if you have further questions as we will gladly help you out.