Our great sponsors
-
PSRayTracing
A (modern) C++ implementation of the Peter Shirley Ray Tracing mini-books (https://raytracing.github.io). Features a clean project structure, perf. improvements (compared to the original code), multi-core rendering, and more.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Last year I was working on an implementation of the Ray Tracing in one Weekend book series. I noticed there was a fair amount of sub-optimal code in it, so I took the opportunity to rewrite parts of it to be better optimized. One of the other things I added to the CMake configuration were some compile time flags that could be toggled ON/OFF, as to use either the books code, or my code. e.g. WITH_BOOK_AABB_HIT=True, it would use the books' method AABB-Ray intersection. False, it would use my (faster) one. This allowed anyone else to download the code, toggle the change and easily see the effect it had on performance.
Related posts
- I made a drop in replacement of `std::shared_ptr` to experiment with performance. It wasn't any faster. Why?
- Stories of what happened when you forgot to initialize a variable
- Deploy multi-platform applications with C++ (desktop, mobile and web). An example with Dear ImGui
- Introducing TeaScript C++ Library
- C++20 Idioms for Parameter Packs