     // Test for clipping.
     const bool clippedPlane = (clipPlane && (((t <= tpnear) && (nddot >= 0.0f))
                                           || ((t >= tpnear) && (nddot < 0.0f))));
-    const bool clippedSphere = (clipSphere && (t >= tsnear) && (t <= tsfar));
+    const bool clippedSphere = useSphereAsProbe ? (clipSphere && ((t < tsnear) || (t > tsfar)))
+                                                : (clipSphere && (t >= tsnear) && (t <= tsfar));
 
     if (clippedPlane || clippedSphere)
     {

    float tmp = *tnear;
    *tnear = *tfar;
    *tfar = tmp;
  }
}

__device__ bool intersectBox(const Ray& ray, const float3& boxmin, const float3& boxmax,

         bool opacityCorrection,
         bool jittering,
         bool clipSphere,
         bool clipPlane,
         bool useSphereAsProbe
        >
__global__ void render(uint *d_output, const uint width, const uint height, const float dist,
                       const float3 volSizeHalf, const float3 L, const float3 H,
