Artifacting when using Mesh Distance Fields

I am trying to use Mesh Distance Fields to change the color of a mesh as it intersects with another mesh (I.E.: Make a rock transition into the texture of the soil when it intersects with the soil). However, I keep getting those weird artifacts (See image). Does anyone know what’s going on? You can see my setup for this example below (I’m just using flat black and flat white for this).

I found this technique in the Materials Master Learning tutorial, in case anyone’s curious:

Thank you!

This happens because the mesh it’s sampling itself. Select the object and disable “Affect distance field lighting” And you’re done.

You have saved my life, thank you!

Would you take my hand in marriage?