           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 );
+                  d = cap( int(u_linecaps.x), abs(dx), abs(dy), t, 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 );
+                  d = cap( int(u_linecaps.y), abs(dx)-line_stop, abs(dy), t, v_linewidth );
               }
               else {
-                  d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, u_miter_limit, v_linewidth );
+                  d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, v_linewidth );
               }
 
           // Dash line --------------------------------------------------------------

      varying float v_linewidth;

      // Compute distance to cap ----------------------------------------------------
      float cap( int type, float dx, float dy, float t, float miter_limit, float linewidth )
      {
          float d = 0.0;
          dx = abs(dx);

              //if( dx > line_stop)  discontinuous = false;

              float d_join = join( int(u_linejoin), abs(dy),
                                  v_segment, v_texcoord, v_miter, v_linewidth );

              // When path is closed, we do not have room for linecaps, so we make room
              // by shortening the total length
