                             t_illumination,
                             t_opacityCorrection,
                             t_earlyRayTermination,
-                            t_clipPlane,
-                            t_clipSphere,
-                            t_useSphereAsProbe,
+                            t_clipping,
                             t_mipMode,
                             false
                            >(rayRend);
   }
 }
+
 template<
          int t_bpc,
          bool t_illumination,
          bool t_opacityCorrection,
          bool t_earlyRayTermination,
-         bool t_clipPlane,
-         bool t_clipSphere,
-         bool t_useSphereAsProbe
+         bool t_clipping
         >
-renderKernel getKernelWithSphereAsProbe(vvRayRend* rayRend)
-{
+renderKernel getKernelWithClipping(vvRayRend* rayRend)
+{
+
   switch ((int)rayRend->getParameter(vvRenderState::VV_MIP_MODE))
   {
   case 0:


  while(infinite)
  {
    // Test for clipping.
    const bool clippedPlane = (t_clipPlane && (((t <= tpnear) && (nddot >= 0.0f))
                                            || ((t >= tpnear) && (nddot < 0.0f))));
    const bool clippedSphere = t_useSphereAsProbe ? (t_clipSphere && ((t < tsnear) || (t > tsfar)))
                                                  : (t_clipSphere && (t >= tsnear) && (t <= tsfar));

    if (clippedPlane || clippedSphere)
    {
      justClippedPlane = clippedPlane;
      justClippedSphere = clippedSphere;

      t += dist;
      if (t > tfar)
      {
        break;
      }
      pos += step;
      continue;
    }

    const float3 texCoord = calcTexCoord(pos, volPos, volSizeHalf);

  // Calc hits with clip plane.
  float tpnear = 0.0f;
  float nddot = 0.0f;
  if (t_clipping && clipPlane)
  {
    intersectPlane(ray, planeNormal, planeDist, &nddot, &tpnear);
  }
