# Path Tracer - sampling dimensions confusion

Suppose my path tracer is shooting 64 rays per pixel (in an 8x8 grid). The confusion is, when accounting for Global illumination, should I shoot additional X number of random rays for each of those initial 64 rays? This would equal to shooting 64 * X *number of bounces rays (all sorts of) which is really large. And since I am making the path tracer on GPU memory is surely a concern.

OR I just shoot 1 random ray for indirect illumination. This would mean that the total secondary rays cast for GI would equal 64 per pixel.

The problem here is, all those 64 rays cast per pixel aren't guaranteed to intersect at the same point albeit close enough. If the intersection positions aren't the same then this would mean I am calculating indirect illumination using just 1 sample which is ofcourse very low.

Now this is again for just GI. What about Area light sources? Should I be explicitly sampling X number of rays for Area Light for each of those initial 64 rays?

I think this is what Cook mentioned in his paper on Distributed Ray Tracing. He says

Rather than adding more rays for each dimension, the existing rays are distributed in each dimension according to the values of the corresponding parameter. The key is that no extra rays are needed beyond those used for oversampling.

I am confused because mostly I have seen algorithms and code snippets following the second approach. Casting X number of rays for GI.

2) Secondly for direct illumination is the light path explicitly calculated or it's taken from the samples created for GI? The former means if I am sampling 1 ray for GI for each of the 64 rays per pixel, then I am also shooting another ray explicitly for the light path. The random sampled ray, if points to the light source I ignore it.

The latter means, I sample only 1 ray, if it doesn't hits the light source that's my GI, and if it hits the light source I accumulate it's color as direct lighting.