NGX.NET
310.9.16.2
See the version list below for details.
dotnet add package NGX.NET --version 310.9.16.2
NuGet\Install-Package NGX.NET -Version 310.9.16.2
<PackageReference Include="NGX.NET" Version="310.9.16.2" />
<PackageVersion Include="NGX.NET" Version="310.9.16.2" />
<PackageReference Include="NGX.NET" />
paket add NGX.NET --version 310.9.16.2
#r "nuget: NGX.NET, 310.9.16.2"
#:package NGX.NET@310.9.16.2
#addin nuget:?package=NGX.NET&version=310.9.16.2
#tool nuget:?package=NGX.NET&version=310.9.16.2
NGX.NET
Low-level, zero-overhead C# bindings for NVIDIA NGX (DLSS Super Resolution, Ray Reconstruction, and Frame Generation), auto-generated from the official NVIDIA DLSS SDK headers via Clang AST extraction.
Features
- Multi-Backend & Cross-Platform — Full coverage of
Ngx.D3D11,Ngx.D3D12,Ngx.Vulkan,Ngx.CUDA,Ngx.Parameter,Ngx.DLSS, andNgx.DLSSDacrosswin-x64,win-arm64,linux-x64, andlinux-arm64. - Lightweight Core + On-Demand Runtime Binaries — Ships only the minimal
ngx-bridgenative library in the NuGet package; opt into<NgxDownloadRuntime>true</NgxDownloadRuntime>to automatically download, SHA-256 verify, cache, and stage official DLSS runtime binaries at build/publish time. - Zero-Overhead Interop —
LibraryImportP/Invokes,readonly structhandles (NGXHandle,NGXParameter),unmanagedfunction pointers, zero-allocationReadOnlySpan<byte>parameter keys, and ergonomicin/out/string overloads. - Native AOT & Trimming Ready — Built with
IsAotCompatibleenabled and zero external dependencies.
Installation
dotnet add package NGX.NET
Requirements: .NET 10+, Windows (
x64,arm64) or Linux (x64,arm64), and a compatible NVIDIA GPU and driver.
Automatic Runtime Binary Download
To automatically download and stage official DLSS runtime libraries (nvngx_dlss* / libnvidia-ngx-dlss*) during build and publish, enable NgxDownloadRuntime in your .csproj:
<PropertyGroup>
<NgxDownloadRuntime>true</NgxDownloadRuntime>
</PropertyGroup>
Downloaded binaries are verified against pinned SHA-256 digests, cached under LocalApplicationData/NGX.NET/cache, filtered by <RuntimeIdentifier> / <RuntimeIdentifiers>, and kept side-by-side during PublishSingleFile builds.
Quick Start
using NGX.NET;
using NGXStrings strings = new();
void** paths = strings.AllocWide([Ngx.RuntimeDirectory]);
NGXFeatureCommonInfo commonInfo = new()
{
PathListInfo = new()
{
Path = paths,
Length = 1
}
};
NGXResult result = Ngx.D3D12.Init(applicationId, applicationDataPath, d3d12Device, &commonInfo);
if (Ngx.NVSDK_NGX_FAILED(result))
{
throw new InvalidOperationException(Ngx.GetResultString(result));
}
if (Ngx.NVSDK_NGX_SUCCEED(Ngx.D3D12.GetCapabilityParameters(out NGXParameter parameters)))
{
Ngx.DLSS.GetOptimalSettings(
parameters,
targetWidth,
targetHeight,
NGXPerfQualityValue.MaxQuality,
out uint renderWidth,
out uint renderHeight,
out _,
out _,
out _,
out _,
out _);
}
Usage Notes
- Pass
Ngx.RuntimeDirectoryinNGXFeatureCommonInfo.PathListInfowhen usingNgxDownloadRuntime, or supply your own feature search paths. - Check return codes with
Ngx.NVSDK_NGX_SUCCEED/Ngx.NVSDK_NGX_FAILEDand inspect failures viaNgx.GetResultString. - Use
new()when SDK structs define non-zero defaults;defaultzero-initializes all fields. - Keep native buffers, GPU resources, callbacks, and
NGXStringsallocations alive while NGX references them. - Release features, destroy allocated
NGXParameterinstances, and shut down NGX explicitly before releasing the graphics device.
Building & Regenerating Bindings
Run the Update NGX GitHub Actions workflow to pull the latest NVIDIA DLSS SDK, rebuild native bridges across all 4 platforms, refresh the runtime manifest, and regenerate C# bindings.
To regenerate locally from NGX.NET.Generator/ast.json and verify the package:
dotnet run --project NGX.NET.Generator -- .
dotnet build NGX.NET.slnx -c Release --warnaserror
python3 .github/scripts/build.py verify --root .
License
Bindings and tooling are licensed under MIT. Official NVIDIA DLSS SDK and runtime binaries remain subject to the NVIDIA DLSS SDK License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 310.9.16.3 | 67 | 11/25/2026 |
| 310.9.16.2 | 61 | 11/25/2026 |
| 310.9.16.1 | 57 | 11/25/2026 |
| 310.9.16 | 217 | 10/17/2026 |
| 310.9.1.2 | 162 | 10/14/2026 |
| 310.9.1.1 | 157 | 10/13/2026 |
| 310.9.1 | 192 | 10/1/2026 |