Challenges in porting Ray Tracing in One Weekend to the GPU
Lately I’ve been learning OpenGL and to get better at coding shaders I went through the Ray Tracing in One Weekend book and ported it to GLSL (OpenGL Shading Language). The book is great by the way and I would recommend this challenge to anyone who is interested in learning about ray tracing or shader programming. The book implements the ray tracer in C++ on the CPU and I’ve ported it to GLSL to run on the GPU. While making the port I ran into some interesting challenges due to the differences in CPU and GPU architectures so I thought I’d write a post about them and how I solved them.