Monograph · 09 · Denoising
Pipelines · full depth
Denoising
Denoise is a staged backend after the integrator. This chapter maps offline vs realtime pipelines, resource traits, packing contracts, and compose — enough to debug magenta without guesswork.
Where denoise sits
Packing errors show up as “denoise bugs” but are often raygen contract bugs.
Mode selection & traits
| Mode | Typical use | Trait needs |
|---|---|---|
| OIDN | Offline stills | CPU readback; albedo+normal guides |
| NRD | Realtime PT | motion, diff/spec split, Halton jitter |
| DLSS-RR | Realtime + NGX | motion, extended guides, hit-dist (binding 35) |
| Atrous | Internal spatial | optional motion |
| None | Debug noise | — |
RTProfileTraits: offline allows external denoise (OIDN default); realtime enables internal denoise flags / firefly clamp. CLI --denoise= overrides. Changing mode may require image/pipeline features already allocated at PT init.
OIDN full path
- Accumulate N spp into HDR beauty (binding 1) + albedo/normal AOVs
- Readback to CPU (or GPU OIDN path depending on build)
- OIDN filter with guides
- Write denoised beauty; tonemap / PNG
Best quality/stability for stills and turntables. Too heavy as a default interactive path — that is NRD/DLSS territory.
NRD full path
- Raygen writes demod diffuse/specular radiance + hit-dist (packed), normal-rough, motion, ViewZ, demod albedo/F0
- Optional
PT_FLAG_ACCUMULATE_AOVSrunning mean for multi-spp - NRD REBLUR (or related) compute dispatches consume packed inputs
- Write denoised diff/spec (bindings 27–28 on set 0)
nrd_compose: unpack YCoCg → linear, recombine, env miss fill as configured- Cinematic / tonemap modules → presentable beauty
Packing math (the contract)
nrdPackRadianceHitDist → vec4(YCoCg, normHitDist). Normals via rotated-oct + roughness carrying \(n_z\) sign. Compose must call unpack. Magenta helmet: linear RGB written where YCoCg expected.
DLSS-RR path
- Device must have advertised NVX/push-descriptor exts at createLogicalDevice
- PT flag DLSSRR may repack normalAOV as (N, roughness)
- Binding 35: specular hit-distance guide
- NGX eval; on failure fall back to raw / other denoise
Debug checklist
1) Inspect pre-denoise AOVs (neutral?). 2) Confirm mode traits (motion present?). 3) Confirm pack/unpack pair. 4) Confirm resolution matches. 5) Only then upgrade NRD/OIDN versions.
oidn_denoise.*OIDNnrd_denoise.* / nrd_compose.* / nrd_cinematic.*Realtime chainnrd_frontend.glslPack/unpackdlss_rr.*NGXrt_meta.hpp / denoise_types.*Traits · modesDesign units in this module
Each card is a focused design page (what / how / why + sources). Full tree: Sitemap.
Denoise modes & traits
DenoiseMode enum + DenoiseModeTraits resource needs.
OIDN
Offline guided denoise path.
NRD REBLUR + compose
Pack YCoCg, dispatch, unpack compose, cinematic post.
DLSS Ray Reconstruction
NGX dlssd init, guides, binding 35 hit-dist.
À-trous / SVGF-style
Internal spatial/temporal denoise compute.
Cinematic RT post
Bloom extract/blur, DoF, composite after NRD.