enhance the precision of ray-selection