Skip to content

Commit

Permalink
v4.1.1:
Browse files Browse the repository at this point in the history
HIGHLIGHTS:
- minor fixes

DETAILS:
- NRD: luminance switched to BT.709 instead of BT.601
- NRD: README mentions email alias for feedback
- RELAX: added missing "roughnessModified" in SMEM A-trous pass
- polishing
- updated dependencies
  • Loading branch information
dzhdanNV committed Mar 30, 2023
1 parent df3573e commit f614c71
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 13 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ set_source_files_properties (${SHADERS} PROPERTIES VS_TOOL_OVERRIDE "None")

if (WIN32)
add_custom_target (${PROJECT_NAME}_Shaders ALL
COMMAND ShaderMake
COMMAND ShaderMake --useAPI
--header ${NRD_SHADER_BINARIES} --flatten --stripReflection --compiler "${DXC_PATH}"
--sourceDir "Shaders/Source"
--allResourcesBound
Expand All @@ -155,7 +155,7 @@ if (WIN32)
-D NRD_NORMAL_ENCODING=${NRD_NORMAL_ENCODING}
-D NRD_ROUGHNESS_ENCODING=${NRD_ROUGHNESS_ENCODING}
-D NRD_INTERNAL
COMMAND ShaderMake
COMMAND ShaderMake --useAPI
--header ${NRD_SHADER_BINARIES} --flatten --stripReflection --compiler "${DXC_SPIRV_PATH}"
--sourceDir "Shaders/Source"
--allResourcesBound
Expand All @@ -168,7 +168,7 @@ if (WIN32)
-D NRD_NORMAL_ENCODING=${NRD_NORMAL_ENCODING}
-D NRD_ROUGHNESS_ENCODING=${NRD_ROUGHNESS_ENCODING}
-D NRD_INTERNAL
COMMAND ShaderMake
COMMAND ShaderMake --useAPI
--header ${NRD_SHADER_BINARIES} --flatten --stripReflection --compiler "${FXC_PATH}"
--sourceDir "Shaders/Source"
--allResourcesBound
Expand Down
2 changes: 1 addition & 1 deletion External/MathLib
Submodule MathLib updated 1 files
+1 −1 STL.hlsli
2 changes: 1 addition & 1 deletion External/ShaderMake
4 changes: 2 additions & 2 deletions Include/NRD.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.

#define NRD_VERSION_MAJOR 4
#define NRD_VERSION_MINOR 1
#define NRD_VERSION_BUILD 0
#define NRD_VERSION_DATE "23 March 2023"
#define NRD_VERSION_BUILD 1
#define NRD_VERSION_DATE "30 March 2023"

#if defined(_MSC_VER)
#define NRD_CALL __fastcall
Expand Down
6 changes: 4 additions & 2 deletions Include/NRDSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ namespace nrd
// Probabilistic split at primary hit is not used, hence hit distance is always valid (reconstruction is not needed)
OFF,

// If hit distance is invalid due to probabilistic sampling, reconstruct using 3x3 neighbors
// If hit distance is invalid due to probabilistic sampling, reconstruct using 3x3 neighbors.
// Probability at primary hit must be clamped to [1/4; 3/4] range to guarantee a sample in this area
AREA_3X3,

// If hit distance is invalid due to probabilistic sampling, reconstruct using 5x5 neighbors
// If hit distance is invalid due to probabilistic sampling, reconstruct using 5x5 neighbors.
// Probability at primary hit must be clamped to [1/16; 15/16] range to guarantee a sample in this area
AREA_5X5,

MAX_NUM
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NVIDIA Real-time Denoisers v4.1.0 (NRD)
# NVIDIA REAL-TIME DENOISERS v4.1.1 (NRD)

[![Build NRD SDK](https://github.com/NVIDIAGameWorks/RayTracingDenoiser/actions/workflows/build.yml/badge.svg)](https://github.com/NVIDIAGameWorks/RayTracingDenoiser/actions/workflows/build.yml)

Expand Down Expand Up @@ -93,6 +93,8 @@ NRD sample has *TESTS* section in the bottom of the UI, a new test can be added
- If nothing helps
- describe the issue, attach a video and steps to reproduce

Additionally, for any information, suggestions or general requests please feel free to contact us at NRD-SDK-Support@nvidia.com

# API

Terminology:
Expand Down
2 changes: 1 addition & 1 deletion Resources/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Versioning rules:

#define VERSION_MAJOR 4
#define VERSION_MINOR 1
#define VERSION_BUILD 0
#define VERSION_BUILD 1
#define VERSION_REVISION 0

#define VERSION_STRING STR(VERSION_MAJOR.VERSION_MINOR.VERSION_BUILD.VERSION_REVISION)
3 changes: 2 additions & 1 deletion Shaders/Include/NRD.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ float3 _NRD_DecodeUnitVector( float2 p, const bool bSigned = false, const bool b
// Color space
float _NRD_Luminance( float3 linearColor )
{
return dot( linearColor, float3( 0.2990, 0.5870, 0.1140 ) );
// IMPORTANT: must be in sync with STL_LUMINANCE_DEFAULT
return dot( linearColor, float3( 0.2126, 0.7152, 0.0722 ) );
}

float3 _NRD_LinearToYCoCg( float3 color )
Expand Down
3 changes: 2 additions & 1 deletion Shaders/Include/RELAX/RELAX_DiffuseSpecular_AtrousSmem.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ NRD_EXPORT void NRD_CS_MAIN(int2 pixelPos : SV_DispatchThreadId, uint2 threadPos
specularVariance *= boost;
gOutSpecularIlluminationAndVariance[pixelPos] = float4(sumSpecularIllumination, specularVariance);
#ifdef RELAX_SH
gOutSpecularSH1[pixelPos] = sumSpecularSH1 / sumWSpecularIllumination;
float roughnessModified = sharedSpecularSH1[sharedMemoryIndex.y][sharedMemoryIndex.x].w;
gOutSpecularSH1[pixelPos] = float4(sumSpecularSH1.rgb / sumWSpecularIllumination, roughnessModified);
#endif
#endif

Expand Down
4 changes: 4 additions & 0 deletions Source/DenoiserImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,7 @@ namespace nrd
dst++;
}
}

// IMPORTANT: needed only for DXBC produced by ShaderMake without "--useAPI"
#undef BYTE
#define BYTE uint8_t

0 comments on commit f614c71

Please sign in to comment.