@@ -11,7 +11,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
11
11
#pragma once
12
12
13
13
#define NRD_DESCS_VERSION_MAJOR 3
14
- #define NRD_DESCS_VERSION_MINOR 3
14
+ #define NRD_DESCS_VERSION_MINOR 4
15
15
16
16
static_assert (NRD_VERSION_MAJOR == NRD_DESCS_VERSION_MAJOR && NRD_VERSION_MINOR == NRD_DESCS_VERSION_MINOR, " Please, update all NRD SDK files" );
17
17
@@ -44,6 +44,11 @@ namespace nrd
44
44
// OUTPUTS - OUT_DIFF_HITDIST
45
45
REBLUR_DIFFUSE_OCCLUSION,
46
46
47
+ // INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_SH0, IN_DIFF_SH1
48
+ // OPTIONAL INPUTS - IN_DIFF_CONFIDENCE
49
+ // OUTPUTS - OUT_DIFF_SH0, OUT_DIFF_SH1
50
+ REBLUR_DIFFUSE_SH,
51
+
47
52
// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_SPEC_RADIANCE_HITDIST,
48
53
// OPTIONAL INPUTS - IN_SPEC_DIRECTION_PDF, IN_SPEC_CONFIDENCE
49
54
// OUTPUTS - OUT_SPEC_RADIANCE_HITDIST
@@ -53,6 +58,11 @@ namespace nrd
53
58
// OUTPUTS - OUT_SPEC_HITDIST
54
59
REBLUR_SPECULAR_OCCLUSION,
55
60
61
+ // INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_SPEC_SH0, IN_SPEC_SH1
62
+ // OPTIONAL INPUTS - IN_SPEC_CONFIDENCE
63
+ // OUTPUTS - OUT_SPEC_SH0, OUT_SPEC_SH1
64
+ REBLUR_SPECULAR_SH,
65
+
56
66
// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_RADIANCE_HITDIST, IN_SPEC_RADIANCE_HITDIST,
57
67
// OPTIONAL INPUTS - IN_DIFF_DIRECTION_PDF, IN_SPEC_DIRECTION_PDF, IN_DIFF_CONFIDENCE, IN_SPEC_CONFIDENCE
58
68
// OUTPUTS - OUT_DIFF_RADIANCE_HITDIST, OUT_SPEC_RADIANCE_HITDIST
@@ -62,6 +72,11 @@ namespace nrd
62
72
// OUTPUTS - OUT_DIFF_HITDIST, OUT_SPEC_HITDIST
63
73
REBLUR_DIFFUSE_SPECULAR_OCCLUSION,
64
74
75
+ // INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_SH0, IN_DIFF_SH1, IN_SPEC_SH0, IN_SPEC_SH1
76
+ // OPTIONAL INPUTS - IN_DIFF_CONFIDENCE, IN_SPEC_CONFIDENCE
77
+ // OUTPUTS - OUT_DIFF_SH0, OUT_DIFF_SH1, OUT_SPEC_SH0, OUT_SPEC_SH1
78
+ REBLUR_DIFFUSE_SPECULAR_SH,
79
+
65
80
// INPUTS - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ, IN_DIFF_DIRECTION_HITDIST,
66
81
// OPTIONAL INPUTS - IN_DIFF_DIRECTION_PDF, IN_DIFF_CONFIDENCE
67
82
// OUTPUTS - OUT_DIFF_DIRECTION_HITDIST
@@ -122,53 +137,64 @@ namespace nrd
122
137
enum class ResourceType : uint32_t
123
138
{
124
139
// =============================================================================================================================
125
- // INPUTS
140
+ // COMMON INPUTS
126
141
// =============================================================================================================================
127
142
128
143
// 3D world space motion (RGBA16f+) or 2D screen space motion (RG16f+), MVs must be non-jittered, MV = previous - current
129
144
IN_MV,
130
145
131
- // Data must match encoding / decoding in "NRD_FrontEnd_PackNormalAndRoughness" / "NRD_FrontEnd_UnpackNormalAndRoughness" (RGBA8+ or R10G10B10A2 +)
146
+ // Data must match encoding in "NRD_FrontEnd_PackNormalAndRoughness" and "NRD_FrontEnd_UnpackNormalAndRoughness" (RGBA8+)
132
147
IN_NORMAL_ROUGHNESS,
133
148
134
149
// Linear view depth for primary rays (R16f+)
135
150
IN_VIEWZ,
136
151
137
- // RELAX: Data must be packed using "RELAX_FrontEnd_PackRadianceAndHitDist"
138
- // REBLUR: Data must be packed using "REBLUR_FrontEnd_PackRadianceAndHitDist" (and "REBLUR_FrontEnd_GetNormHitDist" for hit distance) (RGBA16f+)
139
- // Noisy and weighted sum of hit distances along a path (using NRD_GetCorrectedHitDist), excluding primary hit distance.
140
- // REBLUR works with normalized hit distances. It's recommended to use REBLUR_FrontEnd_GetNormHitDist for hit distance normalization.
141
- // Normalization parameters should be passed into NRD as HitDistanceParameters for diffuse and specular separately for internal
142
- // hit distance denormalization.
152
+ // =============================================================================================================================
153
+ // INPUTS
154
+ // =============================================================================================================================
155
+
156
+ // Noisy radiance and hit distance (RGBA16f+)
157
+ // REBLUR: use "REBLUR_FrontEnd_PackRadianceAndNormHitDist" for encoding
158
+ // RELAX: use "RELAX_FrontEnd_PackRadianceAndHitDist" for encoding
143
159
IN_DIFF_RADIANCE_HITDIST,
144
160
IN_SPEC_RADIANCE_HITDIST,
145
161
146
- // REBLUR: Data must be packed using "REBLUR_FrontEnd_GetNormHitDist" (R8+)
162
+ // Noisy hit distance (R8+)
163
+ // REBLUR: use "REBLUR_FrontEnd_GetNormHitDist" for encoding
147
164
IN_DIFF_HITDIST,
148
165
IN_SPEC_HITDIST,
149
166
150
- // REBLUR: Data must be packed using "REBLUR_FrontEnd_PackDirectionAndHitDist" (RGBA8+)
167
+ // Noisy bent normal and normalized hit distance (RGBA8+)
168
+ // REBLUR: use "REBLUR_FrontEnd_PackDirectionAndNormHitDist" for encoding
151
169
IN_DIFF_DIRECTION_HITDIST,
152
170
153
- // (Optional) Data must be packed using "NRD_FrontEnd_PackDirectionAndPdf" (RGBA8+)
154
- // These inputs are needed only if PrePassMode::ADVANCED is used. The data can be averaged or weighted in case of many RPP. Encoding / decoding
155
- // can be changed in "NRD_FrontEnd_PackDirectionAndPdf" and "NRD_FrontEnd_UnpackDirectionAndPdf" functions.
171
+ // Noisy SH data (2x RGBA16f+)
172
+ // REBLUR: use "REBLUR_FrontEnd_PackSh" for encoding
173
+ IN_DIFF_SH0,
174
+ IN_DIFF_SH1,
175
+ IN_SPEC_SH0,
176
+ IN_SPEC_SH1,
177
+
178
+ // (Optional) Ray direction and sample PDF (RGBA8+)
179
+ // These inputs are needed only for PrePassMode::ADVANCED
180
+ // REBLUR: use "NRD_FrontEnd_PackDirectionAndPdf" for encoding
156
181
IN_DIFF_DIRECTION_PDF,
157
182
IN_SPEC_DIRECTION_PDF,
158
183
159
184
// (Optional) User-provided history confidence in range 0-1, i.e. antilag (R8+)
160
- // Used only if "CommonSettings::isHistoryConfidenceInputsAvailable = true".
185
+ // Used only if "CommonSettings::isHistoryConfidenceInputsAvailable = true"
161
186
IN_DIFF_CONFIDENCE,
162
187
IN_SPEC_CONFIDENCE,
163
188
164
- // SIGMA: Data must be packed using "SIGMA_FrontEnd_PackShadow" (3/5-args) (RG16+/RGBA8+)
189
+ // Noisy shadow data and optional translucency (RG16f+ and RGBA8+ for optional translucency)
190
+ // SIGMA: use "SIGMA_FrontEnd_PackShadow" for encoding
165
191
IN_SHADOWDATA,
166
192
IN_SHADOW_TRANSLUCENCY,
167
193
168
- // Any signal
194
+ // Noisy signal (R8+)
169
195
IN_RADIANCE,
170
196
171
- // Primary and secondary world space positions
197
+ // Primary and secondary world space positions (RGBA16f+)
172
198
IN_DELTA_PRIMARY_POS,
173
199
IN_DELTA_SECONDARY_POS,
174
200
@@ -178,37 +204,38 @@ namespace nrd
178
204
179
205
// IMPORTANT: These textures can potentially be used as history buffers!
180
206
181
- // REBLUR: Data must be unpacked using "REBLUR_BackEnd_UnpackRadianceAndHitDist"
182
- // .xyz - radiance, .w - normalized hit distance (RGBA16f+)
183
- // RELAX: Data must be unpacked using "RELAX_BackEnd_UnpackRadianceAndHitDist"
184
- // .xyz - radiance (R11G11B10f+)
207
+ // Denoised radiance and hit distance
208
+ // REBLUR: use "REBLUR_BackEnd_UnpackRadianceAndNormHitDist" for decoding (RGBA16f+)
209
+ // RELAX: use "RELAX_BackEnd_UnpackRadiance" for decoding (R11G11B10f+)
185
210
OUT_DIFF_RADIANCE_HITDIST,
186
211
OUT_SPEC_RADIANCE_HITDIST,
187
212
188
- // .x - normalized hit distance (R8+)
213
+ // Denoised SH data
214
+ // REBLUR: use "REBLUR_BackEnd_UnpackSh" for decoding (2x RGBA16f+)
215
+ OUT_DIFF_SH0,
216
+ OUT_DIFF_SH1,
217
+ OUT_SPEC_SH0,
218
+ OUT_SPEC_SH1,
219
+
220
+ // Denoised normalized hit distance (R8+)
189
221
OUT_DIFF_HITDIST,
190
222
OUT_SPEC_HITDIST,
191
223
192
- // .xyz - direction, .w - normalized hit distance (RGBA8+)
224
+ // Denoised bent normal and normalized hit distance (RGBA8+)
225
+ // REBLUR: use "REBLUR_BackEnd_UnpackDirectionAndNormHitDist" for decoding
193
226
OUT_DIFF_DIRECTION_HITDIST,
194
227
195
- // SIGMA: Data must be unpacked using "SIGMA_BackEnd_UnpackShadow"
196
- // .x - shadow, .yzw - translucency (RGBA8+)
197
- // .x - shadow (R8+)
198
- // Usage:
199
- // shadowData = SIGMA_BackEnd_UnpackShadow( shadowData );
200
- // float3 finalShadowCommon = lerp( shadowData.yzw, 1.0, shadowData.x ); // or
201
- // float3 finalShadowExotic = shadowData.yzw * shadowData.x; // or
202
- // float3 finalShadowMoreExotic = shadowData.yzw;
228
+ // Denoised shadow and optional transcluceny (R8+ or RGBA8+)
229
+ // SIGMA: use "SIGMA_BackEnd_UnpackShadow" for decoding
203
230
OUT_SHADOW_TRANSLUCENCY,
204
231
205
- // .xyz - accumulated signal
232
+ // Denoised signal
206
233
OUT_RADIANCE,
207
234
208
- // .xy - 2D screen space virtual motion (RG16f+), MV = previous - current
235
+ // 2D screen space specular motion (RG16f+), MV = previous - current
209
236
OUT_REFLECTION_MV,
210
237
211
- // .xy - 2D screen space motion (RG16f+), MV = previous - current
238
+ // 2D screen space refraction motion (RG16f+), MV = previous - current
212
239
OUT_DELTA_MV,
213
240
214
241
// =============================================================================================================================
0 commit comments