Skip to content

fix(render): reset temporal history when reprojection is invalid - #1715

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
Arkex-ai:fix/temporal-history-validity
Nov 10, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
Arkex-ai:fix/temporal-history-validity

Conversation

@Arkex-ai

@Arkex-ai Arkex-ai commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Invalid camera reprojection disables motion vectors but can leave temporal history without a valid mapping. Reset that history in the same frame.

Technical changes

  • Reject non-finite transforms and float overflow before conversion.
  • Reset shared DLSS/FSR 4 and separate FSR 3.1 consumers.
  • Preserve first-frame, gap and size rules, API13 and main's audio, filtering, LOD bias and capture defaults.

Validation

Actual reprojection, reset policies and consumers pass singular/non-finite, overflow, recovery, gap and ultrawide projection cases.

Head 19b81b7, main 8c92fe3: full local suite 301 passed / 3 failed / 21 skipped, versus 299 / 4 / 21 on the exact base. Three shared failures: Windows symlink privilege, missing zstd CLI in the new bake fixture, and the local Windows-header harness. Baseline also timed out in frame-wait; its identical production block and fixtures passed all18 cases in focused reruns on both base and candidate. Original counts are preserved.

Matching NGX host/backend build passed with officially regenerated runtime. Windows builder, Linux AppImage and NGX CIs passed. Source CI failed: Windows cannot load libzstd and hits a logging timing assertion; Linux rejects the bake compiler's C++23 probe. Exact upstream baseline CI has those failures too. This run additionally timed out in Windows bake_skeleton (600s). No temporal check failed; the source workflow remains red. Bounded native smoke on RTX5070Ti passed: copied Kokiri checkpoint, official DLSS310.9.16/preset K loaded and evaluated, window/fullscreen, pause/resume and exit0; eight3440x1440 engine captures. Internal upscale dimensions stayed fixed. SDK recreation, render-scale transitions, quality and performance comparisons remain untested.

@Arkex-ai
Arkex-ai force-pushed the fix/temporal-history-validity branch from 8a9f7a5 to 4daa515 Compare November 10, 2026 14:34
@Arkex-ai
Arkex-ai marked this pull request as ready for review November 10, 2026 14:49
@Arkex-ai
Arkex-ai force-pushed the fix/temporal-history-validity branch 2 times, most recently from 5f221ff to ec1b03e Compare November 10, 2026 15:43

@hckrman101 hckrman101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The reprojection now rejects non-finite inputs and float-overflowing outputs, and both the DLSS and FSR paths promote a failed reprojection to a history reset, which is the right thing when motion vectors are off. Existing first-frame, frame-gap and FSR size-change resets are untouched, and the new test is registered in run_all.py. CI is green.

Nit: the first-frame/gap case already forces reset, so the new line only matters when the matrix math fails, which is exactly the intent. Nothing to change.

@Arkex-ai
Arkex-ai force-pushed the fix/temporal-history-validity branch from ec1b03e to 4f5f0db Compare November 10, 2026 17:09
@hckrman101

Copy link
Copy Markdown
Collaborator

Heads-up: this conflicts with main now (a lot landed today). Could you merge main into the branch (or rebase) and resolve the conflicts? Thanks!

@Arkex-ai
Arkex-ai force-pushed the fix/temporal-history-validity branch 3 times, most recently from 0888482 to 11bdf4e Compare November 10, 2026 19:43
@Arkex-ai

Arkex-ai commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Refreshed on main 8c92fe3 at 19b81b7. GitHub reports the branch as mergeable. Matching NGX host/backend build and bounded native checkpoint/window/fullscreen/pause-resume smoke passed, with exit0 and original saves preserved. SDK recreation and render-scale transitions are still untested. Three fork CIs passed; source remains red on bake/logging checks also failing in the exact upstream baseline, plus a Windows bake timeout in this run. No temporal check failed. The PR description links both CI reports.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <noreply@openai.com>
@Arkex-ai
Arkex-ai force-pushed the fix/temporal-history-validity branch from 11bdf4e to 19b81b7 Compare November 10, 2026 20:13

@hckrman101 hckrman101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed after the rebase onto main. The change is the same as the one I approved, now applied to the shared chain in vk_temporal.cpp (DLSS/FSR 4) and to vk_fsr3_inputs.cpp (FSR 3.1): a failed reprojection forces reset, and reprojection() rejects non-finite inputs and float-overflowing results. The conflict I flagged is resolved and GitHub reports the branch mergeable.

I checked that the reset reaches each consumer: f.reset = reset in vk_temporal.cpp feeds InReset in vk_dlss.cpp and d.reset in vk_fsr4.cpp, and FSR 3.1 sets f.reset = reset directly. The new test splices those production fragments into its fixture, so it follows the code.

CI: the Windows builder, DLSS/FSR 4 link check, AppImage, actionlint and the SPIR-V/F2I jobs pass. Python source checks fail on both OSes, but main's own source-regressions run at 8c92fe3 is red too, and the author documents the same bake and logging failures there. I found nothing temporal in them.

Nit: SDK recreation and render-scale transitions are untested, as the author says. Nothing to change here.

@hckrman101
hckrman101 merged commit 0cf9936 into NotRexed:main Nov 10, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants