Draw edges of a polygon with OpenGL shaders

痞子三分冷 提交于 2021-02-17 22:27:45

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/6864748/draw-edges-of-a-polygon-with-opengl-shaders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!