Commits

vrld  committed 777b34c

Decrese core-line width when overdrawing to preserve original line width.

  • Participants
  • Parent commits 2cd51ac

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/Graphics.cpp

 		float halfwidth = lineWidth/2.f;
 		float inv_hw    = 1.f / halfwidth;
 
+		// Overdraw changes visible line width. account for that.
+		// Value of 0.15 chosen empirically.
+		if (lineStyle == LINE_SMOOTH)
+			halfwidth -= .15f;
+
 		// get line vertex boundaries
 		// if not looping, extend the line at the beginning, else use last point as `p'
 		r = Vector(coords[0], coords[1]);