Skip to content

Commit

Permalink
Updated RTXDI to version 1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Nov 5, 2021
1 parent 077b6fa commit 21080f1
Show file tree
Hide file tree
Showing 104 changed files with 7,071 additions and 1,343 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
media*/
bin/
dxc/
donut-*/
build*/
/media*
/dxc
/donut-*
/build*
.vs
.vscode
*.sublime-project
*.sublime-workspace
*.sublime-workspace
compile-shaders.bat
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "NRD"]
path = NRD
url = https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git
[submodule "DLSS"]
path = DLSS
url = https://github.com/NVIDIA/DLSS.git
[submodule "RTXGI"]
path = RTXGI
url = https://github.com/NVIDIAGameWorks/RTXGI.git
29 changes: 28 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (MSVC)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")

elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

# JsonCpp uses its own deprecated methods, which produces annoying warnings.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")

endif()

option(DONUT_USE_DXIL_ON_DX12 "" ON)
Expand All @@ -43,7 +49,7 @@ if (EXISTS "${PACKMAN_DXC}")
endif()
endif()

set(DONUT_SHADERS_OUTPUT_DIR "${CMAKE_SOURCE_DIR}/bin/shaders/framework")
set(DONUT_SHADERS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/bin/shaders/framework")

if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/donut")
add_subdirectory(donut)
Expand All @@ -54,7 +60,28 @@ else()
endif()

include(NRD.cmake)
include(DLSS.cmake)

if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTXGI/rtxgi-sdk/CMakeLists.txt")
option(RTXDI_WITH_RTXGI "Enable the RTXGI integration" ON)

if (RTXDI_WITH_RTXGI)
option(RTXGI_DDGI_RESOURCE_MANAGEMENT "" ON)
option(RTXGI_DDGI_USE_SHADER_CONFIG_FILE "" ON)

if (UNIX)
set(RTXGI_API_VULKAN_SDK ON)
set(Vulkan_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/donut/nvrhi/thirdparty/Vulkan-Headers/include")
endif()

add_subdirectory(RTXGI/rtxgi-sdk)
endif()
endif()

add_subdirectory(rtxdi-sdk)
add_subdirectory(shaders)
add_subdirectory(src)

if (MSVC)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT rtxdi-sample)
endif()
46 changes: 45 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
# RTXDI SDK Change Log

## 1.1.0
## 1.2.0

**Release highlights:**

- Integrated [RTXGI](https://developer.nvidia.com/rtxgi) into the sample app. The RTXGI probes provide indirect lighting for primary or secondary surfaces, depending on the settings.
- Integrated [DLSS](https://developer.nvidia.com/dlss) into the sample app.
- Updated [NRD](https://github.com/NVIDIAGameWorks/RayTracingDenoiser) to version 2.9.
- Added support for rendering a denoiser confidence signal from ReSTIR, see [Computing Denoiser Confidence Inputs using RTXDI](doc/Confidence.md).
- Added sample permutations into the temporal resampling functions. These permutations greatly improve the temporal properties of the ReSTIR signal. See `enablePermutationSampling`.

**New features:**

- Added support for low-resolution rendering and temporal upscaling through TAAU or DLSS.
- Added resampling from the G-buffer on secondary surfaces to improve the secondary direct lighting sampling quality.
- Added an option to mix some noise back into the denoiser output, which improves final image sharpness with DLSS.
- Added custom visualization modes for many HDR signals like lighting luminance or reservoir weights.
- Added support for zero-radius point lights.

**API changes:**

- Added the `temporalSamplePixelPos` out parameter to the temporal and spatio-temporal resampling functions.
- Added the optional `selectedLightSample` in-out parameter to all resampling functions.

**Misc improvements:**

- Added a `-debug` command line option to enable the validation layers.
- Changed the motion vector formulation to be compatible with NRD and DLSS in case of dynamic resolution.
- Improved specular MIS with importance sampled environment maps.
- Improved temporal resampling performance by skipping the visibility ray for most pixels with no quality loss. See `enableVisibilityShortcut`.
- Improved the organization of the source code files into folders.
- Improved the processing of profiler readbacks to remove a pipeline bubble and improve overall performance.
- Made the RTXDI SDK shader headers compatible with the [Slang](https://github.com/shader-slang/slang) compiler.
- Moved the shading of secondary surfaces into a separate pass, which often improves performance.
- Re-designed the sample application user interface.

**Fixed issues:**

- Fixed the brightening bias that happened in disoccluded regions in the spatial resampling pass.
- Fixed the handling of reservoirs for lights that have disappeared.
- Fixed the data corruption in packed reservoirs that was caused by negative distance values.
- Fixed some issues with glTF models that have multiple geometries in their meshes.
- Fixed the `packman` file permissions on Linux.


## 1.1.0

**API changes:**

Expand All @@ -27,6 +70,7 @@
- Fixed some issues with the material model and BRDF evaluation.
- Improved the BRDF ray importance sampling logic.


## 1.0.0

Initial release.
1 change: 1 addition & 0 deletions DLSS
Submodule DLSS added at 59c586
38 changes: 38 additions & 0 deletions DLSS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

set(dlss_sdk "${CMAKE_CURRENT_SOURCE_DIR}/DLSS")

if (WIN32)
add_library(DLSS SHARED IMPORTED)

set(dlss_platform "Windows_x86_64")
set(dlss_lib_release "nvsdk_ngx_s.lib")
set(dlss_lib_debug "nvsdk_ngx_s_dbg.lib")

set_target_properties(DLSS PROPERTIES
IMPORTED_IMPLIB "${dlss_sdk}/lib/${dlss_platform}/x86_64/${dlss_lib_release}"
IMPORTED_IMPLIB_DEBUG "${dlss_sdk}/lib/${dlss_platform}/x86_64/${dlss_lib_debug}"
IMPORTED_LOCATION "${dlss_sdk}/lib/${dlss_platform}/rel/nvngx_dlss.dll"
IMPORTED_LOCATION_DEBUG "${dlss_sdk}/lib/${dlss_platform}/dev/nvngx_dlss.dll"
)

set(DLSS_SHARED_LIBRARY_PATH "${dlss_sdk}/lib/${dlss_platform}/$<IF:$<CONFIG:Debug>,dev,rel>/nvngx_dlss.dll")

elseif (UNIX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
add_library(DLSS STATIC IMPORTED)

set(dlss_platform "Linux_x86_64")
set(dlss_lib "libnvidia-ngx-dlss.so.2.3.1")

set_target_properties(DLSS PROPERTIES
IMPORTED_LOCATION "${dlss_sdk}/lib/${dlss_platform}/libnvsdk_ngx.a"
)

set(DLSS_SHARED_LIBRARY_PATH "${dlss_sdk}/lib/${dlss_platform}/$<IF:$<CONFIG:Debug>,dev,rel>/${dlss_lib}")

else()
message("DLSS is not supported on the target platform.")
endif()

if (TARGET DLSS)
target_include_directories(DLSS INTERFACE "${dlss_sdk}/include")
endif()
2 changes: 1 addition & 1 deletion NRD
Submodule NRD updated 241 files
4 changes: 2 additions & 2 deletions NRD.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/NRD")
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/NRD/CMakeLists.txt")
set(NRD_DXC_PATH ${DXC_DXIL_EXECUTABLE})
set(NRD_DXC_SPIRV_PATH ${DXC_SPIRV_EXECUTABLE})
option(NRD_STATIC_LIBRARY "" ON)

add_subdirectory(NRD)

set_target_properties(NRD PROPERTIES FOLDER NRD)
set_target_properties(Shaders PROPERTIES FOLDER NRD)
set_target_properties(NrdShaders PROPERTIES FOLDER NRD)
set_target_properties(CreateFolderForShaders PROPERTIES FOLDER NRD)
endif()
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# RTXDI SDK and Sample App

Version 1.1.
Version 1.2.

[Change Log](ChangeLog.md)

Expand All @@ -28,50 +28,67 @@ For more information, see the [NVIDIA Developer Page](https://developer.nvidia.c

[`NRD`](NRD) is a submodule with the ["NRD" denoiser library](https://github.com/NVIDIAGameWorks/RayTracingDenoiser).

[`DLSS`](DLSS) is a submodule with the [Deep Learning Super-Sampling SDK](https://github.com/NVIDIA/DLSS).

[`RTXGI`](RTXGI) is a submodule with the [RTX Global Illumination SDK](https://github.com/NVIDIAGameWorks/RTXGI).

Additional contents delivered through packman:

`dxc` is a recent version of DirectX Shader Compiler;

`media` contains the media files necessary for the sample app to run.

**NOTE:** the NRD, DLSS and RTXGI dependencies are optional. If you cannot access any of these repositories, just skip cloning the submodule(s). Git doesn't make that easy, but initializing submodules individually should work, like so:

`git submodule update --init --recursive donut DLSS`

## Building and Running the Sample App

### Windows

1. Clone the repository with all submodules:
- `git clone --recursive <URL>`
1. Clone the repository with all submodules (see the note about optional submodules above):
- `git clone --recursive https://github.com/NVIDIAGameWorks/RTXDI.git`

2. Pull the media files and DXC binaries from packman:
- `update_dependencies.bat`

3. Configure the solution with CMake. The easiest option is to use [CMake GUI](https://cmake.org/download/).

4. Assuming that the RTXDI SDK tree is located in `D:\RTXDI`, set the following parameters in the GUI:
- "Where is the source code" to `D:\RTXDI`
- "Where to build the binaries" to `D:\RTXDI\build`

5. Click "Configure", set "Generator" to the Visual Studio you're using (tested with VS 2019 version 16.8.2), set "Optional platform" to x64, click "Finish".

6. Click "Generate", then "Open Project".

7. Build the solution with Visual Studio

8. Run the `rtxdi-sample` project.

### Linux

1. Clone the repository with all submodules:
- `git clone --recursive <URL>`
1. Make sure the necessary build packages are installed on the target system. For Ubuntu 20.04 (amd64), the following command is sufficient:
- `sudo apt install build-essential cmake xorg-dev libtinfo5`

2. Pull the media files and DXC binaries from packman:
- `update_dependencies.sh`
2. Clone the repository with all submodules (see the note about optional submodules above):
- `git clone --recursive https://github.com/NVIDIAGameWorks/RTXDI.git`


3. Pull the media files and DXC binaries from packman:
- `cd RTXDI && ./update_dependencies.sh`

3. Create a build folder:
- `cd RTXDI && mkdir build && cd build`
4. Create a build folder:
- `mkdir build && cd build`

4. Configure the project with CMake:
5. Configure the project with CMake:
- `cmake ..`

5. Build:
- `make -j8` (example for an 8-core CPU)
6. Build:
- `make -j8` (example for an 8-core CPU, or use [Ninja](https://ninja-build.org) instead)

6. Run:
- `../bin/rtxdi-sample`
7. Run:
- `bin/rtxdi-sample`

### Vulkan support

Expand Down
1 change: 1 addition & 0 deletions RTXGI
Submodule RTXGI added at bb32fd
Loading

0 comments on commit 21080f1

Please sign in to comment.