Unity-DLSS is a Unity native plugin with NVIDIA DLSS Super Resolution, Ray Reconstruction, and optional DLSS 5 Neural Rendering support.
The SDK is pinned to NVIDIA DLSS v310.9.1, which adds Ray Reconstruction Preset F (RR2). SDK and product version numbers differ.
Run ./fetch_dlss.ps1 and rebuild. Deploy the updated UnityDLSS.dll,
nvngx_dlssd.dll and C# wrappers together; changing the enum alone does not
update the runtime model.
var rr = new DLSSRayReconstruction(preset: DLSSRRPreset.F);
rr.SetPreset(DLSSRRPreset.F); // Also supported on an existing instance.Changing presets recreates the feature on the next render and resets temporal
history. The selected model applies to all six quality modes. Existing calls
remain source-compatible and use Default (NGX selection, subject to runtime
and OTA updates); D and E remain selectable. IsSupported checks general RR
availability, not whether an older runtime supports F. Use the 310.9.1 runtime.
This project integrates NVIDIA DLSS SDK without including the full repository in the source code to avoid open-source licensing risks.
Before building, you need to fetch the DLSS headers and DLLs:
.\fetch_dlss.ps1This script will:
- Download the DLSS SDK from GitHub (https://github.com/NVIDIA/DLSS)
- Extract header files from
include/toExternal/NVIDIA-DLSS/include - Extract DLL files from
lib/Windows_x86_64/rel/toExternal/NVIDIA-DLSS/lib
After fetching DLSS, configure and build with CMake:
mkdir build
cd build
cmake ..
cmake --build .DLSS 5 Neural Rendering is delivered as a separate NVIDIA-signed
nvngx_dlssnr.dll and is not downloaded by fetch_dlss.ps1. Configure its
path when it is available:
cmake -S . -B build -DDLSSNR_DLL:FILEPATH="D:/path/to/nvngx_dlssnr.dll"
cmake --build build --config ReleaseThe build copies the file next to UnityDLSS.dll. Without this option the
plugin still builds, and DLSS-SR/RR remain available; the managed
IsNRSupported property reports false.
The CMake configuration will automatically:
- Include DLSS header files in the build
- Copy DLSS DLLs to the output directory alongside your plugin DLL
├── External/
│ └── NVIDIA-DLSS/ # DLSS SDK (fetched by script)
│ ├── include/ # DLSS header files
│ └── lib/ # DLSS DLL files
├── PluginAPI/ # Unity plugin API headers
├── src/ # Plugin source code
├── CMakeLists.txt # CMake configuration
└── fetch_dlss.ps1 # Script to fetch DLSS SDK
- The DLSS SDK is fetched at build time, not stored in the repository
- Only the necessary files (headers and DLLs) are extracted
- The script supports both git sparse checkout and zip download methods
nvngx_dlssnr.dllis not committed or redistributed by this repository- DLSS 5 Neural Rendering uses D3D12 NGX feature 18 and is independent of DLSS Ray Reconstruction (feature 13)