Can I accelerate rendering an image from a ray cloud using a GPU? Start with a precalculated "ray cloud" - the starting point and direction of a large number of rays, most of which will not contribute to the image. The image plane's position and orientation are then specified, and the task is to search the ray cloud for rays that intersect the image plane without occlusion by other objects, and output the resulting pixel values. No ray reflections would be required, as all of the work has already been done in generating the ray cloud. The only step left is to convert the rays to an image. This means that a single ray cloud can be used to generate images from arbitrary view angles.

How could I go about accelerating this process using a GPU? The decision for each ray of whether it intersects the image plane is parallelisable as these decisions are independent, but each requires access to the objects in the scene as some rays will reach some potential image planes but not others. The final step of sampling the relevant rays across the pixels of the image requires each ray to contribute to a number of the surrounding pixels. Is this also parallelisable using a GPU?



To clarify, RichieSams' understanding is correct:


Start with a set of rays pointing in arbitrary directions.
Find which of these rays intersect with the image plane, taking into account occlusion. 
Calculate the colour of each pixel based on the rays that hit the image plane.


Ideally I would like to be able to accelerate this process sufficiently to move around a scene in real time, given a precomputed ray cloud over the whole scene.
I'm not quite sure I fully understand the problem, this is what I think you're asking:


You start with a set of rays pointing a all sorts of directions
You want to know which of these rays intersect with the image plane, taking into account occlusion. 
I'm going to assume these rays carry some kind of color information along with them. IE. when they hit the image plane, they will accumulate color.




With that goal in mind, I would do the following:


Create 2 image buffers


For accumulated color
To keep track of the number of hits

Clear the accumulation buffer to black, and the hitCount buffer to all zeros
Create a kernel per ray


Use classic ray tracing math to find the nearest intersection


Here you can do anything from a simple 'iterate through all the object in the scene' to something like BVHs, or kd-trees.

If the closest intersection is the image plane, use the WorldView matrix for the image plane to transform the intersection point from world coordinates to view space coordinates.
Use the x, y coordinates of the image space intersection point to get the pixel coordinates of the image buffer
Add the color of the ray to the corresponding pixel in the accumulation buffer
Increment the value of the corresponding pixel in the hitCount buffer


For 4 and 5 you could also use a filter in order to apply the color to multiple pixels, rather than just one. In that case, you would add a value less than 1 to the hitCount buffer


On the CPU, or in another pass per pixel: 


Divide the accumulated color buffer by the hitCount buffer





I don't see any problem with doing these steps on the GPU. Any of the compute languages should handle it fine. You might get some divergence in the actual ray tracing code, but it should be ok. The biggest potential problem is that you have to store the entire scene in VRAM.