Skip to content

Commit

Permalink
Fix rendering artifacts when rendering lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnazar authored and ComBatVision committed Jun 15, 2024
1 parent e73134b commit a7d9ec7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ open class TriangleShaderProgram : AbstractShaderProgram() {
vec2 miter = vec2(-tangent.y, tangent.x);
vec2 normalA = vec2(-AB.y, AB.x);
float miterLength = 1.0 / dot(miter, normalA);
float miterLength = 1.0 / max(dot(miter, normalA), 0.00001);
miterLength = min(miterLength, miterLengthCutoff);
gl_Position = pointBScreen;
Expand Down

0 comments on commit a7d9ec7

Please sign in to comment.