I'm trying to create a wireframe vertex/fragment shader in Unity. It seems possible according to this paper. The general ideas seems to be that you pass a distance vector calculated in the vertex shader to each fragment in the fragment shader, which it can use to determine what brightness to draw the wireframe line at based on its position within a polygon.
From everything else I've read, though, it appears that you only get access to a single vertex in a vertex shader. I would need access to all of the neighbouring vertices in a polygon for ecah vertex. The paper seems to imply that a geometry shader is not necessary, which is good because Unity doesn't support them yet.
What am I missing? Is it never possible to access neighbouring vertices in a vertex shader? Is what I'm trying to do impossible without geometry shaders?
You seem to indeed have over-read the paragraph in 2.1 that says
So when not using the geometry shader you indeed don't know the other vertices of a triangle and therefore have to transmit them as additional vertex attributes. So for each vertex of a triangle you got two additional vec3 attributes containing the positions of the other two vertices of this triangle. And of course, like the text says, you cannot use indexed drawing, since those two attributes don't only depend on the vertex position, but also on the triangle this vertex belongs to.