          bool t_clipSphere,
          bool t_useSphereAsProbe
         >
-renderKernel getKernelWithSphereAsProbe(vvRayRend*)
-{
-  return &render<t_earlyRayTermination, // Early ray termination.
-                 true, // Space skipping.
-                 true, // Front to back.
-                 t_bpc, // Bytes per channel.
-                 0, // Mip mode.
-                 t_illumination, // Local illumination.
-                 t_opacityCorrection, // Opacity correction.
-                 false, // Jittering.
-                 t_clipPlane, // Clip plane.
-                 t_clipSphere, // Clip sphere.
-                 t_useSphereAsProbe // Show what's inside the clip sphere.
-                >;
+renderKernel getKernelWithSphereAsProbe(vvRayRend* rayRend)
+{
+  switch (rayRend->_renderState._mipMode)
+  {
+  case 0:
+    return getKernelWithMip<
+                            t_bpc,
+                            t_illumination,
+                            t_opacityCorrection,
+                            t_earlyRayTermination,
+                            t_clipPlane,
+                            t_clipSphere,
+                            t_useSphereAsProbe,
+                            0
+                           >(rayRend);
+  case 1:
+    // No early ray termination possible with max intensity projection.
+    return getKernelWithMip<
+                            t_bpc,
+                            t_illumination,
+                            t_opacityCorrection,
+                            false,
+                            t_clipPlane,
+                            t_clipSphere,
+                            t_useSphereAsProbe,
+                            1
+                           >(rayRend);
+  case 2:
+    // No early ray termination possible with min intensity projection.
+    return getKernelWithMip<
+                            t_bpc,
+                            t_illumination,
+                            t_opacityCorrection,
+                            false,
+                            t_clipPlane,
+                            t_clipSphere,
+                            t_useSphereAsProbe,
+                            2
+                           >(rayRend);
+  default:
+    return getKernelWithMip<
+                            t_bpc,
+                            t_illumination,
+                            t_opacityCorrection,
+                            t_earlyRayTermination,
+                            t_clipPlane,
+                            t_clipSphere,
+                            t_useSphereAsProbe,
+                            0
+                           >(rayRend);
+  }
 }
 
 template<

  }
  const float3 step = ray.d * tstep;

  float maxIntensity = 0.0f;
  float minIntensity = FLT_MAX;

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

typedef void(*renderKernel)(uchar4*, const uint, const uint, const uint, const float, const float3, const float3,
                            const float3, const float3, const float3, const float3, const float3,
                            const float, const float3, const float);

template<
         int t_bpc,
         bool t_illumination,
         bool t_opacityCorrection,
         bool t_earlyRayTermination,
         bool t_clipPlane,
         bool t_clipSphere,
         bool t_useSphereAsProbe,
         int t_mipMode
        >
renderKernel getKernelWithMip(vvRayRend*)
{
  return &render<t_earlyRayTermination, // Early ray termination.
                 true, // Space skipping.
                 true, // Front to back.
                 t_bpc, // Bytes per channel.
                 t_mipMode, // Mip mode.
                 t_illumination, // Local illumination.
                 t_opacityCorrection, // Opacity correction.
                 false, // Jittering.
                 t_clipPlane, // Clip plane.
                 t_clipSphere, // Clip sphere.
                 t_useSphereAsProbe // Show what's inside the clip sphere.
                >;
}

template<
         int t_bpc,
