 {
     vec3 middle = (fadeIntr1 + fadeIntr2) / 2;
     //float avgRate = 1 - (length(middle.xy) - rInner) / (rFadeEnd - rInner);
-    float avgRate = 1 - (length(middle.xy) - rInner) / (rFadeEnd - rInner) / 2;
+    float avgRate = 1 - (length(middle.xy) - rInner) / (rFadeEnd - rInner);
     return avgRate * distance(fadeIntr1, fadeIntr2);
 }
 

                innerRadiusSq, cylHalfLength, localPixelPos, localPixelRay,
                localPrevJointAxis, localNextJointAxis,
                innerIntersections, innerIntersectionCount, debugColor4);
            //if (innerIntersectionCount == 2) {
            if (false) {
                #if true
                if (distance(fadeEndIntersections[0], innerIntersections[1])
                  < distance(fadeEndIntersections[0], innerIntersections[0])) {
                        vec3 temp = fadeEndIntersections[0];
                        fadeEndIntersections[0] = fadeEndIntersections[1];
                        fadeEndIntersections[1] = temp;
                    }
                #endif
                
                innerContribution = distance(innerIntersections[0], innerIntersections[1]); // reuse pls
                fadeContribution =
                    linearFadeContribution(fadeEndIntersections[0], innerIntersections[1],
                                           innerRadius, fadeEndRadius)
                  + linearFadeContribution(fadeEndIntersections[1], innerIntersections[0],
                                           innerRadius, fadeEndRadius);
            } else {
                fadeContribution

    vec3 nextJointPos = vec3(0, 0, halfLength);
 
    debugColor = vec4(0, 0, 0, 1);
    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
