This guide has been designed to simplify migration to a newer version.
(based on v2.12)
NRD_USE_MATERIAL_ID_AWARE_FILTERING
renamed toNRD_USE_MATERIAL_ID
NRD_NORMAL_ENCODING
simplified toNRD_NORMAL_ENCODING_UNORM
andNRD_NORMAL_ENCODING_OCT
NRD_MATERIAL_ID_AWARE_FILTERING
renamed toNRD_USE_MATERIAL_ID
- changed parameters in
NRD_GetCorrectedHitDist
- REFERENCE:
- denoiser input & output changed to dedicated
IN_RADIANCE
andOUT_RADIANCE
- denoiser input & output changed to dedicated
- REBLUR:
- settings collapsed to
ReblurSettings
shared across all REBLUR denoisers LobeTrimmingParameters
renamed toSpecularLobeTrimmingParameters
normalWeightStrictness
replaced bylobeAngleFraction
(a different value with similar meaning)materialMask
replaced withenableMaterialTestForDiffuse
andenableMaterialTestForSpecular
- exposed
minConvergedStateBaseRadiusScale
- exposed
roughnessFraction
- exposed
responsiveAccumulationRoughnessThreshold
- exposed
inputMix
- exposed
enablePerformanceMode
- settings collapsed to
- RELAX:
rejectDiffuseHistoryNormalThreshold
renamed todiffuseHistoryRejectionNormalThreshold
enableSkipReprojectionTestWithoutMotion
renamed toenableReprojectionTestSkippingWithoutMotion
phiNormal
replaced bydiffuseLobeAngleFraction
(a different value with similar meaning)- exposed
roughnessFraction
- exposed
enableMaterialTest
NRD requires explicit definitions of NRD_USE_OCT_NORMAL_ENCODING
and NRD_USE_MATERIAL_ID
to avoid a potential confusion when NRD was compiled using one set of values, but an application uses other values. The CMake file has been modified to simplify NRD integration into projects, where it is used as a Git submodule. Now these macro definitions are exposed as Cmake options.
- removed
PrePassMode
- added
maxSupportedMaterialBitNum
andisCompiledWithOctPackNormalEncoding
toLibraryDesc
- added optional
worldPrevToWorldMatrix
toCommonSettings
- REBLUR:
- exposed
diffusePrepassBlurRadius
andspecularPrepassBlurRadius
- exposed
enableAdvancedPrepass
matching previously usedPrePassMode::ADVANCED
- exposed
enableHitDistanceReconstruction
- exposed
- RELAX:
- removed
diffuseHistoryRejectionNormalThreshold
- removed
minLuminanceWeight
and added separateddiffuseMinLuminanceWeight
andspecularMinLuminanceWeight
- exposed
enableSpecularHitDistanceReconstruction
- removed
- exposed
HitDistanceReconstructionMode
- REBLUR:
enableHitDistanceReconstruction
replaced withhitDistanceReconstructionMode
- removed
residualNoiseLevel
- RELAX:
enableSpecularHitDistanceReconstruction
replaced withhitDistanceReconstructionMode
- exposed
REBLUR_DIFFUSE_SH
,REBLUR_SPECULAR_SH
andREBLUR_DIFFUSE_SPECULAR_SH
denoisers - NRD.hlsli:
REBLUR_FrontEnd_PackRadianceAndHitDist
renamed toREBLUR_FrontEnd_PackRadianceAndNormHitDist
REBLUR_FrontEnd_PackDirectionAndHitDist
renamed toREBLUR_FrontEnd_PackDirectionAndNormHitDist
REBLUR_BackEnd_UnpackRadianceAndHitDist
renamed toREBLUR_BackEnd_UnpackRadianceAndNormHitDist
REBLUR_BackEnd_UnpackDirectionAndHitDist
renamed toREBLUR_BackEnd_UnpackDirectionAndNormHitDist
RELAX_BackEnd_UnpackRadianceAndHitDist
renamed toRELAX_BackEnd_UnpackRadiance
- removed
NRD_GetCorrectedHitDist
- API:
- exposed miscellaneous function
GetMethodString
- exposed miscellaneous function
- REBLUR:
- removed
inputMix
- removed
- RELAX:
- exposed
confidenceDrivenRelaxationMultiplier
- exposed
confidenceDrivenLuminanceEdgeStoppingRelaxation
- exposed
confidenceDrivenNormalEdgeStoppingRelaxation
- exposed
- NRD.hlsli:
REBLUR_FrontEnd_PackDirectionAndNormHitDist
renamed toREBLUR_FrontEnd_PackDirectionalOcclusion
- REBLUR:
- exposed
historyFixFrameNum
- exposed
historyFixStrideBetweenSamples
- removed
historyFixStrength
- exposed
- RELAX:
disocclusionFixEdgeStoppingNormalPower
renamed tohistoryFixEdgeStoppingNormalPower
disocclusionFixMaxRadius
renamed tohistoryFixStrideBetweenSamples
disocclusionFixNumFramesToFix
renamed tohistoryFixFrameNum
- REBLUR:
- Removed
SpecularLobeTrimmingParameters
- Removed
- NRD.hlsli:
- Removed
NRD_GetTrimmingFactor
- Removed
NRD_USE_OCT_NORMAL_ENCODING
and NRD_USE_MATERIAL_ID
replaced with more explicit NRD_NORMAL_ENCODING
and NRD_ROUGHNESS_ENCODING
to offer more encoding variants out of the box.
- API:
- removed
maxSupportedMaterialBitNum
andisCompiledWithOctPackNormalEncoding
fromLibraryDesc
- added
normalEncoding
androughnessEncoding
toLibraryDesc
- removed
- REBLUR:
- Removed
enableAdvancedPrepass
- Removed
Introduced optional NRDEncoding.hlsli
file which can be included prior NRD.hlsli
to properly setup NRD encoding for usage outside of NRD project, if encoding variants are not set via Cmake parameters. Also introduced optional IN_DISOCCLUSION_THRESHOLD_MIX
which allows to smoothly mix CommonSettings::disocclusionThreshold
(0) into CommonSettings::disocclusionThresholdAlternate
(1).
- API:
- Exposed
IN_DISOCCLUSION_THRESHOLD_MIX
,CommonSettings::disocclusionThresholdAlternate
&CommonSettings::isDisocclusionThresholdMixAvailable
- Exposed
- REBLUR:
- Removed
minConvergedStateBaseRadiusScale
- Removed
maxAdaptiveRadiusScale
- Removed
Introduced optional OUT_VALIDATION
output, which contains debug visualization layer if CommonSettings::enableValidation = true
.
- API:
- Removed
DenoiserCreationDesc::enableValidation
- Exposed
CommonSettings::enableValidation
- Extened
CommonSettings::motionVectorScale
to 3 floats
- Removed
Since NRD tracks specular motion, now, if requested, it can modify provided diffuse-like motion in IN_MV
with internally computed specular-like motion if specularity is high. For this purpose an optional IN_BASECOLOR_METALNESS
input has been added. This feature improves behavior of spatio-temporal upscalers, like TAA or DLSS.
- API:
- Introduced
CommonSettings::isBaseColorMetalnessAvailable
- Reworked
DenoiserDesc
to clearly indicate that there are 3 types of resources each of which "sits" in a predefinedspace
(set
in VK):- constant buffer - binding is shared across all pipelines
- samplers - bindings are shared across all pipelines
- resources - bindings vary per pipeline
- Name changes:
isHistoryConfidenceInputsAvailable
=>isHistoryConfidenceAvailable
Resource
=>ResourceDesc
DescriptorRangeDesc
=>ResourceRangeDesc
ComputeShader
=>ComputeShaderDesc
DescriptorSetDesc
=>DescriptorPoolDesc
- all
fooNum
=>foosNum
GetComputeDispatches
return type changed tovoid
- Introduced
- REBLUR:
- Exposed
specularProbabilityThresholdsForMvModification
to control diffuse / specular motion mixing
- Exposed
- RELAX:
- Removed
enableSpecularVirtualHistoryClamping
- Removed
SH (spherical harmonics) have been replaced with SG (spherical gaussians). It unlocks physically-based high quality diffuse & specular resolve. The following functions have been added to NRD.hlsli
(or renamed):
NRD_SG_ExtractColor
- extracts unresolved denoised radianceNRD_SG_ExtractDirection
- extracts light dominant directionNRD_SG_ExtractRoughnessAA
- extracts modified roughness (increased in areas with high normal variance)NRD_SG_ResolveDiffuse
- reconstructs diffuse macro detailsNRD_SG_ResolveSpecular
- reconstructs specular macro detailsNRD_SG_ReJitter
- reconstructs diffuse & specular micro details (resurrects jitter vanished out after denoising)NRD_SH_ResolveDiffuse
- reconstructs diffuse macro details using SH resolve (for comparison only)NRD_SH_ResolveSpecular
- reconstructs specular macro details using SH resolve (for comparison only)
A single NRD instance can now include any combination of denoisers, including repeating ones (for example, RELAX_DIFFUSE
, RELAX_DIFFUSE
and SIGMA_SHADOW
). Transient memory pool is internally optimized to reduce memory consumption.
- API:
- Introduced
Identifier
to distinguish one denoiser in the instance from another one - Introduced
SetCommonSettings
GetComputeDispatches
now expects a list of identifiers, specifying which denoisers collect dispatches for- Added explicit
CommonSettings::cameraJitterPrev
andCommonSettings::resolutionScalePrev
(sinceSetCommonSettings
can be called several times per frame) - Name changes (including sub-name usages):
Denoiser
=>Instance
Method
=>Denoiser
fullResolutionWidth
=>renderWidth
fullResolutionHeight
=>renderHeight
- Introduced
- NRD INTEGRATION:
- Introduced
NewFrame
- Introduced
SetCommonSettings
- Introduced
- RELAX:
- Introduced
AntilagSettings
- Introduced
- REBLUR:
- Removed
enableReferenceAccumulation
- Introduced
usePrepassOnlyForSpecularMotionEstimation
AntilagIntensitySettings
andAntilagHitDistanceSettings
replaced with simplerReblurAntilagSettings
- Removed
- API:
inputSubrectOrigin
=>rectOrigin
and clarified usage- improved dynamic resolution scaling support: now not only viewport can be adjusted on the fly, but resources can be suballocated from a heap on the fly too
- removed
DenoiserDesc::renderWidth
andDenoiserDesc::renderHeight
- removed
CommonSettings::resolutionScale
andCommonSettings::resolutionScalePrev
- exposed
CommonSettings::resourceSize
andCommonSettings::resourceSizePrev
- exposed
CommonSettings::rectSize
andCommonSettings::rectSizePrev
- NRD INTEGRATION: currently statically allocates resources at NRD instance creation time
- removed
- all denoisers use resources without mips:
- removed
TextureDesc::mipNum
- removed
ResourceDesc::mipNum
andResourceDesc::mipOffset
- removed
- simplified number of samplers
- removed
Sampler::NEAREST_MIRRORED_REPEAT
andSampler::LINEAR_MIRRORED_REPEAT
- removed
- NRD.hlsli:
- added
NRD_FrontEnd_SpecHitDistAveraging_X
functions, needed to properly average specular hit distance for correct specular tracking in case of many RPP NRD_INPUT/OUTPUT_TEXTURE_START
renamed toNRD_INPUTS/OUTPUTS_START
NRD_INPUT/OUTPUT_TEXTURE
renamed toNRD_INPUT/OUTPUT
NRD_INPUT/OUTPUT_TEXTURE_END
renamed toNRD_INPUTS/OUTPUTS_END
NRD_SAMPLER_START/END
renamed toNRD_SAMPLERS_START/END
- added
- REBLUR:
- removed
historyFixStrideBetweenSamples
- removed
- RELAX:
- removed
historyFixStrideBetweenSamples
- removed
enableReprojectionTestSkippingWithoutMotion
- removed
- REFERENCE:
IN_RADIANCE
renamed toIN_SIGNAL
OUT_RADIANCE
renamed toOUT_SIGNAL
- API:
ResourceDesc::stateNeeded
renamed toResourceDesc::descriptorType
to matchResourceRangeDesc::descriptorType
because the former is a concatenation of the latter
- REBLUR:
blurRadius
renamed tomaxBlurRadius
- exposed
minBlurRadius
with the default value matching older versions
- SIGMA:
- removed
blurRadiusScale
- exposed
lightDirection
, which is needed only for directional light sources - exposed `stabilizationStrength'
- clarified usage:
float shadow = SIGMA_BackEnd_UnpackShadow( OUT_SHADOW_TRANSLUCENCY );
float3 translucentShadow = SIGMA_BackEnd_UnpackShadow( OUT_SHADOW_TRANSLUCENCY ).yzw;
- removed
- API:
- exposed
CommonSettings::viewZScale
improving FP16viewZ
support
- exposed
- SIGMA:
- explicitly uses
IN_VIEWZ
instead of storingviewZ
inIN_SHADOWDATA
IN_SHADOWDATA
renamed toIN_PENUMBRA
(describes penumbra properties)IN_SHADOW_TRANSLUCENCY
renamed toIN_TRANSLUCENCY
(describes optional translucency)SIGMA_FrontEnd_PackShadow
has been explicitly separated into 2 functions:IN_SHADOWDATA
:SIGMA_FrontEnd_PackPenumbra
(2 variants: for infinite and local light sources)IN_SHADOW_TRANSLUCENCY
:SIGMA_FrontEnd_PackTranslucency
- explicitly uses
- Deprecated and removed with all dependencies:
SPECULAR_REFLECTION_MV
SPECULAR_DELTA_MV
- API:
- exposed
ReblurSettings::hitDistanceStabilizationStrength
allowing to control the responsiviness of ambient and specular occlusion in the temporal stabilization pass and reach parity withREBLUR_OCCLUSION
if set to0
MemoryAllocatorInterface
renamed toAllocationCallbacks
- exposed
CommonSettings::strandMaterialID
, enabling "under-the-hood" tweaks for hair (and grass) denoising - exposed
CommonSettings::strandThickness
, defining how NRD adapts to sub-pixel thick details. It works in conjunction withCommonSettings::disocclusionThresholdAlternate
forCommonSettings::strandMaterialID
without a need to provideIN_DISOCCLUSION_THRESHOLD_MIX
texture
- exposed
- REBLUR:
- changed usage of
maxBlurRadius
and its default value, old values should be scaled by2
- changed usage of
- NRD INTEGRATION:
Nrd
prefix replaced withnrd::
namespace- removed
format
fromNrdIntegrationTexture
, which is now justnri::TextureBarrierDesc
- removed the constructor with arguments
- creation parameters grouped into
IntegrationCreationDesc
, which need to be passed toInitialize
- added a few potentially useful flags to
IntegrationCreationDesc
- API:
- exposed
DEFAULT_ACCUMULATION_TIME
for all denoisers - added some missing
MAX_HISTORY_FRAME_NUM
constants - exposed
GetMaxAccumulatedFrameNum
helper, converting time to frames
- exposed
- REBLUR:
stabilizationStrength
replaced withmaxStabilizedFrameNum
hitDistanceStabilizationStrength
replaced withmaxStabilizedFrameNumForHitDistance
luminanceAntilagPower
replaced withluminanceSensitivity
hitDistanceAntilagPower
replaced withhitDistanceSensitivity
- tweaked the default values for
ReblurAntilagSettings
- the new default value for
planeDistanceSensitivity = 0.02
matches the behavior for the old value0.005
- slightly reduced
lobeAngleFraction
to squeeze more normal details (it's safe to use the old value0.2
)
- SIGMA:
stabilizationStrength
replaced withmaxStabilizedFrameNum
- the new default value for
planeDistanceSensitivity = 0.02
matches the behavior for the old value0.005