                 root11 = (-b - sdisc);
             }
         }
-        */
 
         bool check_second = true;
         if( rtPotentialIntersection( root1 + root11 ) ) {

        float sdisc = sqrtf(disc);
        float root1 = (-b - sdisc);

        bool do_refine = false;

        float root11 = 0.0f;

        // refine root1
        /*
        if( fabsf(root1) > 10.f * radius )
        {
            float3 O1 = O + root1 * ray.direction;

    w_in = uvw.inverseTransform( w_in );

    // TODO: magic numbers
    if( !sphereIntersectImpl(
                shading_point,
                w_in, center,
                radius,
                0.0f,
                1e18f,
                sample.point_on_light ) )
        sample.pdf = 0.0f;

    // TODO: optimize
    w_in = ( shading_point - sample.point_on_light.position );
    if( w_in.x == 0 && w_in.y == 0 && w_in.z == 0 )
        sample.pdf = 0.0f;

    //if( optix::length( shading_point - sample.point_on_light.position ) == 0.0f )
    //    sample.pdf = 0.0f;
    return sample;
}

