by oz_1123 · 2y ago · 0 comments
My assumption is that the shared scene and shaders might play a role here, although the direction of the rays will still vary.
The reason for this is that while the primary rays are a coherent bundle, the secondary rays are all over the place. Essentially, as soon as you hit the first object, it bounces in a random direction all over the scene. And for every primary ray, you might end up spawning a dozen secondary rays.
I believe this is also the reason dedicated raytracing hardware is needed for GPUs. While a coherent bundle is fairly trivial to parallelize, incoherent rays are going to absolutely wreck your SIMD performance. You really want dedicated hardware to properly manage this, for example by doing BVH traversal and collecting all secondary rays that hit the same object for a single mostly-coherent render pass.