There still isn't but prompted by a question I decided to implement it in an ugly way; after all, if it works that is all that matters :-). All the necessary code to implement different distance metrics is already in
node_texture.h but for some reason it was commented out. I therefore lifted the necessary part from this file and combined it with a a small shader that lets you choose the distance metric with an integer. An example for the Manhattan metric is shown below.
Node setup and code availabilityThe node setup used to generate the image above looks like this:
The code for the shader is available on GitHub. The node it generates may look a bit different than in the noodle shown here because I added an exponent input
Ethat can be used for the generalized Minkovsky metric (metric == 6).