Skip to content

Commit 36e6093

Browse files
author
Alexey Panteleev
committed
RTXNTC v0.7.2
1 parent 24cd0bf commit 36e6093

18 files changed

Lines changed: 379 additions & 67 deletions

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "external/lodepng"]
55
path = external/lodepng
66
url = https://github.com/lvandeve/lodepng.git
7-
[submodule "external/DLSS"]
8-
path = external/DLSS
9-
url = https://github.com/NVIDIA/DLSS.git
107
[submodule "libraries/RTXTF-Library"]
118
path = libraries/RTXTF-Library
129
url = ../RTXTF-Library.git
@@ -16,3 +13,6 @@
1613
[submodule "libraries/RTXTS-TTM"]
1714
path = libraries/RTXTS-TTM
1815
url = ../RTXTS-TTM.git
16+
[submodule "external/implot"]
17+
path = external/implot
18+
url = https://github.com/epezent/implot.git

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ else()
2828
endif()
2929
option(DONUT_WITH_VULKAN "" ON)
3030
option(DONUT_WITH_STATIC_SHADERS "" ON)
31+
option(DONUT_WITH_DLSS "" ON)
3132

3233
# Register our path for CMake modules
3334
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/support/cmake")
@@ -107,11 +108,6 @@ option(NTC_WITH_VULKAN "" "${DONUT_WITH_VULKAN}")
107108

108109
add_subdirectory(libraries/RTXNTC-Library)
109110

110-
# Include DLSS and copy its shared lib to the output path
111-
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/external/DLSS.cmake")
112-
include(external/DLSS.cmake)
113-
endif()
114-
115111
if (DONUT_WITH_DX12)
116112
set(DONUT_D3D_AGILITY_SDK_URL "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.717.1-preview")
117113
set(DONUT_D3D_AGILITY_SDK_FETCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/dx12-agility-sdk" CACHE STRING "" FORCE)

ChangeLog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# RTX Neural Texture Compression SDK Change Log
22

3+
## 0.7.2 BETA
4+
5+
### LibNTC
6+
7+
- Fixed multiple causes for crashes that happened when attempting compression of very large texture sets.
8+
- Improved inference performance with Cooperative Vectors on DX12.
9+
10+
### Rendering Sample
11+
12+
- Added plots of frame and render time and tile counts.
13+
- Improved performance of the NTC On Feedback mode by implementing stochastic feedback.
14+
- Moved the DLSS integration into the Donut framework.
15+
16+
### Command-Line Tool
17+
18+
- Fixed integer overflows when compressing and decompressing very large texture sets.
19+
320
## 0.7.1 BETA
421

522
### LibNTC

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RTX Neural Texture Compression (NTC) SDK v0.7.1 BETA
1+
# RTX Neural Texture Compression (NTC) SDK v0.7.2 BETA
22

33
[Quick Start Guide](#quick-start-guide)
44

@@ -216,5 +216,3 @@ Please use GitHub issues or email [rtxntc-sdk-support@nvidia.com](mailto:rtxntc-
216216
## License
217217

218218
[NVIDIA RTX SDKs LICENSE](LICENSE.txt)
219-
220-
This project includes NVAPI software. All uses of NVAPI software are governed by the license terms specified here: https://github.com/NVIDIA/nvapi/blob/main/License.txt

ThirdPartyLicenses.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
374374

375375
// End of OpenEXR license -------------------------------------------------
376376

377+
378+
################################################################################
379+
##### #####
380+
##### implot #####
381+
##### https://github.com/epezent/implot #####
382+
################################################################################
383+
384+
MIT License
385+
386+
Copyright (c) 2023 Evan Pezent
387+
388+
Permission is hereby granted, free of charge, to any person obtaining a copy
389+
of this software and associated documentation files (the "Software"), to deal
390+
in the Software without restriction, including without limitation the rights
391+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
392+
copies of the Software, and to permit persons to whom the Software is
393+
furnished to do so, subject to the following conditions:
394+
395+
The above copyright notice and this permission notice shall be included in all
396+
copies or substantial portions of the Software.
397+
398+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
399+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
400+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
401+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
402+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
403+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
404+
SOFTWARE.

external/implot

Submodule implot added at 3da8bd3

samples/renderer/CMakeLists.txt

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
2020

2121
add_executable(ntc-renderer WIN32)
2222

23+
set(implot_dir ${CMAKE_SOURCE_DIR}/external/implot)
24+
2325
target_sources(ntc-renderer PRIVATE
2426
NtcChannelMapping.h
2527
NtcMaterial.h
@@ -32,6 +34,10 @@ target_sources(ntc-renderer PRIVATE
3234
Profiler.cpp
3335
Profiler.h
3436
RenderTargets.h
37+
${implot_dir}/implot_internal.h
38+
${implot_dir}/implot_items.cpp
39+
${implot_dir}/implot.cpp
40+
${implot_dir}/implot.h
3541
)
3642

3743
file(GLOB feedback_sources
@@ -47,25 +53,9 @@ if (DONUT_WITH_DX12)
4753
target_sources(ntc-renderer PRIVATE ${feedback_sources})
4854
endif()
4955

50-
if (TARGET DLSS)
51-
target_sources(ntc-renderer PRIVATE
52-
DLSS.cpp
53-
DLSS.h
54-
)
55-
if (DONUT_WITH_DX12)
56-
target_sources(ntc-renderer PRIVATE DLSS-DX12.cpp)
57-
endif()
58-
if (DONUT_WITH_VULKAN)
59-
target_sources(ntc-renderer PRIVATE DLSS-VK.cpp)
60-
endif()
61-
62-
target_link_libraries(ntc-renderer PRIVATE DLSS)
63-
target_compile_definitions(ntc-renderer PRIVATE NTC_WITH_DLSS=1)
64-
56+
if (DLSS_SHARED_LIBRARY_PATH)
6557
add_custom_command(TARGET ntc-renderer POST_BUILD COMMAND
6658
cmake -E copy_if_different "${DLSS_SHARED_LIBRARY_PATH}" "${NTC_BINARY_DIR}/")
67-
else()
68-
target_compile_definitions(ntc-renderer PRIVATE NTC_WITH_DLSS=0)
6959
endif()
7060

7161
set_target_properties(ntc-renderer PROPERTIES
@@ -106,6 +96,7 @@ target_include_directories(ntc-renderer PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
10696
target_include_directories(ntc-renderer PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../../external/donut/shaders")
10797
target_include_directories(ntc-renderer PRIVATE "${libstf_include_directory}")
10898
target_include_directories(ntc-renderer PRIVATE "${CMAKE_SOURCE_DIR}/libraries/RTXTS-TTM/include")
99+
target_include_directories(ntc-renderer PRIVATE "${implot_dir}")
109100

110101
add_custom_target(ntc-renderer-shaders
111102
DEPENDS ShaderMake

samples/renderer/ForwardShadingPassFeedback.hlsl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define MATERIAL_SAMPLER_SLOT FORWARD_BINDING_MATERIAL_SAMPLER
2727

2828
#include "donut/shaders/material_bindings.hlsli"
29+
#include "donut/shaders/hash_based_rng.hlsli"
2930

3031
#include "NtcForwardShadingPassConstants.h"
3132

@@ -200,7 +201,6 @@ MaterialTextureSample SampleMaterialTexturesFeedback(float2 texCoord, bool enabl
200201
return values;
201202
}
202203

203-
204204
#if !ENABLE_ALPHA_TEST
205205
[earlydepthstencil]
206206
#endif
@@ -214,10 +214,19 @@ void main(
214214
#endif
215215
)
216216
{
217+
bool enableFeedback = true;
218+
if (g_Pass.feedbackThreshold < 1.0)
219+
{
220+
uint2 uniformQuadCoord = uint2(i_position.xy) / 2;
221+
222+
HashBasedRNG rng = HashBasedRNG::Create2D(uniformQuadCoord, g_Pass.frameIndex);
223+
enableFeedback = rng.NextFloat() < g_Pass.feedbackThreshold;
224+
}
225+
217226
#if USE_STF
218-
MaterialTextureSample textures = SampleMaterialTexturesFeedbackSTF(int2(i_position.xy), i_vtx.texCoord, true);
227+
MaterialTextureSample textures = SampleMaterialTexturesFeedbackSTF(int2(i_position.xy), i_vtx.texCoord, enableFeedback);
219228
#else
220-
MaterialTextureSample textures = SampleMaterialTexturesFeedback(i_vtx.texCoord, true);
229+
MaterialTextureSample textures = SampleMaterialTexturesFeedback(i_vtx.texCoord, enableFeedback);
221230
#endif
222231

223232
MaterialConstants materialConstants = g_Material;

0 commit comments

Comments
 (0)