﻿# OptiX temporal denoising: bind motion flow and previous output to the same sequence

Maintain valid history for OptiX temporal denoising by preserving motion-vector conventions, previous denoised outputs and explicit resets at sequence boundaries.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-optix-temporal-denoiser-flow-history-sequence/
Language: en

## Treat history as model input

Temporal denoising uses information beyond the current noisy frame. Research on [recurrent reconstruction of Monte Carlo image sequences](https://research.nvidia.com/publication/2017-07_interactive-reconstruction-monte-carlo-image-sequences-using-recurrent) illustrates why sequence information can improve temporal stability; it does not define every current SDK implementation. In integration work, the relevant contract is the actual denoiser API. Track which scene, camera and preceding output each history buffer belongs to, rather than treating any allocated image as reusable temporal state.

## Preserve the motion convention

The [OptiX type declarations](https://github.com/NVIDIA/optix-dev/blob/main/include/optix_types.h) describe screen-space motion from the previous frame to the current frame, represented in pixel coordinates. A flow field produced under another direction or unit convention needs an explicit conversion. Matching width and height alone does not validate it. Test a controlled camera or object translation so the field's sign, component order and scale can be checked against a known image movement.

## Supply the correct preceding result

The [host API documentation](https://github.com/NVIDIA/optix-dev/blob/main/include/optix_host.h) describes temporal model inputs, including the previous denoised output and required flow. A previous noisy input is not generally interchangeable with that history during an established sequence. Preserve the relationship between frame identity and output storage while pipelining jobs. A reused buffer must not be overwritten by another worker before the denoiser has consumed the history associated with the current frame.

## Reset where continuity no longer holds

The type contract includes a control indicating whether previous layers contain valid temporal data. Follow the selected model's initialization rules for a first frame and reset history when the sequence changes discontinuously. Do not carry one camera's previous output into another simply because they share image dimensions. Keep any internal temporal guide layers consistent with their corresponding output history, particularly when running multiple independent sequences through a shared worker service.

## Inspect a sequence rather than isolated frames

Check motion, disocclusion and an explicit sequence restart, comparing temporal output with the expected history state at each step. A smooth individual image can conceal ghosting across a sequence. The guides to [denoiser feature buffers](/journal/learn-denoiser-feature-buffers/) and [image coordinate integrity](/journal/data-guide-image-exif-box-coordinate/) provide related checks. Preserve raw noisy inputs alongside processing metadata when using denoised renders in a dataset, since temporal reconstruction is a model-dependent transformation rather than an untouched physical measurement.
