Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Draw edges of a polygon with OpenGL shaders

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

enter image description here

Or should I just render those separately?

like image 407
rgngl Avatar asked Jul 28 '11 19:07

rgngl


1 Answers

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

A vertex shader should render polygons where the distance to each edge is colored.

The difference between coloring each "cell" is explained in much detail.

like image 141
Pindatjuh Avatar answered Sep 19 '22 17:09

Pindatjuh