RTC in C Again
It's been a while and I had the time, so I decided to implement the Ray Tracer Challenge again. I decided to restart with C and finish (render the cover image) from scratch. Some of what I've learned in the Performance Aware Programming course came in handy and this is by far my fastest implementation of this ray tracer so far. I didn't put much explicit effort into performance, instead I just tried to avoid wasting CPU time and things worked out pretty well.
I rendered a bunch of frames of the cover image and stitched them together into the video above. In the optimized build, each 1000x1000 frame took around 5.5s with a 5 bounce depth. This is roughly 20,000 cycles per pixel (thanks RDTSC). It is amazing how fast software can be if keep your code simple and stay focused on transforming your data.