RaTrace: Simple and Efficient Abstractions for BVH Ray Traversal Algorithms

In order to achieve the highest possible performance, the ray traversal and intersection routines at the core of every high-performance ray tracer are usually hand-coded, heavily optimized, and implemented separately for each hardware platform—even though they share most of their algorithmic core. The results are implementations that heavily mix algorithmic aspects with hardware and implementation details, making the code non-portable and difficult to change and maintain.

In this paper, we present a new approach that offers the ability to define in a functional language a set of conceptual, high-level language abstractions that are optimized away by a special compiler in order to maximize performance. Using this abstraction mechanism we separate a generic ray traversal and intersection algorithm from its low-level aspects that are specific to the target hardware. We demonstrate that our code is not only significantly more flexible, simpler to write, and more concise but also that the compiled results perform as well as state-of-the-art implementations on any of the tested CPU and GPU platforms. Now, exiting rays can skip empty space and avoid repeating intersection tests. Finally, we demonstrate that in addition to the fast ray traversal performance, the structure can be rebuilt efficiently in parallel, allowing for ray tracing dynamic scenes.

BibTeX
@inproceedings{perard2017ratrace,
  author       = {Pérard-Gayot, Arsène and Weier, Martin and Membarth, Richard and Slusallek, Philipp and Leißa, Roland and Hack, Sebastian},
  address      = {Vancouver, BC, Canada},
  booktitle    = {Proceedings of the 16th International Conference on Generative Programming: Concepts \& Experiences (GPCE)},
  title        = {{RaTrace: Simple and Efficient Abstractions for BVH Ray Traversal Algorithms}},
  pages        = {157--168},
  year         = 2017,
  month        = oct,
  date         = {2017-10-23/2017-10-24},
  doi          = {10.1145/3136040.3136044},
  organization = {ACM}
}