Hybrid Rendering for Real-Time Ray Tracing

Ray Tracing Gems

This chapter is featured in the upcoming Ray Tracing Gems book, edited by Eric Haines and Tomas Akenine-Möller.

This chapter describes the rendering pipeline developed for PICA PICA, a real-time ray tracing experiment featuring self-learning agents in a procedurally assembled world. PICA PICA showcases a hybrid rendering pipeline in which rasterization, compute, and ray tracing shaders work together to enable real-time visuals approaching the quality of offline path tracing.

The design behind the various stages of such a pipeline is described, including implementation details essential to the realization of PICA PICA's hybrid ray tracing techniques. Advice on implementing the various ray tracing stages is provided, supplemented by pseudocode for ray traced shadows and ambient occlusion. A replacement to exponential averaging in the form of a reactive multi-scale mean estimator is also included. Even though PICA PICA's world is lightly textured and small, this chapter describes the necessary building blocks of a hybrid rendering pipeline that could then be specialized for any AAA game. Ultimately, this chapter provides the reader with an overall good design to augment existing physically based deferred rendering pipelines with ray tracing, in a modular fashion that is compatible across visual styles.