     
     if (clipped)
     {
-        if (usePrevDirection)
-        {
-            nextDir = -prevDir;
-        }
-        else
-        {
-            prevDir = -nextDir;
-        }
+        prevDir = -nextDir;
     }
     
     float pixelSize = czm_pixelSizeInMeters * abs(positionEC.z);

    culledByNearPlane = false;
    clipped = false;
    
    vec3 normal = vec3(0.0, 0.0, -1.0);
    vec3 point = normal * czm_currentFrustum.x;
    vec4 plane = vec4(normal, -dot(normal, point));
    
    float endPoint0Distance = dot(plane.xyz, positionEC) + plane.w;
    float denominator = dot(plane.xyz, directionEC);
    
    if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)
    {

    vec4 p0, p1;
    vec2 direction, nextWC, prevWC;
    
    if (czm_equalsEpsilon(prevDir, -nextDir, czm_epsilon3))
    {
        if (usePrevDirection || !clipped)
        {
