I am looking for a way to get the distance to the closest UV map seam in UV-space as a vector in the node editor. Like this:
The blue dot is the current point of reference, i.e. the point where the current ray being evaluated has struck the object, converted to UV-space.
Ideally I want this value as a vector, but if that is impossible a scalar distance would work. Units should be in UV-space (bottom left corner of UV box is
(0, 0), top right is
(1, 1)). I am open to python solutions if needed.
One idea I have come up with is to somehow generate an image using Python which gives the vector per pixel (XYZ to RGB). I could then use this image in the node editor.