Kajiya Renderer Demos Gorgeous ReSTIR Real-Time Path Tracing On A Radeon RX 6800 XT

kajiya restir 0
Performance and fidelity are often two opposing sides of the same axis in computer graphics. You already know this; raise resolution, performance goes down. Rendering resolution is only one of the many sliders that game developers can tweak to optimize the performance-to-fidelity balance. Of course, what every programmer prefers is a more efficient algorithm altogether.

That's exactly what NVIDIA created with its ReSTIR algorithm for path tracing. We talked about this indirectly once before, but that was focused more on the results, and didn't really get into the meat of the technology. In essence, ReSTIR—which stands for "Reservoir Spatio-Temporal Importance Resampling"—is a new way of doing path tracing that is drastically more efficient. This can mean improved performance or improved results, leaving a lot less work for the denoising filter required by real-time path-tracers.

kajiya restir 3

At this stage, most developers agree that real-time path-tracing is the next big step in graphics technology. Well, since the original release of the ReSTIR paper in 2020 and NVIDIA's demonstration of it for use in ray-traced global illumination in 2021, those same developers have been slapping the new algorithm down in every conceivable place, as it's generally a drastic improvement over older ways of doing things.

kajiya restir 2

One such developer making use of ReSTIR is Tomasz Stachowiak, also known as h3r2tic. He works for Embark Studios, a Stockholm-based developer who is making a game called ARC Raiders which was announced at last year's Game Awards. However, this post isn't about ARC Raiders, nor about his work for Embark Studios. Instead, we're taking a look at the "kajiya" renderer that he's working on as a hobby project.

When we talked about NVIDIA's path tracing advancements before, we naturally focused on its own libraries, RTXGI and RTXDI. "Naturally" because we were discussing NVIDIA's announcement, but the technology that NVIDIA has implemented in those libraries isn't exclusive to NVIDIA's graphics cards. Case in point: kajiya is a Vulkan-based real-time path-tracing renderer that uses ReSTIR extensively in its global illumination pass.

Kajiya is just a renderer, and by Stachowiak's own admission, it's missing a lot of features that conventional renderers would have. That particularly means things you'd use in video games, like particle effects. What it does have is extremely fast and accurate path-traced lighting. Stachowiak says that the scene in the video embedded above runs at around 11ms per frame on a Radeon RX 6800 XT, or around 90 FPS.

Sure, 90 FPS in 1080p probably doesn't sound that great to Joe Gamer, and especially not for a $650 graphics card—albeit one not particularly great at ray-tracing. The thing you have to keep in mind is that this scene is fully path-traced. That means nothing is pre-baked; everything is done in the moment. You can move objects around and adjust the lighting at will, in real-time, and everything will look correct immediately.

kajiya restir 1

This is a tremendous boon for developers and artists who no longer have to wait for long compiles to complete before knowing how their scene looks in-game. (Unreal Engine 5's Lumen enables the same thing.) It also could mean great things for the interactivity of future games; the removal of pre-baked lighting means that the environment can shift and change in ways that previous renderers could never manage.

That said, despite the association with Embark Studios, kajiya isn't being used directly in any games, not even ARC Raiders. Instead, it's more of a testbed for rendering technology, and in that capacity, it not only gives us another look at the future of gaming graphics, but also serves as proof that you don't necessarily need hundreds of millions of dollars of R&D funding to roll your own ray-traced renderer.