1

I’m working on 2d map, where I have to render buildings (polygons with some fill and border colors). Three.js library used. I use shader where GLSL program handle rendering of all buildings as well as hover/select effects by changing the colors.

The problem with borders of buildings. The barycentric coordinates approach is used for rendering of borders: https://stackoverflow.com/a/18068177/3093329

In simple cases of square building I have to specify which diagonal lines (edges) have to be eliminated and it easy because it always the same. But in cases of more complex shapes of building I can't define these edges easily because they always are different:

building shapes

So, is this approach the only one way how to render borders of polygons? How can I define which edges have to be eliminated in complex cases?

WestLangley
  • 102,557
  • 10
  • 276
  • 276
vich
  • 262
  • 2
  • 15
  • Maybe this will help: https://stackoverflow.com/questions/20153705/three-js-wireframe-material-all-polygons-vs-just-edges/20154589#20154589 – WestLangley Jun 14 '18 at 15:43

0 Answers0