                 innerRadiusSq, cylHalfLength, localPixelPos, localPixelRay,
                 localPrevJointAxis, localNextJointAxis,
                 innerIntersections, innerIntersectionCount, debugColor4);
-            //if (innerIntersectionCount == 2) {
-            if (false) {
-                #if true
+            if (innerIntersectionCount == 2) {
                 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],
+                    linearFadeContribution(fadeEndIntersections[0], innerIntersections[0],
                                            innerRadius, fadeEndRadius)
-                  + linearFadeContribution(fadeEndIntersections[1], innerIntersections[0],
+                  + linearFadeContribution(fadeEndIntersections[1], innerIntersections[1],
                                            innerRadius, fadeEndRadius);
             } else {
                 fadeContribution

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


        float b = 2 * dot(localPixelPos.xy, localPixelRay.xy);
        float c = dot(localPixelPos.xy, localPixelPos.xy) - radiusSq;
        float D = b*b - 4*a*c;
        if (D >= 0) { // two solutions (or one as two)
            float Dsqrt = sqrt(D);
            {
                float t1 = (-b - Dsqrt) / (2*a);
