RTfact: Generic Concepts for Flexible and High Performance Ray Tracing
Thanks to more than a decade of research and the fast evolution of computer hardware, ray tracing is likely to become a commodity choice for adding complex lighting effects to real-time rendering engines. Nonetheless, interactive ray tracing research has been mostly concentrated on few specific combinations of data structures and algorithms. In this paper we present RTfact - an attempt to bring the different aspects of ray tracing together in a component oriented, generic, and portable way, without sacrificing the performance benefits of hand-tuned single-purpose implementations. RT-fact is a template library consisting of packet-centric components combined into an efficient ray tracing framework. Our generic design approach with loosely coupled algorithms and data structures allows for easy integration of new algorithms with maximum runtime performance, while leveraging as much of the existing code base as possible. The efficiency of templates allows us to achieve fine component granularity and to incorporate a flexible physically- based surface shading model, which enables exploitation of ray coherence. As a proof of concept we apply the library to a variety of rendering tasks and demonstrate its ability to deliver performance equal to currently existing optimized implementations.