Ray Tracer - DirectX 11 version

Type: Demo

Source: Personal Project

Language: C++

While browsing on my Twitter account, I found out about the book available online called Ray Tracing in One Weekend by Peter Shirley. This book is a very good guide to write a CPU based ray tracer that will produce some images by emulating the physics of light rays boucing in a scene. The result is usually some images with a good realistic look but is not suited for full real time rendering with frame times under 16.67ms.

While studying in Sherbrooke University, I took one class for photorealistic rendering in which I had to go through the exercice of writing a ray tracer that executes on the CPU. This renderer had some interesting features:

Since I already implemented this kind of demo before, I wanted to go through this book with one extra challenge in mind. I wanted to implement this ray tracer so it could run on the GPU instead of the CPU. I also wanted to learn how to une DirectX 11 so I decided to use this graphics API to help me with this task.

The implementation from Ray Tracing in One Weekend had similar features to the ray tracer I had to implement in my class. Throughout the experience, I was able to learn a lot about how DirectX is setup and how to use it for some performant rendering. Here are some of the things I learned:

Here are some screenshots of images rendered with the ray tracer: