     }
     return;
   }
-  bool justClippedBox = true;
-
   if (fmodf(tbnear, dist) != 0.0f)
   {
     int tmp = (tbnear / dist);

      {
        src = blinnPhong<t_bpc>(src, pos, texCoord, Lpos, V, Ka, Kd, Ks, shininess, constAtt, linearAtt, quadAtt);
      }
      justClippedBox = false; // just clipped bounding box passed after any case
    }
    justClippedPlane = false;
    justClippedSphere = false;


  const float3 step = ray.d * dist;

  // If just clipped, shade with the normal of the clipping surface.
  bool justClippedBox = true;
  bool justClippedPlane = false;
  bool justClippedSphere = false;

