Modernizing Raytracing In A Weekend

Ray Tracing In A Weekend Repo

My Modernized Ray Tracing In A Weekend Repo

The improvements I made to the original code:

  • Convert all raw allocation to shared_ptr to prevent memory leaks.
  • Replace non-reentrant rand() with a copy of C++11 random number generator in every thread using thread_local to avoid sharing and locking.
  • Replace the text-based image format with stb_image saving to PNG.
  • Parallelize with C++17 parallel for_each, achieving a more than 5X performance on my 6 core CPU.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close