Question

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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top