 
       // Compute distance to join -------------------------------------------------
       float join( in int type, in float d, in vec2 segment, in vec2 texcoord, in vec2 miter,
-            in float miter_limit, in float linewidth )
+                 in float linewidth )
       {
           // texcoord.x is distance from start
           // texcoord.y is distance from centerline

          if( solid ) {
              d = abs(dy);
              if( (!closed) && (dx < line_start) ) {
                  d = cap( int(u_linecaps.x), abs(dx), abs(dy), t, u_miter_limit, v_linewidth );
              }
              else if( (!closed) &&  (dx > line_stop) ) {
                  d = cap( int(u_linecaps.y), abs(dx)-line_stop, abs(dy), t, u_miter_limit, v_linewidth );
              }
              else {
                  d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, u_miter_limit, v_linewidth );
              }

          // Dash line --------------------------------------------------------------


              // Line cap at start
              if( (dx < line_start) && (dash_start < line_start) && (dash_stop > line_start) ) {
                  d = cap( int(linecaps.x), dx-line_start, dy, t, v_linewidth);
              }
              // Line cap at stop
              else if( (dx > line_stop) && (dash_stop > line_stop) && (dash_start < line_stop) ) {
                  d = cap( int(linecaps.y), dx-line_stop, dy, t, v_linewidth);
              }
              // Dash cap left - dash_type = -1, 0 or 1, but there may be roundoff errors
              else if( dash_type < -0.5 ) {
                  d = cap( int(dash_caps.y), abs(u-dash_center), dy, t, v_linewidth);
                  if( (dx > line_start) && (dx < line_stop) )
                      d = max(d,d_join);
              }
              // Dash cap right
              else if( dash_type > 0.5 ) {
                  d = cap( int(dash_caps.x), abs(dash_center-u), dy, t, v_linewidth);
                  if( (dx > line_start) && (dx < line_stop) )
                      d = max(d,d_join);
              }
