0
\$\begingroup\$

I am trying to write a shader that highlight the edge between each pair of vertices, much like the UCLA Wireframe Shader.

enter image description here

All implementations I came across require geometry shader support. I am wondering if this is possible with just vertex and fragment shaders?

(Of course, I can use texture to workaround it; but I am trying to avoid create custom textures for each model that I need this effect. On the other hand, I could just use geometry shader but it presents quite a problem when porting to iOS, which lacks support.)

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Have you considered https://docs.unity3d.com/ScriptReference/GL-wireframe.html ?

Alternatively, you could generate the lines by yourself and add them to a mesh with a line topology.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .