                      (pos.z + volSizeHalf.z) / (volSizeHalf.z * 2.0f));
 }
 
-__device__ void solveQuadraticEquation(const float A, const float B, const float C,
+__device__ bool solveQuadraticEquation(const float A, const float B, const float C,
                                        float* tnear, float* tfar)
 {
   const float discrim = B * B - 4.0f * A * C;

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

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

  float tsfar;
  if (clipSphere)
  {
    // In probe mode, rays that don't hit the sphere simply aren't rendered.
    // In ordinary sphere mode, the intersection data is memorized.
    if (!intersectSphere(ray, sphereCenter, sphereRadius, &tsnear, &tsfar) && useSphereAsProbe)
    {
      d_output[y * width + x] = 0;
      return;
    }
  }

  // Calc hits with clip plane.
