webgl border color shader
问题 How do I write a shader to draw a polygon in solid color and it's border in a different color. Basically I have a hexagons map in 3d and I need to be able to outline each hexagon with a black border, if user requests so. Would also be nice if I could control border width. Thanks. 回答1: Off the top of my head, one way would be to create a your hex with a 7th vertex in the center 1---2 /\ /\ / \ / \ 6----0----3 \ / \ / \/ \/ 5---4 Add texture coordinates where point 0 has UV = { 0, 0 } and