         else
         {
             p0 = p0 + t * direction;
+            clipped = true;
         }
     }
     

    }
    
    vec4 endPointWC, p0, p1;
    bool culledByNearPlane;
    
    vec4 positionEC = czm_modelViewRelativeToEye * p;
    vec4 prevEC = czm_modelViewRelativeToEye * prev;
    vec4 nextEC = czm_modelViewRelativeToEye * next;
    
    clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, culledByNearPlane);
    clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, culledByNearPlane);
    clipLineSegmentToNearPlane(positionEC.xyz, usePrev ? prevEC.xyz : nextEC.xyz, endPointWC, culledByNearPlane);
    
    if (culledByNearPlane)
    {

    vec3 p0,
    vec3 p1,
    out vec4 positionWC,
    out bool clipped,
    out bool culledByNearPlane)
{
    culledByNearPlane = false;
    clipped = false;
    
    vec3 p1ToP0 = p1 - p0;
    float magnitude = length(p1ToP0);
