   }
   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;

         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.
                >;
}

template<

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,
