 #endif
 
   // Ensure that dist is big enough
-  bool infinite = false;
-  if(tnear+dist != tnear && tfar+dist != tfar)
-    infinite = true;
+  const bool infinite = (tnear+dist != tnear && tfar+dist != tfar);
 
   while(infinite)
   {

  }

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

  {
    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)
    {
