{"id":18753663,"url":"https://github.com/gpsnoopy/raytracingthenextweek","last_synced_at":"2025-07-14T23:06:47.667Z","repository":{"id":148699380,"uuid":"175669962","full_name":"GPSnoopy/RayTracingTheNextWeek","owner":"GPSnoopy","description":"Implementation of Peter Shirley's Ray Tracing The Next Week book. ","archived":false,"fork":false,"pushed_at":"2019-10-29T22:02:50.000Z","size":4008,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T01:21:34.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPSnoopy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-14T17:33:42.000Z","updated_at":"2025-03-13T15:28:19.000Z","dependencies_parsed_at":"2023-05-28T16:45:21.847Z","dependency_job_id":null,"html_url":"https://github.com/GPSnoopy/RayTracingTheNextWeek","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GPSnoopy/RayTracingTheNextWeek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPSnoopy%2FRayTracingTheNextWeek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPSnoopy%2FRayTracingTheNextWeek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPSnoopy%2FRayTracingTheNextWeek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPSnoopy%2FRayTracingTheNextWeek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPSnoopy","download_url":"https://codeload.github.com/GPSnoopy/RayTracingTheNextWeek/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPSnoopy%2FRayTracingTheNextWeek/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265365637,"owners_count":23753364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T17:26:33.634Z","updated_at":"2025-07-14T23:06:47.176Z","avatar_url":"https://github.com/GPSnoopy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ray Tracing The Next Week\n\n\u003cimg align=\"center\" src=\"https://github.com/GPSnoopy/RayTracingTheNextWeek/blob/master/Book2.jpg\"\u003e\n\nMy take on [Peter Shirley's Ray Tracing The Next Week](https://github.com/RayTracing/raytracing.github.io) book. This is the second book in his *Ray Tracing In One Weekend* series. My take on his first book is available [here](https://github.com/GPSnoopy/RayTracingInOneWeekend).\n\nOn top of my own programming style, I have added:\n* Multi-threading support.\n* Optimizing AABB ray intersection by removing conditional branches (this runs faster on any modern processor).\n* Building the BVH tree using `depth%3` splitting rather than random one (this seems to run faster in my case).\n* Using SSE and AVX instructions for implementing the Vec3 class.\n\nThe Earth texture was found on [NASA's The Blue Marbe](https://visibleearth.nasa.gov/view.php?id=57735).\n\n## Building\n\nVisual Studio 2019 project files provided as-is. Use `build_linux.sh` for a GCC build, be sure to change the `-march=skylake` to match your  processor.\n\n## Performance\n\nThe cover picture was rendered in about 26h running 14 threads on a Core i9-9900K @ 4.7GHz at 3840x2160 with 65536 samples per pixel. I've used [GIMP](https://www.gimp.org/) to open the resulting PPM image and convert it to more standard formats such as PNG and JPEG.\n\nFor best performance, I recommend the Linux build even on Windows (I've used Ubuntu 18.04 running via [WSL on Windows 10 1809](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)). For some reason, GCC (7.3) seems better at generating AVX FMA instructions than Visual Studio 2019 (16.3) on this code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpsnoopy%2Fraytracingthenextweek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpsnoopy%2Fraytracingthenextweek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpsnoopy%2Fraytracingthenextweek/lists"}