Methods for grid traversal in a glsl pixel shader?
why not building a bounding box (or spheres) hierarchy ?

(but for a shadertoy implementation, the lack of dynamic loop length might spoil the gain ).