Geometry shader producing gaps between lines
问题 I wrote a geometry shader to compute the intersection contour of a mesh and a plane, but at the intersection points there are sometimes 1 pixel wide gaps between two lines. The shader first computes the signed distances of the triangle vertices to the plane. It then checks if two distances have a different sign to determine if there is an intersection with an edge. If so, it emits a vertex at the intersection, which is computed as the weighted average between the edge points. #version 330