# How to convert Specific Edge Data to Point Data?

I'm trying to convert the direction of a specific set of edges of a shape to point data, so that it is smooth when used in a shader. However I can't seem to figure out this conversion. Here's what my Geonodes are looking like so far:

In this attempt the direction for each edge is calculated with some simple vector math, then a selection of the horizontal edges is made. The edge directions of this selection are fed into an attribute called "horizontals". These "horizontals" are fed directly into a shader. This gives a consistent checkered pattern instead of a smooth gradient like I want. Setting the "Store Named Attribute" node to "Point" makes everything black.

From what I understand this is where sampling can come in handy, however the result is far from desirable:

Here the aforementioned edge selection is used in a "Separate Geometry" node so that it can be sampled. This gives a somewhat messy gradient while it should be smooth. Also, when moving the vertices up and down (no rotating) in Edit Mode there is jittering, making it unreliable.

How do I make this conversion properly?

• How do you want to define which way round the edge vectors are? (Which ones point at the points, which ones point away) Aug 10, 2023 at 14:06
• @RobinBetts Are you asking this so that each vertex has its own edge with a direction? It's fine if they follow the Y-axis for example, even if that creates a weird seam down the middle it would still be a big step forward. I hope I understood and answered your question right. Aug 10, 2023 at 17:36
• In this illustration the blue arrow points in the direction of vector, and the green arrow points in the direction abs(vector), This doesn't look like the relation you probably want. I think you have to come up with a definition of which end of an edge is at the start of your 'direction', and which end is at the end of it. Of course, I might be misunderstanding your intent. Aug 10, 2023 at 17:39
• @RobinBetts This set of edge data isn't all that useful, you're right. However my intended focus for this question was on converting edge data to point data. The actual edge data I want to convert to point data is different from the edge data on this page but the problem I'm experiencing is the same: I get the same checkered pattern or bad sampling. Aug 10, 2023 at 20:41