With the material above you need to divide the custom depth by a large number which is actually the distance of the effect in world space units. You might need to increase this value to a multiple of (ten) thousend, on my screenshot it’s 16777215.
With the material above you need to divide the custom depth by a large number which is actually the distance of the effect in world space units. You might need to increase this value to a multiple of (ten) thousend, on my screenshot it’s 16777215.