11 ms·
What stops using multiple passes to render the image? One for primary rays and then invoking another pass for the secondary rays.
by sharpneli 16y ago
What stops using multiple passes to render the image? One for primary rays and then invoking another pass for the secondary rays.
- pmjordan 16y agoFinding the hit points of secondary rays will still have very bad locality of reference unless I've misunderstood what you're saying.
- sparky 16y agoNothing. In fact, everyone does this at least to first order; you need to do bundles of primary rays at a time to take advantage of their spatial (and thus, memory access pattern) coherence. The problem is that the secondary rays are not a uniform grid like the primary rays, and they could be pointing any which way, depending on scene geometry. What you can do is attempt to group up a bunch of secondary rays that appear to be pointing roughly the same direction (e.g., if their primary rays all reflected off the same flat, specular object), and do them in a batch, exploiting their spatial coherence. Whether the process of finding coherent secondary rays is less costly than just processing secondary rays in the same order as their primary rays, again, depends on scene geometry.
- ttsiodras 16y agoSimple: the secondary rays don't "bunch" up together - there's no advantage to doing them in a second pass, you won't suddenly get coherence that way.