https://github.com/jan-van-bergen/GPU-Pathtracer Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} jan-van-bergen / GPU-Pathtracer * Notifications * Star 95 * Fork 3 GPU Pathtracer from scratch in C++/CUDA MIT License 95 stars 3 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code Clone HTTPS GitHub CLI [https://github.com/j] Use Git or checkout with SVN using the web URL. [gh repo clone jan-va] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @jan-van-bergen jan-van-bergen Merge branch 'master' of https://github.com/ jan-van-bergen/GPU-Pathtr... ... ffd0107 Aug 6, 2021 Merge branch 'master' of https://github.com/jan-van-bergen/ GPU-Pathtr... ...acer ffd0107 Git stats * 715 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time CUDA_Source Cleanup Jul 14, 2021 Data Sponza scene now uses Mitsuba format Aug 5, 2021 Imgui Added Dear ImGui to the project Mar 31, 2020 Screenshots Screenshots Aug 6, 2021 Shaders Removed rasterization pipeline Jun 12, 2021 Src Sponza scene now uses Mitsuba format Aug 5, 2021 dll Removed x86 support and added missing dll Jul 20, 2020 include Added miniz library Jul 16, 2021 lib Removed x86 support and added missing dll Jul 20, 2020 .gitattributes Add .gitignore and .gitattributes. Dec 30, 2019 .gitignore Updated gitignore Nov 6, 2020 LICENSE.txt Added MIT license Aug 3, 2021 Pathtracer.sln Removed x86 support and added missing dll Jul 20, 2020 Pathtracer.vcxproj Cleanup Jul 23, 2021 Pathtracer.vcxproj.filters Cleanup Jul 23, 2021 README.md Update README.md Aug 6, 2021 View code CUDA Pathtracer Features Screenshots Usage Dependencies Scene Sources README.md CUDA Pathtracer Scene Interactive CUDA pathtracer that implements a variety of rendering techniques. Features * Wavefront rendering, see Laine et al. 2013 * Multiple BVH types + Standard binary SAH-based BVH + SBVH (Spatial BVH), see Stich et al. 2009. This BVH is able to split across triangles. + QBVH (Quaternary BVH). The QBVH is a four-way BVH that is constructed by iteratively collapsing the Nodes of a binary BVH. The collapsing procedure was implemented as described in Wald et al. 2008. + CWBVH (Compressed Wide BVH), see Ylitie et al. 2017. Eight-way BVH that is constructed by collapsing a binary BVH. Each BVH Node is compressed so that it takes up only 80 bytes per node. The implementation incudes the Dynamic Fetch Heurisic as well as Triangle Postponing (see paper). The CWBVH outperforms all other BVH types. + BVH Optimization. The SAH cost of binary BVH's can be optimized using a method by Bittner et al. 2012. + All BVH types use Dynamic Ray Fetching to reduce divergence among threads, see Aila et al. 2009 * Two Level Acceleration Structures + BVH's are split into two parts, at the world level (TLAS) and at the model level (BLAS). This allows dynamic scenes with moving Meshes as well as Mesh instancing where multiple meshes with different transforms share the same underlying triangle/BVH data. * SVGF (Spatio-Temporal Variance Guided Filter), see Schied et al. Denoising filter that allows for noise-free images at interactive framerates. Also includes a TAA pass. * Importance Sampling + Next Event Estimation (NEE): Shadow rays are explicitly aimed at light sources to reduce variance. + Multiple Importance Sampling (MIS): Explicit light sampling (NEE) is combined with standard BRDF sampling using MIS to get the best of both. + Cosine weighted direction sampling for diffuse bounces. + Microfacet sampling as described in Walter et al. 2007 * Mipmapping: Textures are sampled using mipmapping. Mipmap sampling is done using ray cones (see Moller et al. 2012, Moller et al. 2019). Primary rays perform anisotropic sampling, subsequent bounces use isotropic sampling. * Blue Noise Sampling: The low discrepency sampler by Heitz et al. 2019 is used. This sampler distributes Monte Carlo errors as a blue noise in screen space. * Hot Reloading: When F5 is pressed the CUDA module is destroyed, recompiled, and reloaded. * Multiple Material types + Diffuse + Dielectrics + Microfacets (GGX) * Mitsuba XML Scene support: A custom Mitsuba XML parser is included to load scene files. Screenshots SVGF Denoising SVGF: Raw output of the pathtracer on the left and the filtered result on the right. Staircase Editor Coffee Usage Camera can be controlled with WASD for movement and the arrow keys for orientation. Shift and space do vertical movement. Various configurable options are available in Common.h. Dependencies The project uses SDL and GLEW. Their dll's for x64 are included in the repository, as well as all required headers. The project uses CUDA 11.0 and requires that the CUDA_PATH system variable is set to the path where the CUDA 11.0 SDK is installed. Scene Sources * OBJ files * Mitsuba files About GPU Pathtracer from scratch in C++/CUDA Topics cuda pathtracer svgf compressed-wide-bvh Resources Readme License MIT License Releases No releases published Packages 0 No packages published Languages * C 68.7% * C++ 30.6% * Other 0.7% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.