I have a UV map for a 3D mesh that encodes "links" between pairs of UV coordinates. I have previously defined this links (or pairs), one to one. The links are enconded using the function
rgb_color(u1, v1) = (u2, v2, 0.0). Therefore, in the fragment shader, given UV coordinates of the current fragment, I can get the UV coordinates of the fragment "linked" with the current one.
What I want to do is to draw this links in the 3D space(i.e. draw a line between the current fragment with texture coordinates
(u1, v1) and its "link" texture coordinate
(u2,v2). As far as I know this is a hard problem to solve because in the fragment shader you cannot access to the 3D coordinates
Edit: Notice that the UV map is fragmented, therefore you cannot just draw this lines in the UV domain.
Do you have any idea how to approach this problem?