Essentially all you need is a camera position and orientation, then you bombard the scene with spheres until some minimum distance is reached where the radius of the sphere is so small when it collides with an object in the scene that we consider it a hit. These spheres are marched along rays until they do generate a hit. They grow and shrink in size depending on the distance between them and the objects in the scene.
Here are some videos explaining it better: