diff --git a/GLMakie/assets/shader/line_segment.geom b/GLMakie/assets/shader/line_segment.geom index fd32a3508bd..dc5425fbf58 100644 --- a/GLMakie/assets/shader/line_segment.geom +++ b/GLMakie/assets/shader/line_segment.geom @@ -82,7 +82,7 @@ void main(void) // Set invalid / ignored outputs f_truncation = vec2(-1e12); // no truncated joint f_pattern_overwrite = vec4(-1e12, 1.0, 1e12, 1.0); // no joints to overwrite - f_extrusion = vec2(0.5); // no joints needing extrusion + f_extrusion = vec2(0.0); // no joints needing extrusion f_linepoints = vec4(-1e12); f_miter_vecs = vec4(-1); diff --git a/GLMakie/assets/shader/lines.geom b/GLMakie/assets/shader/lines.geom index 615bd1e4757..2d49f2eb3c9 100644 --- a/GLMakie/assets/shader/lines.geom +++ b/GLMakie/assets/shader/lines.geom @@ -208,8 +208,8 @@ void main(void) // isvalid[1] and [2] are used to discern whether a line segment should be // discarded. This should happen if either vertex is invalid or if one of // the vertices is a loop target. - // A loop target is an extra vertex placed before/after the shared vertex to - // guide joint generation. Consider for example a closed triangle A B C A. + // A loop target is an extra vertex placed before/after the shared vertex to + // guide joint generation. Consider for example a closed triangle A B C A. // To cleanly close the loop both A's need to create a joint as if we had // c A B C A b, but without drawing the c-A and A-b segments. c and b would // be loop targets, matching C and B in position, but only being valid in @@ -417,8 +417,8 @@ void main(void) // if joint skipped elongate to new length // if normal joint elongate a lot to let discard/truncation handle joint f_extrusion = vec2( - !isvalid[0] ? min(AA_RADIUS, halfwidth) : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0][0])), - !isvalid[3] ? min(AA_RADIUS, halfwidth) : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1][0])) + !isvalid[0] ? 0.0 : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0][0])), + !isvalid[3] ? 0.0 : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1][0])) ); // used to compute width sdf diff --git a/WGLMakie/src/Lines.js b/WGLMakie/src/Lines.js index 03850e5701a..a340b33c9e6 100644 --- a/WGLMakie/src/Lines.js +++ b/WGLMakie/src/Lines.js @@ -548,12 +548,12 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) { } // Used to elongate sdf to include joints - // if start/end elongate slightly so that there is no AA gap in loops + // if start/end no elongation // if joint skipped elongate to new length // if normal joint elongate a lot to let shape/truncation handle joint f_extrusion = vec2( - !isvalid[0] ? min(AA_RADIUS, halfwidth) : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0])), - !isvalid[3] ? min(AA_RADIUS, halfwidth) : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1])) + !isvalid[0] ? 0.0 : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0])), + !isvalid[3] ? 0.0 : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1])) ); // used to compute width sdf diff --git a/WGLMakie/src/wglmakie.bundled.js b/WGLMakie/src/wglmakie.bundled.js index ae5a10200b0..4aefa97702e 100644 --- a/WGLMakie/src/wglmakie.bundled.js +++ b/WGLMakie/src/wglmakie.bundled.js @@ -21825,12 +21825,12 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) { } // Used to elongate sdf to include joints - // if start/end elongate slightly so that there is no AA gap in loops + // if start/end no elongation // if joint skipped elongate to new length // if normal joint elongate a lot to let shape/truncation handle joint f_extrusion = vec2( - !isvalid[0] ? min(AA_RADIUS, halfwidth) : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0])), - !isvalid[3] ? min(AA_RADIUS, halfwidth) : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1])) + !isvalid[0] ? 0.0 : (adjustment[0] == 0.0 ? 1e12 : halfwidth * abs(extrusion[0])), + !isvalid[3] ? 0.0 : (adjustment[1] == 0.0 ? 1e12 : halfwidth * abs(extrusion[1])) ); // used to compute width sdf