Line join style — the strategy the vertex stage uses at a degree-2 polyline
joint (issue #790).
Without join geometry, two segments meeting at a turn of angle θ leave an
uncovered circular sector of that angle on the OUTSIDE of the bend and
double-cover a lens on the inside: measurably, dark ticks along the convex
edge of a thick curve and bright ticks along the concave one. On the
test_line_joins.luxar.zarr acceptance fixture (bend_width = 0.4),
rendered with &lineJoin=none, the worst local-median deficit is 203/255 on
the curve_smooth band and 200/255 on zigzag_right_angle. No per-endpoint intensity scalar can close the
outer wedge — nothing rasterises there to shade — so it needs geometry.
style
per-vertex cost
wedge
blending modes
none
zero
left open
n/a
miter
+ 1 texel fetch, 1 project
exact
all six, by construction
miter is the only style that fits the existing 4-vertices-per-segment quad
exactly: the mitred trapezoid's edges stay on the segment's own ±R offset
lines, so the perpendicular super-Gaussian cross-section is untouched.
round and bevel both need extra geometry, and an overlap variant (extend
the quads so they genuinely overlap, cross-fading the axial ramps) was
considered and dropped: it additionally needs the fragment stage (a signed cap
ramp and vT reparameterised over the extended span), it is exact only under
the sum-like blending modes, and it would lengthen every free polyline end.
Both styles read the same per-endpoint joint code (compute_joint_codes in
wasm/rust/src/lines_clipping.rs); none simply ignores it.
Line join style — the strategy the vertex stage uses at a degree-2 polyline joint (issue #790).
Without join geometry, two segments meeting at a turn of angle θ leave an uncovered circular sector of that angle on the OUTSIDE of the bend and double-cover a lens on the inside: measurably, dark ticks along the convex edge of a thick curve and bright ticks along the concave one. On the
test_line_joins.luxar.zarracceptance fixture (bend_width = 0.4), rendered with&lineJoin=none, the worst local-median deficit is 203/255 on thecurve_smoothband and 200/255 onzigzag_right_angle. No per-endpoint intensity scalar can close the outer wedge — nothing rasterises there to shade — so it needs geometry.nonemitermiteris the only style that fits the existing 4-vertices-per-segment quad exactly: the mitred trapezoid's edges stay on the segment's own ±R offset lines, so the perpendicular super-Gaussian cross-section is untouched.roundandbevelboth need extra geometry, and anoverlapvariant (extend the quads so they genuinely overlap, cross-fading the axial ramps) was considered and dropped: it additionally needs the fragment stage (a signed cap ramp andvTreparameterised over the extended span), it is exact only under the sum-like blending modes, and it would lengthen every free polyline end.Both styles read the same per-endpoint joint code (
compute_joint_codesinwasm/rust/src/lines_clipping.rs);nonesimply ignores it.