Inspiration

We wanted to implement a novel rendering technique. Out of all of the ones making waves today, radiance cascades seemed like the most doable in a single weekend with our current skill set.

What it does

The main goal in the field of computer graphics is to solve the rendering equation, which determines amount of light on a point. This equation has an integral, so the best we can do is to get as approximate as possible. In an offline renderer, one might use ray-tracing, sending out millions upon millions of rays into scenes that may take hours to render a single frame. In real-time, this is not feasible, so in real-time ray-tracing we send out a few rays and denoise the final image. Unfortunately, this leaves us still with relatively poor performance _ and _ a soft image. Radiance cascades aim to provide a middle ground between ray-tracing as a rasterized pipeline by using light probes that function based on penumbra theory. In short, when we are sampling close to the probe, we want our rays to be spread out and shorter, giving us high linear resolution and low angular resolution. But when we're sampling further away, we want to have many rays that have low linear resolution. From there, once we detect an intersection with a light source, it works just like normal ray-tracing. But instead of a soft image, our image is tack sharp with full global illumination.

How we built it

We used wgpu, building out our cascades inside of a compute shader and sending it to our fragment shader. We used V4-Engine, a Rust-based game engine created by one of our teammates, to provide infrastructure for our shaders.

Challenges we ran into

We spent much time trying to understand the algorithm, as the papers were quite technical, sample code was sparse, and there weren't many writeups that went into the level of detail we needed to write our own implementation.

Accomplishments that we're proud of

We're proud to have implemented a novel technique in such a short amount of time.

What we learned

We learned a lot about the state of modern rendering and how difficult it can be to tackle graphics in such a short amount of time.

What's next for Pacific

Our current implementation works in 2D, and now we are working on translating the technique into 3D.

Built With

  • rust
  • v4-engine
  • wgpu
  • wgsl
Share this project:

Updates