Add sparse support for distance-to-sphere.