   }
 
   // Calc hits with clip sphere.
-  float tsnear;
-  float tsfar;
+  float tsnear = 0.0f;
+  float tsfar = 0.0f;
   if (t_clipSphere)
   {
     // In probe mode, rays that don't hit the sphere simply aren't rendered.

  }

  // Calc hits with clip plane.
  float tpnear;
  float nddot;
  if (t_clipPlane)
  {
    intersectPlane(ray, planeNormal, planeDist, &nddot, &tpnear);
  }

  float4 dst;

  if (t_mipMode > 0)
  {

  {
    float3 depth = make_float3(0.0f, 0.0f, 0.0f);
    // convert position to window-coordinates
    const float4 depthWin = mulPost(c_MvPrMatrix, make_float4(ibrDepth.x, ibrDepth.y, ibrDepth.z, 1.0f));
    depth = perspectiveDivide(depthWin);

    // Scale to 0.0 - 1.0
    depth.z += 1.0f;
    depth.z *= 0.5f;

    depth.z = (depth.z - ibrPlanes.x) / (ibrPlanes.y - ibrPlanes.x);
    clamp(depth.z);

    switch(dp)
    {
