NRD sample and sandbox, demonstrating path tracing and denoising best practices
NRD sample and sandbox, demonstrating path tracing and denoising best practices
NRD Sample is a high-performance playground and reference implementation for path tracing in games. It provides a comprehensive environment to see NRD (NVIDIA Real-time Denoisers) in action across all possible use cases and compare it directly with DLSS-RR. While NRD and DLSS-RR are highly competitive today, effective comparison requires enabling NRD "SH" mode (set via the NRD_MODE macro in Shared.hlsli). The sample is designed to demonstrate production-ready path tracing best practices suitable for real-time gaming that balance visual fidelity with high performance. A core focus of the project is high-performance glass and transparency rendering. Built on the NRI (NVIDIA Rendering Interface), the sample is natively cross-platform, supporting both D3D12 and Vulkan. The ideas from the sample are already used in several AAA games and game mods.
Features:
NRD_MODE in Shared.hlsli to SH to unclock Spherical Harmonics (Gaussians) resolve mode essential for image quality!GitHub branches:
simplex branchHitDistanceReconstructionMode::AREA_3X3 reconstruction). Recommended for learning NRD integration and borrowing PT code. It offers better performance and has less codemain branch-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$:Debug>" parameter when deploying the project1-Deploy2-BuildCMake options:
USE_MINIMAL_DATA=OFF - download minimal resource package (90MB)RTXCR_INTEGRATION - use RTXCR for hair and skin rendering, download sample scene3-Run script and answer the cmdline questions to set the runtime parameters_Bin. The executable loads resources from _Data, therefore please run the samples with working directory set to the project root folder (needed pieces of the command line can be found in 3-Run script)Requirements:
By default, NRD is used in common mode. To switch to "SH" or "occlusion-only" modes, modify the NRD_MODE macro in Shared.hlsli to one of the following: NORMAL, OCCLUSION, SH, or DIRECTIONAL_OCCLUSION. RELAX doesn't support AO / SO denoising. If RELAX is the current denoiser, ambient term will be flat.
Controls:
No open issues yet, or sync has not completed.