Skip to content

Commit

Permalink
NRD v3.7.0:
Browse files Browse the repository at this point in the history
HIGHLIGHTS:
- NRD: introduced NRD_NORMAL_ENCODING and NRD_ROUGHNESS_ENCODING parameters (controlled via CMake) to cover more encoding variants out of the box
- NRD: introduced read-only "normalEncoding" and "roughnessEncoding" in "LibraryDesc" describing which encoding NRD has been compiled with
- NRD: improved curvature estimation and usage for any type of supported normal encoding
- NRD: fixed wrong curvature direction (was Y-flipped)
- NRD: CLEAR_AND_RESTART now clears only "history" resources, including user-provided outputs
- RELAX: fixed dynamic resolution scale related issue for specular (regression)
- REBLUR: improved specular tracking
- REBLUR: removed "enableAdvancedPrepass"
- REBLUR: reduced potential chroma shifts
- REBLUR_SH: fixed bias (increased lightness)
- REBLUR_DIFFUSE_SPECULAR_SH: fixed wrong resource bindings if pre-pass is off
- NRD INTEGRATION: descriptor caching is now based on native resource pointers instead of NRI pointers

DETAILS:
- NRD: introduced NRD_NORMAL_ENCODING and NRD_ROUGHNESS_ENCODING
- NRD: improved clears on CLEAR_AND_RESTART
- NRD: removed shared NRD_NORMAL_ENCODING_ERROR
- NRD: curvature error compensation made normal encoding dependent
- NRD: fixed numerical instabilities in curvature estimation
- NRD: fixed how thin lens equation interacts with concave surfaces
- NRD: fixed wrong calculation of curvature direction
- RELAX: NRD_NORMAL_ENCODING_ERROR => RELAX_NORMAL_ENCODING_ERROR (no functional changes)
- RELAX: fixed resolution scale regression in virtual motion based reprojection for specular
- RELAX: moving to using "ApplyThinLensEquation"
- REBLUR: NORMAL_ULP increased from 0.0009 to 0.004 (1/255)
- REBLUR: consistent REBLUR_NORMAL_ULP usage
- REBLUR: removed / resolved some TODOs
- REBLUR: prev-prev test improvements
- REBLUR: changing luma doesn't allow energy boost
- REBLUR: removed "enableAdvancedPrepass" (low IQ gains, adds bias in SH mode)
- REBLUR_DIFFUSE_SPECULAR_SH: fixed wrong resource bindings if pre-pass is off
- NRD INTEGRATION: descriptor caching is now based on native resource pointers instead of NRI pointers
- NRD INTEGRATION: improved debug output
- NRD INTEGRATION: NRI updated to v1.86
- updated MathLib
  • Loading branch information
dzhdanNV committed Sep 21, 2022
1 parent 247382b commit 5405b46
Show file tree
Hide file tree
Showing 61 changed files with 636 additions and 961 deletions.
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ message("Processing 'NRD'...")

set(NRD_DXC_CUSTOM_PATH "custom/path/to/dxc" CACHE STRING "Custom DXC to use if Vulkan SDK is not installed")
set(NRD_SHADER_OUTPUT_PATH "" CACHE STRING "Shader output path override")
set(NRD_USE_OCT_NORMAL_ENCODING "0" CACHE STRING "NRD_USE_OCT_NORMAL_ENCODING")
set(NRD_USE_MATERIAL_ID "0" CACHE STRING "NRD_USE_MATERIAL_ID")
set(NRD_NORMAL_ENCODING "2" CACHE STRING "Normal encoding variant (0-4, matches nrd::NormalEncoding)")
set(NRD_ROUGHNESS_ENCODING "1" CACHE STRING "Roughness encoding variant (0-2, matches nrd::RoughnessEncoding)")

# Settings
option(NRD_DISABLE_SHADER_COMPILATION "Disable shader compilation" OFF)
Expand Down Expand Up @@ -50,7 +50,7 @@ if ("${NRD_SHADER_OUTPUT_PATH}" STREQUAL "")
set(NRD_SHADER_OUTPUT_PATH "${PROJECT_BINARY_DIR}/Shaders")
endif()
message(STATUS "NRD shaders output path: '${NRD_SHADER_OUTPUT_PATH}'")
message(STATUS "NRD.hlsli definitions: NRD_USE_OCT_NORMAL_ENCODING = ${NRD_USE_OCT_NORMAL_ENCODING}; NRD_USE_MATERIAL_ID = ${NRD_USE_MATERIAL_ID}")
message(STATUS "NRD.hlsli definitions: NRD_NORMAL_ENCODING = ${NRD_NORMAL_ENCODING}; NRD_ROUGHNESS_ENCODING = ${NRD_ROUGHNESS_ENCODING}")

if (NOT NRD_DISABLE_SHADER_COMPILATION)
# Non-NRD include paths
Expand Down Expand Up @@ -111,9 +111,8 @@ if (NRD_USE_PRECOMPILED_SHADERS)
target_include_directories(${PROJECT_NAME} PRIVATE "${NRD_SHADER_OUTPUT_PATH}")
endif()

if (NRD_USE_OCT_NORMAL_ENCODING)
target_compile_definitions(${PROJECT_NAME} PRIVATE NRD_USE_OCT_NORMAL_ENCODING)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE NRD_NORMAL_ENCODING=${NRD_NORMAL_ENCODING})
target_compile_definitions(${PROJECT_NAME} PRIVATE NRD_ROUGHNESS_ENCODING=${NRD_ROUGHNESS_ENCODING})

if(WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX _CRT_SECURE_NO_WARNINGS _UNICODE UNICODE)
Expand Down
2 changes: 1 addition & 1 deletion External/MathLib
4 changes: 2 additions & 2 deletions Include/NRD.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
#include <cstddef>

#define NRD_VERSION_MAJOR 3
#define NRD_VERSION_MINOR 6
#define NRD_VERSION_MINOR 7
#define NRD_VERSION_BUILD 0
#define NRD_VERSION_DATE "6 September 2022"
#define NRD_VERSION_DATE "19 September 2022"

#if defined(_MSC_VER)
#define NRD_CALL __fastcall
Expand Down
52 changes: 39 additions & 13 deletions Include/NRDDescs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
#pragma once

#define NRD_DESCS_VERSION_MAJOR 3
#define NRD_DESCS_VERSION_MINOR 6
#define NRD_DESCS_VERSION_MINOR 7

static_assert (NRD_VERSION_MAJOR == NRD_DESCS_VERSION_MAJOR && NRD_VERSION_MINOR == NRD_DESCS_VERSION_MINOR, "Please, update all NRD SDK files");

Expand All @@ -36,7 +36,7 @@ namespace nrd
// =============================================================================================================================

// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_RADIANCE_HITDIST,
// OPTIONAL INPUTS - IN_DIFF_DIRECTION_PDF, IN_DIFF_CONFIDENCE
// OPTIONAL INPUTS - IN_DIFF_CONFIDENCE
// OUTPUTS - OUT_DIFF_RADIANCE_HITDIST
REBLUR_DIFFUSE,

Expand Down Expand Up @@ -64,7 +64,7 @@ namespace nrd
REBLUR_SPECULAR_SH,

// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_RADIANCE_HITDIST, IN_SPEC_RADIANCE_HITDIST,
// OPTIONAL INPUTS - IN_DIFF_DIRECTION_PDF, IN_SPEC_DIRECTION_PDF, IN_DIFF_CONFIDENCE, IN_SPEC_CONFIDENCE
// OPTIONAL INPUTS - IN_DIFF_CONFIDENCE, IN_SPEC_CONFIDENCE
// OUTPUTS - OUT_DIFF_RADIANCE_HITDIST, OUT_SPEC_RADIANCE_HITDIST
REBLUR_DIFFUSE_SPECULAR,

Expand All @@ -78,7 +78,7 @@ namespace nrd
REBLUR_DIFFUSE_SPECULAR_SH,

// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_DIRECTION_HITDIST,
// OPTIONAL INPUTS - IN_DIFF_DIRECTION_PDF, IN_DIFF_CONFIDENCE
// OPTIONAL INPUTS - IN_DIFF_CONFIDENCE
// OUTPUTS - OUT_DIFF_DIRECTION_HITDIST
REBLUR_DIFFUSE_DIRECTIONAL_OCCLUSION,

Expand Down Expand Up @@ -175,12 +175,6 @@ namespace nrd
IN_SPEC_SH0,
IN_SPEC_SH1,

// (Optional) Ray direction and sample PDF (RGBA8+)
// These inputs are needed only for PrePassMode::ADVANCED
// REBLUR: use "NRD_FrontEnd_PackDirectionAndPdf" for encoding
IN_DIFF_DIRECTION_PDF,
IN_SPEC_DIRECTION_PDF,

// (Optional) User-provided history confidence in range 0-1, i.e. antilag (R8+)
// Used only if "CommonSettings::isHistoryConfidenceInputsAvailable = true"
IN_DIFF_CONFIDENCE,
Expand All @@ -202,7 +196,7 @@ namespace nrd
// OUTPUTS
//=============================================================================================================================

// IMPORTANT: These textures can potentially be used as history buffers!
// IMPORTANT: These textures can be potentially used as history buffers!

// Denoised radiance and hit distance
// REBLUR: use "REBLUR_BackEnd_UnpackRadianceAndNormHitDist" for decoding (RGBA16f+)
Expand Down Expand Up @@ -329,6 +323,38 @@ namespace nrd
MAX_NUM
};

// NRD_NORMAL_ENCODING variants
enum class NormalEncoding : uint8_t
{
// Worst IQ on curved (not bumpy) surfaces
RGBA8_UNORM,
RGBA8_SNORM,

// Moderate IQ on curved (not bumpy) surfaces, but offers optional materialID support
R10_G10_B10_A2_UNORM,

// Best IQ on curved (not bumpy) surfaces
RGBA16_UNORM,
RGBA16_SNORM, // can be used with FP formats

MAX_NUM
};

// NRD_ROUGHNESS_ENCODING variants
enum class RoughnessEncoding : uint8_t
{
// Alpha (m)
SQ_LINEAR,

// Linear roughness (best choice)
LINEAR,

// Sqrt(linear roughness)
SQRT_LINEAR,

MAX_NUM
};

struct MemoryAllocatorInterface
{
void* (*Allocate)(void* userArg, size_t size, size_t alignment);
Expand All @@ -353,8 +379,8 @@ namespace nrd
uint8_t versionMajor;
uint8_t versionMinor;
uint8_t versionBuild;
uint8_t maxSupportedMaterialBitNum; // if 0, compiled with NRD_USE_MATERIAL_ID = 0
bool isCompiledWithOctPackNormalEncoding : 1; // if 0, compield with NRD_USE_OCT_NORMAL_ENCODING = 0
NormalEncoding normalEncoding;
RoughnessEncoding roughnessEncoding;
};

struct MethodDesc
Expand Down
5 changes: 1 addition & 4 deletions Include/NRDSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
#pragma once

#define NRD_SETTINGS_VERSION_MAJOR 3
#define NRD_SETTINGS_VERSION_MINOR 6
#define NRD_SETTINGS_VERSION_MINOR 7

static_assert (NRD_VERSION_MAJOR == NRD_SETTINGS_VERSION_MAJOR && NRD_VERSION_MINOR == NRD_SETTINGS_VERSION_MINOR, "Please, update all NRD SDK files");

Expand Down Expand Up @@ -253,9 +253,6 @@ namespace nrd
// Adds bias in case of badly defined signals, but tries to fight with fireflies
bool enableAntiFirefly = false;

// A requiring IN_DIFF_DIRECTION_PDF / IN_SPEC_DIRECTION_PDF spatial reuse pass (can't be used with probabilistic sampling)
bool enableAdvancedPrepass = false;

// Turns off spatial filtering and virtual motion based specular tracking
bool enableReferenceAccumulation = false;

Expand Down
41 changes: 22 additions & 19 deletions Integration/NRDIntegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,43 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.

#pragma once

// IMPORTANT: these files must be included beforehand
// IMPORTANT: these files must be included beforehand:
// NRD.h
// NRIDescs.hpp
// Extensions/NRIHelper.h
// Extensions/NRIWrapperD3D11.h
// Extensions/NRIWrapperD3D12.h
// Extensions/NRIWrapperVK.h

#include <array>
#include <vector>
#include <map>

#define NRD_INTEGRATION 1
#define NRD_INTEGRATION_MAJOR 3
#define NRD_INTEGRATION_MINOR 2
#define NRD_INTEGRATION_DATE "6 September 2022"
#define NRD_INTEGRATION_MINOR 4
#define NRD_INTEGRATION_DATE "19 September 2022"

#define NRD_INTEGRATION_DEBUG_LOGGING 0

// Settings
#ifndef NRD_INTEGRATION_ASSERT
#include <assert.h>
#define NRD_INTEGRATION_ASSERT(expr, msg) (assert(expr && msg))
#endif

#define NRD_INTEGRATION_DEBUG_LOGGING 0
#define NRD_INTEGRATION_ABORT_ON_FAILURE(result) if ((result) != nri::Result::SUCCESS) NRD_INTEGRATION_ASSERT(false, "Abort on failure!")

// User inputs / outputs are not mipmapped, thus only 1 entry is needed.
// "TextureTransitionBarrierDesc::texture" is used to store the resource.
// "TextureTransitionBarrierDesc::next..." are used to represent current state of the subresource.
// "TextureTransitionBarrierDesc::next..." are used to represent the current state of the subresource.
struct NrdIntegrationTexture
{
nri::TextureTransitionBarrierDesc* subresourceStates;
nri::Format format;
};

// Ensure to fill all slots even unused ones because the order is predefined
constexpr uint32_t NRD_USER_POOL_SIZE = (uint32_t)nrd::ResourceType::MAX_NUM - 2;
typedef std::array<NrdIntegrationTexture, NRD_USER_POOL_SIZE> NrdUserPool;
typedef std::array<NrdIntegrationTexture, (size_t)nrd::ResourceType::MAX_NUM - 2> NrdUserPool;

// User pool must contain valid entries only for resources, which are required for requested denoising methods, but
// the entire pool must be zero-ed during initialization
inline void NrdIntegration_SetResource(NrdUserPool& pool, nrd::ResourceType slot, const NrdIntegrationTexture& texture)
{
NRD_INTEGRATION_ASSERT( texture.subresourceStates->texture != nullptr, "Invalid texture!" );
Expand All @@ -58,7 +59,7 @@ class NrdIntegration
{
public:
// The application must provide number of buffered frames, it's needed to guarantee that
// constants data and descriptor sets are not overwritten while being executed on the GPU.
// constant data and descriptor sets are not overwritten while being executed on the GPU.
// Usually it's 2-3 frames.
NrdIntegration(uint32_t bufferedFrameMaxNum, const char* persistentName = "") :
m_Name(persistentName)
Expand All @@ -68,25 +69,25 @@ class NrdIntegration
~NrdIntegration()
{ NRD_INTEGRATION_ASSERT( m_NRI == nullptr, "m_NRI must be NULL at this point!" ); }

// There is no "Resize" functionallity, because NRD full recreation costs nothing.
// There is no "Resize" functionality, because NRD full recreation costs nothing.
// The main cost comes from render targets resizing, which needs to be done in any case
// (call Destroy beforehand)
bool Initialize(nri::Device& nriDevice, const nri::CoreInterface& nriCore,
const nri::HelperInterface& nriHelper, const nrd::DenoiserCreationDesc& denoiserCreationDesc);
bool Initialize(const nrd::DenoiserCreationDesc& denoiserCreationDesc, nri::Device& nriDevice,
const nri::CoreInterface& nriCore, const nri::HelperInterface& nriHelper);

// Just calls "nrd::SetMethodSettings"
bool SetMethodSettings(nrd::Method method, const void* methodSettings);

// User pool must contain valid entries only for resources which required for the set of
// requested resources
// Better use "enableDescriptorCaching = true" if resources are not changing between frames
// (i.e. are not suballocated from a heap)
void Denoise
(
uint32_t consecutiveFrameIndex, nri::CommandBuffer& commandBuffer,
const nrd::CommonSettings& commonSettings, const NrdUserPool& userPool,
bool enableDescriptorCaching = true
bool enableDescriptorCaching
);

// This function assums that the device is in the IDLE state, i.e. there is no work in flight
// This function assumes that the device is in the IDLE state, i.e. there is no work in flight
void Destroy();

// Should not be called explicitly, unless you want to reload pipelines
Expand Down Expand Up @@ -137,3 +138,5 @@ class NrdIntegration
uint32_t m_BufferedFrameMaxNum = 0;
bool m_IsShadersReloadRequested = false;
};

#define NRD_INTEGRATION_ABORT_ON_FAILURE(result) if ((result) != nri::Result::SUCCESS) NRD_INTEGRATION_ASSERT(false, "Abort on failure!")
24 changes: 14 additions & 10 deletions Integration/NRDIntegration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.

#include "NRDIntegration.h"

static_assert(NRD_VERSION_MAJOR >= 3 && NRD_VERSION_MINOR >= 6, "Unsupported NRD version!");
static_assert(NRD_VERSION_MAJOR >= 3 && NRD_VERSION_MINOR >= 7, "Unsupported NRD version!");
static_assert(NRI_VERSION_MAJOR >= 1 && NRI_VERSION_MINOR >= 86, "Unsupported NRI version!");

#if _WIN32
#define NRD_INTEGRATION_ALLOCA _alloca
Expand Down Expand Up @@ -71,12 +72,12 @@ static inline nri::Format NRD_GetNriFormat(nrd::Format format)
return g_NRD_NrdToNriFormat[(uint32_t)format];
}

static inline uint64_t NRD_CreateDescriptorKey(const nri::Texture* texture, bool isStorage, uint8_t mipOffset, uint8_t mipNum)
static inline uint64_t NRD_CreateDescriptorKey(uint64_t texture, bool isStorage, uint8_t mipOffset, uint8_t mipNum)
{
uint64_t key = uint64_t(isStorage ? 1 : 0) << 48ull;
key |= uint64_t(mipOffset & 127) << 49ull;
key |= uint64_t(mipNum) << 56ull;
key |= uint64_t(texture);
uint64_t key = uint64_t(isStorage ? 1 : 0) << 49ull;
key |= uint64_t(mipOffset & 127) << 50ull;
key |= uint64_t(mipNum & 127) << 57ull;
key |= texture & ((1ull << 49ull) - 1);

return key;
}
Expand All @@ -86,7 +87,8 @@ template<typename T, typename A> constexpr T NRD_GetAlignedSize(const T& size, A
return T(((size + alignment - 1) / alignment) * alignment);
}

bool NrdIntegration::Initialize(nri::Device& nriDevice, const nri::CoreInterface& nriCore, const nri::HelperInterface& nriHelper, const nrd::DenoiserCreationDesc& denoiserCreationDesc)
bool NrdIntegration::Initialize(const nrd::DenoiserCreationDesc& denoiserCreationDesc, nri::Device& nriDevice,
const nri::CoreInterface& nriCore, const nri::HelperInterface& nriHelper)
{
const nri::DeviceDesc& deviceDesc = nriCore.GetDeviceDesc(nriDevice);
if (deviceDesc.nriVersionMajor != NRI_VERSION_MAJOR || deviceDesc.nriVersionMinor != NRI_VERSION_MINOR)
Expand Down Expand Up @@ -383,7 +385,7 @@ bool NrdIntegration::SetMethodSettings(nrd::Method method, const void* methodSet
void NrdIntegration::Denoise(uint32_t consecutiveFrameIndex, nri::CommandBuffer& commandBuffer, const nrd::CommonSettings& commonSettings, const NrdUserPool& userPool, bool enableDescriptorCaching)
{
#if( NRD_INTEGRATION_DEBUG_LOGGING == 1 )
printf("%s (Frame %u) ==============================================================================\n", m_Name, consecutiveFrameIndex);
printf("%s (frame %u) ==============================================================================\n\n", m_Name, consecutiveFrameIndex);
#endif

const nrd::DispatchDesc* dispatchDescs = nullptr;
Expand All @@ -409,6 +411,7 @@ void NrdIntegration::Denoise(uint32_t consecutiveFrameIndex, nri::CommandBuffer&

void NrdIntegration::Dispatch(nri::CommandBuffer& commandBuffer, nri::DescriptorPool& descriptorPool, const nrd::DispatchDesc& dispatchDesc, const NrdUserPool& userPool, bool enableDescriptorCaching)
{
const nri::DeviceDesc& deviceDesc = m_NRI->GetDeviceDesc(*m_Device);
const nrd::DenoiserDesc& denoiserDesc = nrd::GetDenoiserDesc(*m_Denoiser);
const nrd::PipelineDesc& pipelineDesc = denoiserDesc.pipelines[dispatchDesc.pipelineIndex];

Expand All @@ -432,6 +435,7 @@ void NrdIntegration::Dispatch(nri::CommandBuffer& commandBuffer, nri::Descriptor
for (uint32_t i = 0; i < pipelineDesc.descriptorRangeNum; i++)
{
const nrd::DescriptorRangeDesc& descriptorRangeDesc = pipelineDesc.descriptorRanges[i];
const bool isStorage = descriptorRangeDesc.descriptorType == nrd::DescriptorType::STORAGE_TEXTURE;

descriptorRangeUpdateDescs[i].descriptors = descriptors + n;
descriptorRangeUpdateDescs[i].descriptorNum = descriptorRangeDesc.descriptorNum;
Expand Down Expand Up @@ -464,8 +468,8 @@ void NrdIntegration::Dispatch(nri::CommandBuffer& commandBuffer, nri::Descriptor
transitions[transitionBarriers.textureNum++] = nri::TextureTransition(*state, nextAccess, nextLayout, nrdResource.mipOffset + mip, 1);
}

const bool isStorage = descriptorRangeDesc.descriptorType == nrd::DescriptorType::STORAGE_TEXTURE;
uint64_t key = NRD_CreateDescriptorKey(nrdTexture->subresourceStates->texture, isStorage, (uint8_t)nrdResource.mipOffset, (uint8_t)nrdResource.mipNum);
uint64_t resource = m_NRI->GetTextureNativeObject(*nrdTexture->subresourceStates->texture, 0);
uint64_t key = NRD_CreateDescriptorKey(resource, isStorage, (uint8_t)nrdResource.mipOffset, (uint8_t)nrdResource.mipNum);
const auto& entry = enableDescriptorCaching ? m_Descriptors.find(key) : m_Descriptors.end();

nri::Descriptor* descriptor = nullptr;
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NVIDIA Real-time Denoisers v3.6.0 (NRD)
# NVIDIA Real-time Denoisers v3.7.0 (NRD)

## SAMPLE APP

Expand Down Expand Up @@ -49,8 +49,8 @@ Supported signal types (modulated irradiance can be used instead of radiance):

- `NRD_DXC_CUSTOM_PATH = "custom/path/to/dxc"` - custom DXC to use if Vulkan SDK is not installed
- `NRD_SHADER_OUTPUT_PATH` - shader output path override
- `NRD_USE_OCT_NORMAL_ENCODING` - `NRD_USE_OCT_NORMAL_ENCODING` value for *NRD.hlsli*
- `NRD_USE_MATERIAL_ID` - `NRD_USE_MATERIAL_ID` value for *NRD.hlsli*
- `NRD_NORMAL_ENCODING` - `NRD_NORMAL_ENCODING` value for *NRD.hlsli*
- `NRD_ROUGHNESS_ENCODING` - `NRD_ROUGHNESS_ENCODING` value for *NRD.hlsli*
- `NRD_DISABLE_SHADER_COMPILATION` - disable shader compilation (shaders can be compiled on another platform)
- `NRD_USE_PRECOMPILED_SHADERS` - use precompiled shaders (will be embedded into the library)
- `NRD_STATIC_LIBRARY` - build static library
Expand Down Expand Up @@ -217,7 +217,7 @@ NrdUserPool userPool = {};
NrdIntegration_SetResource(userPool, ...);
};

// Better use "true" if NRI texture wrappers are non-volatile between frames
// Better use "true" if resources are not changing between frames (i.e. are not suballocated from a heap)
bool enableDescriptorCaching = true;

NRD.Denoise(frameIndex, *nriCommandBuffer, commonSettings, userPool, enableDescriptorCaching);
Expand Down Expand Up @@ -475,8 +475,6 @@ maxAccumulatedFrameNum > maxFastAccumulatedFrameNum > historyFixFrameNum
**[REBLUR]** Even if antilag is off, it's recommended to tune `AntilagIntensitySettings::sensitivityToDarkness`, because it is used for error estimation.
**[REBLUR]** `enableAdvancedPrepass` mode offers better quality but requires valid `IN_DIFF_DIRECTION_PDF` and / or `IN_SPEC_DIRECTION_PDF` inputs (see sample for more details). It can't be used in case of a probabilistic split at primary hit (advanced pre-pass assumes that every pixel has valid data, PDF reconstruction is not implemented for performance reasons).
**[RELAX]** *RELAX* works well with signals produced by *RTXDI* or very clean high RPP signals. The Sweet Home of *RELAX* is *RTXDI* sample. Please, consider getting familiar with this application.
**[SIGMA]** Using "blue" noise can help to avoid shadow shimmering, it works best if the pattern is static on the screen. Additionally, `blurRadiusScale` can be set to `2-4` to mitigate such problems in complicated cases.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Versioning rules:
*/

#define VERSION_MAJOR 3
#define VERSION_MINOR 6
#define VERSION_MINOR 7
#define VERSION_BUILD 0
#define VERSION_REVISION 0

Expand Down
Loading

0 comments on commit 5405b46

Please sign in to comment.