Skip to main content
  1. Posts/

A ray-tracer can be your next weekend project

Online Rendering of “Raytracing in one weekend, chapter 12: Where next?” by Reinder NijhoffCC BY-NC-SA 4.0

You can write a ray-tracing renderer in about a weekend. In fact, a simple ray-tracer without complex shaders can be built in just some hours of work, granted you know the math behind ray-tracing.

The book "Ray Tracing in One Weekend" by Peter Shirley is the prime source about getting started with ray-tracers. It distills ray-tracing concepts and math into C++ functions that can render graphics such as the cover image in a couple of seconds in a modern CPU (check out this online demo) — it’s actually a pretty performing code for a weekend project.

Nvidia has also a blog post on how to make it even faster by using CUDA Cores. And you can get even more performance if you have a RTX/RX graphics card with this Vulkan implementation.

Now all my weekends look boring - and yours will too.