Draw polygon edges using OpenGL shaders

I was wondering if it is possible to draw the edges of a polygon with a specific color using the fragment shader, as in this example:

enter image description here

Or should I just visualize them separately?

+6
source share
1 answer

See the work related on this page: http://web.archive.org/web/20120527185124/http://cgg-journal.com/2008-2/06/index.html

The vertex shader should display polygons where the distance to each edge is colored.

The difference between the color of each "cell" is explained in great detail.

+7
source

Source: https://habr.com/ru/post/893814/


All Articles