The fastest way to start learning RTXGI is to clone, build, and run the Test Harness sample application provided alongside the SDK.
-
Clone the repository (with all submodules)
git clone --recursive https://github.com/NVIDIAGameWorks/RTXGI.git -
Install the Vulkan SDK (optional on Windows)
-
Clone the Khronos Sponza GLTF content (optional)
-
Clone https://github.com/KhronosGroup/glTF-Sample-Models to somewhere on your machine (but don't clone it inside of this project).
-
Copy or move the contents of https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Sponza/glTF into
samples/test-harness/data/gltf/sponza. -
See the Sponza README for more information.
-
-
Install CMake. The CMake GUI is convenient and easy to use.
-
Open CMake GUI and fill in the path options.
-
Click
Configure- If using Visual Studio 2017 on Windows, select
x64as the platform for the generator in the dropdown. - If using Visual Studio 2019 or later on Windows, the platform is
x64by default. - The configuration process downloads and extracts the DirectX12 Agility SDK and DirectX Shader Compiler to the external/agilitysdk and external/dxc directories (respectively).
- If using Visual Studio 2017 on Windows, select
-
Click
Generate- The generated Visual Studio project is located in
[path-to-repo]/build/RTXGI.sln(e.g.C:/rtxgi/build/RTXGI.sln).
- The generated Visual Studio project is located in
-
Click
Open Projectin CMake to open the generated Visual Studio solution. -
Build the solution.
- Note: if you want to just build the RTXGI SDK, uncheck the
RTXGI_BUILD_SAMPLESoption in CMake, click Generate, and reload the Visual Studio solution. The RTXGI Samples and Thirdparty folders will be removed.
- Note: if you want to just build the RTXGI SDK, uncheck the
-
Set the Startup Project to
TestHarness-D3D12(orTestHarness-VK). -
Run the Test Harness.
-
Open Visual Studio Code.
-
Open the folder (
File->Open Folder) where you cloned the repository (e.g.C:rtxgi/)* The VSCode [CMake Tools Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) is useful if you want to configure, generate, and build all in VSCode.  -
Build the default target.
-
Select
Run->Start without Debugging- This uses the launch arguments in
[path-to-repo]/.vscode/launch.json
- This uses the launch arguments in
The Cornell Box scene is loaded by default and you should see the below result:


