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
-
Download the dependencies using Packman
update_dependencies.bat
(Windows)update_dependencies.sh
(Linux)After executing the appropriate script, the d3d and dxc directories containing the DirectX12 Agility SDK and DirectX Shader Compiler (respectively) should exist next to the cloned files from Step 1.
-
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
x64
as the platform for the generator in the dropdown. - If using Visual Studio 2019 or later on Windows, the platform is
x64
by default.
- 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 Project
in 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_SAMPLES
option 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 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: