RTX Neural Shading (RTXNS), also known as RTX Neural Shaders, is a starting point for developers interested in bringing machine learning (ML) to graphics applications on Windows or Linux. It includes examples that show how to train neural networks and use the resulting models for inference alongside conventional graphics rendering.
RTXNS uses the Slang shading language and either the DirectX Preview Agility SDK or the Vulkan Cooperative Vector extension to access GPU ML acceleration.
The examples build on one another, progressing from simple inference to training a neural network to represent a shader or texture. The SDK also includes helper functions for building custom neural networks.
The SlangPy samples demonstrate rapid neural-network development in Python and how to integrate the resulting implementation into RTXNS for inference.
When exploring RTXNS, it is assumed that the reader is already familiar with ML and neural networks.
CMake 3.24 or later | Slang 2026.10*
Both x64 and Arm64 (Windows on Arm) targets are supported. Architecture-specific dependencies such as NVAPI, the Agility SDK, DXC, and Slang are selected for the target or build host as appropriate. CMakePresets.json provides Ninja-based Debug and Release presets for native and cross builds. Ninja is required when using these presets, but it is not required by the SDK: custom CMake builds can continue to use Visual Studio or another supported generator. From a command line, run a preset in the Visual Studio Developer Command Prompt for its target architecture. Visual Studio and VS Code can select the same presets directly. See the Quick Start Guide for commands and cross-compilation details.
DirectX Preview Agility SDK 1.721.3-preview* | Microsoft DXC v1.10.2605.24* | NVIDIA public R615 driver or newer
GPU must support the Vulkan VK_NV_cooperative_vector extension (minimum NVIDIA RTX 20XX) | Vulkan SDK 1.3.296.0 | NVIDIA public R570 driver or newer
CMake detects the Vulkan SDK through the VULKAN_SDK environment variable set by its installer (or system-wide Vulkan headers on Linux). When it is not found, the Vulkan backend and the SPIR-V shaders are not built and the samples are DirectX only. Setting -DDONUT_WITH_VULKAN=ON without the SDK is a configuration error; -DDONUT_WITH_VULKAN=OFF skips Vulkan even when the SDK is installed.
*Downloaded automatically by CMake during configuration; no separate installation is required.
05/30/2025: When updating from v1.0.0 to v1.1.0, delete the CMake cache to avoid build errors.
| Directory | Details |
|---|---|
| /assets | Asset files for samples |
| /docs | Documentation for showcased tech |
| /samples | Samples showcasing usage of MLPs |
| /external/donut | Framework used for the examples |
| /external | Helper dependencies for the examples |
| /src | Helper and utility functions |
- Quick start guide for building and running the neural shading samples.
- Library usage guide for using helper functions.
This project uses Slang and the Vulkan CoopVector extensions. The following links provide more detail on these, and other technologies which may help the reader to better understand the relevant technologies, or just to provide further reading.
RTXNS is actively being developed. Please report any issues directly through the GitHub issue tracker, and for any information or suggestions contact us at rtxns-sdk-support@nvidia.com
Use the following BibTex entry to cite the usage of RTXNS in published research:
@online{RTXNS,
title = {{{NVIDIA}}\textregistered{} {RTXNS}},
author = {{NVIDIA}},
year = 2025,
url = {https://github.com/NVIDIA-RTX/RTXNS},
urldate = {2025-02-03},
}See LICENSE.md