Until recently, I had let this page get rather out-of-date. Providing demos and code samples is harder after joining NVIDIA. The public has different expectations about support and quality of company-provided code, especially major companies like NVIDIA... even if the code was a crazy one-off hack written by one person five years ago. And without being a government employee (working for public benefit as I did in Iowa) there are different rationale for why and when to release code as a corporate researcher.
Below you will find examples of code I've been involved with. More recent code is likely to be (at best) only partially mine. However, I can answer many questions about these code examples.
Code and Demos Since Joining NVIDIA (2012+):
- Prototype code repository for our SIGGRAPH Asia 2023 paper "Conditional Resampled Importance Sampling and ReSTIR".
- We positioned this paper as a theory paper with (this) example prototype experiment to show the theory might have viable applications. I'm not sure the paper reviewers agreed with our view, and they were quite insistent on seeing code. While we think it may be possible to speed up this specific gather algorithm, it is unclear to me if this is a viable idea. Beware. We had (and have) other ideas for how to apply C-RIS in ways that seem more obviously useful. (We did this to break the theory and application papers apart and avoid writing more 25+ page papers like the [next] GRIS paper.)
- Caveat: Builds on Falcor; see discussion of Falcor-based code below.
- Research code repository for our SIGGRAPH 2022 paper "Generalized Resampled Importance Sampling: Foundations of ReSTIR".
- This is largely unoptimized research code. For reasons I don't understand, the academic graphics community largely does not value engineering. NVIDIA does. As we have not published our performance optimizations, we do not have freely available code that is faster.
- If I'm reviewing your paper, I don't expect you to quote up-to-date numbers (e.g., < 8 ms for the VeachAjar scene from Figure 15 [1 spp, Hybrid, on a 4090]). But you might take this into consideration if your goal is not just a publication, but to convince end users that your slightly faster algorithm is a good idea.
- Given a sufficient lead time, I'm happy to provide some numbers on our optimized code.
- Caveat: Builds on Falcor; see discussion of Falcor-based code below.
- Product code of the RTXDI SDK. This is a supported, continutally evolving NVIDIA SDK product that contains elements of numerous papers.
- It is intended to be exemplar code of how you might use ReSTIR for direct lighting, useful optimizations to make it production-ready, and work by colleagues on extending ReSTIR to diffuse indirect illumination. It includes a simple sample application that integrates ReSTIR with a bunch of other things.
- We don't expect people to integrate ReSTIR this way. We don't intend to suggest this is the best way to integrate ReSTIR. It's simply an example of how you might, with a design flexible enough that (we hope) it could be integrated into games or other applications.
- The SDK is freely available under a liberal license. For nitpicky reasons, this does not meet the official definition of an "open source" license. For researchers or someone experimenting with or evaluating ReSTIR, this shouldn't stop you from looking at the code and using it as an example implementation. If you want to directly integrate the SDK into commercial products, you should talk with NVIDIA developer relations. (I can connect you.)
- Example tutorials and demos for learning how to use the DirectX Ray Tracing API in DX12. This was based on our "Introduction to DirectX RayTracing" SIGGRAPH 2018 course, which was replayed at GDC once or twice, and led to the Ray Tracing Gems article of the same name.
- Eric Haines wrapped this code up a bit nicer on Github, and that repo is slightly more up-to-date.
- Caveat: Initially designed using early DXR API drafts, when the API was unstable and changing, before we had any actual ray tracing hardware. You need to read instructions carefully to ensure you get code for the final released API.
- Caveat: Builds on Falcor; see discussion of Falcor-based code below.
- Research code for the SVGF denoising filter from our HPG 2017 paper "Spatiotemporal Variance-Guided Filtering: Real-time Reconstruction for Path Traced Global Illumination.".
- Unmaintained research code (that no longer runs) is available here.
- SVGF has been integrated directly as supported functionality in our research team's Falcor rendering framework. Look at this code instead of the bit-rotted paper code.
- While the SVGF paper introduces ideas underlying many of today's shipping denoisers, they have evolved significantly. See, for instance, the NVIDIA Real-time Denoiser (NRD) SDK code, which includes production-ready filters that have shipped in many games and other applications.
- Our JCGT paper "Generating Stratified Random Lines in a Square" paper has simple 3-line C code inline to pick random (r, theta) using just two random variates for uniformly distributed line samples on a unit square.
- Our "Hashed Alpha Mapping" I3D 2017 paper and its extended follow-up in TVCG have 10-20 line GLSL snippets embedded in the paper.
- For our I3D 2015 paper "Frustum-Traced Raster Shadows: Revisiting Irregular Z-Buffers" (and its extended TVCG follow up), we provided a Windows binary demo.
- This algorithm shipped in NVIDIA's Gameworks package of SDKs as "Hybrid-Frustum-Traced Shadows", which went into two or three games as a high-end shadow option.
- We started moving on once we knew hardware-accelerated ray traced shadows and their associated denoisers would become reality.
- Our JCGT paper "Simple Analytic Approximations to the CIE XYZ Color Matching Functions" has a ~20 line C snippet embedded in the paper. This implements our best approximation to the CIE XYZ color matching functions, allowing analytic queries to our approximate functions, rather than downloading a spreadsheet of tabulated data at 1 nm increments.
- Interestingly, as I was writing this, I realized Wikipedia CIE 1931 page has a Gaussian fit explicitly written out and realized that's the fit from our paper.
NVIDIA Falcor Research Framework:
- Falcor is the NVIDIA Real-Time Graphics Research team's shared research infrastructure. While I am listed as a "co-author" on the Falcor BibTeX entry, my contributions are now a very tiny part of the overall framework. The goal is allow all 30 researchers on our team to have similar access to a variety of common utilities and to use common interfaces to increase the chances we can borrow ideas, code, and work from others on our team (even if they live halfway across the globe).
- Falcor continually evolves. We're perfectly happy to rip all or part of it up and start from scratch if that makes sense for NVIDIA and our research needs and goals. (It's become more Python-based and AI-oriented over time, for example.)
- We have full-time engineers supporting and evolving Falcor, but generally only to support our research team. If others use Falcor, that's great, but there is no external support or guarantees of stability or functionality between releases.
- Falcor is BSD-licensed.
- Because this is a large project, Falcor uses various package managers, build systems, scripting, etc., to ease the complexities inherent with many users doing complex research. But the external dependencies this introduces sometimes causes unexpected bit rot.
- For example, we use a package manager "packman" used across NVIDIA to grab the correct versions of DirectX and Slang compilers, CMake, Python, Assimp, etc., etc. Sometimes older packages silently disappear from our cloud repos. Sometimes the cloud security model changes so all dependency downloads fail unless you use updated packman scripts.
- Generally, our code is pretty easy to compile out-of-the-box and we test on fresh machines before sharing Github links or binaries. If you have difficulty compiling:
- Verify you're building in "Release" mode. I don't always validate Debug builds during some real-time oriented projects.
- Double check Git pulls the correct Falcor commit. Falcor's API continually evolves, but our code depends on a specific version.
- If you still see arcane compilation errors about missing headers, broken Windows functionality, CUDA issues, undefined functions, etc., this is probably a dependency error. Failures to download a dependency usually generates an error message, but it is not fatal. Sometimes it occurs before you open Visual Studio. The build usually fails much, much later. If you can identify which dependency is missing, I'm more likely to be able to help.
Code and Demos From the University of Iowa (2004-2012):
- A Windows binary and C++ code demonstrating our 2011 High Performance Graphics paper, "Voxelized Shadow Volumes"
- A Windows binary and C++ code demonstrating our 2009 Symposium on Interactive 3D Graphics paper, "Multiresolution Splatting for Indirect Illumination"
- A Windows binary and C++ code demonstrating our 2009 Eurographics paper, "Adaptive Caustics Maps Using Deferred Shading"
- A Windows binary and C++ code demonstrating our 2008 Symposium on Interactive Ray Tracing paper, "Interactive Volumetric Shadows in Participaring Media with Single-Scattering"
During my tenure as faculty at the
University of Iowa, I developed
an OpenGL-based library to help prototype my research ideas. Most of my and my students' research during my last
years in Iowa built on this library. I used this at NVIDIA for a few years, until we started developing Falcor. You are welcome to use my IGLU library and the following samples however you see fit, with the caveat that they come as-is, without warranty of any kind, and are entirely unmaintained.
Code Framework from the University of Iowa:
- (I)owa Open(GL) (U)tilities library, v0.5.0 [June 2013]
- Samples using IGLU, v0.4.0 [May 2012]