             // fade cylinder is intersected
             if (intersectionCounts[INNER] == 2) {
                 // inner, uniform color cylinder is intersected               
-                vec3 ray1 = intersections[INNER_OFFSET] - intersections[FADE_OFFSET];
-                vec3 ray2 = intersections[INNER_OFFSET + 1] - intersections[FADE_OFFSET];
-                if (dot(ray2, ray2) < dot(ray1, ray1)) {
+                vec3 seg1 = intersections[INNER_OFFSET] - intersections[FADE_OFFSET];
+                vec3 seg2 = intersections[INNER_OFFSET + 1] - intersections[FADE_OFFSET];
+                if (dot(seg2, seg2) < dot(seg1, seg1)) {
                     // ensure intersections are matched by closeness (distance squared)
                     vec3 temp = intersections[FADE_OFFSET];
                     intersections[FADE_OFFSET] = intersections[FADE_OFFSET + 1];

 
    debugColor = vec4(0, 0, 0, 1);
    fadePivot = vec3(0, 0, 0);
    if (abs(localPixelRay.x) > 0.0000001 || abs(localPixelRay.y) > 0.0000001) {
        // view ray is not parallel to cylinder axis so it may intersect the sides
        // solve: (p_x + dir_x * t)^2 + (p_y + dir_y * t)^2 = r^2; in quadratic form:
        // (dir_x^2 + dir_y^2) * t^2 + [2(p_x * dir_x + py * dir_y)] * t

    vec3 nextJointPos = vec3(0, 0, halfLength);
 
    fadePivot = vec3(0, 0, 0);
    if (abs(localPixelRay.x) > 0 || abs(localPixelRay.y) > 0) {
        // view ray is not parallel to cylinder axis so it may intersect the sides
        // solve: (p_x + dir_x * t)^2 + (p_y + dir_y * t)^2 = r^2; in quadratic form:
        // (dir_x^2 + dir_y^2) * t^2 + [2(p_x * dir_x + py * dir_y)] * t
