Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit95280a384c

README.md

dn_persist

The body both denoise_persist variants run. An accumulation stored as rgba8 and one stored as rgba16f differ only in the format written, so the pass itself is written once here and included by each variant.

What it does

Copies the frame dn_temporal resolved, and the guide that goes with it, into the pair the accumulation is carried across frames in.

The passes a render feature enqueues run once per render target drawn — the viewport, an offscreen capture, a camera rendering into a texture — and each of those is a different view of the scene. One accumulation stands for one of them, so this pass compares the camera being drawn against the camera the accumulation belongs to and writes only when they are the same: three points spread across the frame are put into the world by the drawn camera's inverse view-projection and back onto the frame by the owner's view-projection, and they have to land where they started. Every other render target resolves against the accumulation and leaves it as it stands.

Bindings the including variant declares

namekindwhat it is
dn_srctexture2dthe frame dn_temporal resolved
dn_guide_srctexture2dthe guide that frame wrote — (world position, age)
frame_cambuffer (read, vec4)the drawn camera — [0..4) is its inverse view-projection
dn_persist_settingsbuffer (read, vec4)[0..4) — the owner camera's view-projection, column-major
dn_hist_outstorage2dthe accumulation carried to the next frame
dn_guide_outstorage2d (rgba16f)the guide carried with it