A ray-tracer can be your next weekend project
![](/til-a-ray-tracer-can-be-done-in-a-weekend/feature_hu6b8a3210deef7934f3a21db92147455c_337590_660x0_resize_q75_h2_box_2.webp)
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.