Skip to content

feat(vk): DLSS frame generation (NGX), more actor motion for DLSS, FidelityFX FSR 4 fallback (builds with #1833, #1834) - #1831

Closed
FIocker wants to merge 1 commit into
NotRexed:mainfrom
FIocker:super-build/upscaling-framegen
Closed

FIocker wants to merge 1 commit into
NotRexed:mainfrom
FIocker:super-build/upscaling-framegen

Conversation

@FIocker

@FIocker FIocker commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This adds NVIDIA DLSS frame generation through NGX and gives more of OoT's moving models their own motion, so DLSS ghosts less behind them. It also offers AMD's FidelityFX FSR 4 where main's FSR 4 engine isn't built.

#1833, #1834 and this PR build only together, and should be reviewed and merged as one unit. The menu rows, the vk_main and vk_replay hooks and the build lists are in #1834; the neural rendering this chain feeds is in #1833. FIocker:super-build/all is the three together, rebuilt on main at d7a7306, and it's what was built and tested. #1830 is separate and builds alone.

Part Branch Builds
Shader fixes super-build/shaders (#1830) on its own
Upscaling and frame generation (this PR) super-build/upscaling-framegen (#1831) with #1833 and #1834
DLSS 5 neural rendering super-build/neural (#1833) with this PR and #1834
Menu, renderer and build plumbing super-build/core (#1834) with this PR and #1833

What it does

Temporal upscaler chain (vk_temporal.cpp, on main's DLSS/FSR 4 chain):

  • Actor motion covers more skinned models: single-influence sets (kSingle), two-influence sets (kPair), and rigid models bound to one bone without weights (kNoWeight), such as Navi's body, props and held items. dlss_actor.vert and dlss_actor.h read the new formats.
  • The scene camera's view and projection are kept alongside the view-projection.
  • temporal_upscale_recent() says whether a temporal upscaler drew in the last frames.
  • Neural rendering from the chain:
    • Before the HUD (default): on the engine's picture, so the model never sees the HUD.
    • Before the upscaler (feat(vk): DLSS 5 neural rendering through NGX, in the temporal chain before the HUD #1833's Stage row): on the render-size scene. Here the model now gets the chain's own depth, motion, jitter and resets (NrFrame) instead of a flat depth and no motion. A temporal model then keeps the jitter the engine needs and doesn't ghost on camera motion.

Frame generation:

  • NVIDIA DLSS frame generation through NGX directly (vk_dlssg.cpp, vk_ngx.cpp), sharing DLSS's one NGX session (dlss_ngx_session).
  • Methods (framegen_methods.h, with tests): Auto, NVIDIA DLSS and Built-in, of what runs here.
  • AMD's FSR frame generation is not offered. Main made FSR 3.1's interpolation opt-in on 2026-11-10 (RX_VK_FSR_FG=1, after FrameGen and FSR causes blur and ghosting while moving #1635 and its duplicates: the HUD moved with the scene). This PR keeps that, and doesn't offer FidelityFX FSR 4's frame generation either, since it misbehaved the same way in play. The method enum keeps both values, so a saved choice reads as Auto and a future fix can bring them back.
  • Streamline frame generation is removed (it was vk_slfg.cpp, env-only). It misbehaved in play, and its hooks in Reflex and the present were what main's tests tripped on.

FSR 4 through AMD's FidelityFX runtime (vk_ffx.cpp, MIT headers in third_party/ffx-api): this is the Upscaler row's FSR 4 only in builds without main's FSR 4 engine (no HOOKSHOT_FSR). Where vk_fsr4.cpp is built and available, that engine takes the row.

Window sharpening over a temporal upscaler is a fifth of the Sharpness row (RX_VK_TEMPORAL_SHARPEN). At full strength over DLSS's motion-time softness, dense grass turned into an oily smear whenever the camera moved. Main has since fixed the black HDR picture under the scaling pass the same way this PR did (the SAMPLED usage), so that part is gone from here.

Camera motion pass (vk_camera_motion.cpp) for the open NR backend, and docs/upscaling.md.

Main's recorder (#1473): vk_camera_motion, vk_dlssg and vk_ffx include vk_work.h last, so their vkCmd* go through it. NGX's and FidelityFX's own recording gets a B_DIRECT boundary first, as vk_dlss.cpp has. test_recorder_sync.py passes.

Testing

  • Tests: tests/run_all.py on the three together, locally (clang targeting MSVC, the CPM Vulkan headers, glslang 11.12): 328 passed. The only failures are the same 18 that main at d7a7306 has on this machine, all down to this PC's toolchain.
  • In game, before the rebase: Windows 11, NVIDIA RTX, OoT v131072, 3840x1820, DLSS Quality (2779x1318 → 4168x1976), PresentMon over 20 s in Kokiri Forest.
    • DLSS with DLSS frame generation 2x: 99.4 fps, p99 15.0 ms, max 40.8 ms. The log says frame generation method: NVIDIA DLSS.
    • Actor motion: the motion debug view shows Link's cap and Navi carrying their own motion.
  • Since the rebase: built with MSVC and the NGX SDK; in-game results for this build will follow in a comment.
  • Not tested: main's FSR 4 engine (no HOOKSHOT_FSR here) and AMD GPUs.

🤖 Generated with Claude Code

…SS frame generation (NGX), FSR 4 fallback (builds with NotRexed#1833 and NotRexed#1834)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FIocker
FIocker force-pushed the super-build/upscaling-framegen branch from daff897 to c024627 Compare November 11, 2026 10:45
FIocker added a commit to FIocker/Hookshot that referenced this pull request Nov 11, 2026
…R), before the HUD or before the upscaler (builds with NotRexed#1831 and NotRexed#1834)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIocker added a commit to FIocker/Hookshot that referenced this pull request Nov 11, 2026
…s; lock diagnostics (builds with NotRexed#1831 and NotRexed#1833)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FIocker FIocker changed the title feat(vk): upscaling and frame generation: actor motion, DLSS frame generation (NGX), FSR 4 fallback, HDR sharpening fix (super build 2/4) feat(vk): DLSS frame generation (NGX), more actor motion for DLSS, FidelityFX FSR 4 fallback (builds with #1833, #1834) Nov 11, 2026
@FIocker

FIocker commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Rebased: the series is rebuilt on main at d7a7306, the conflicts are resolved, and the descriptions are rewritten. The full replies to your reviews are on #1830, #1833 and #1834. For this PR:

  • Streamline frame generation is removed.
  • FSR frame generation: main made FSR 3.1's interpolation opt-in itself (FrameGen and FSR causes blur and ghosting while moving #1635), so the series follows main there, and the description says why FidelityFX FSR 4's isn't offered either.
  • HDR SAMPLED fix: main fixed the black HDR picture under the scaling pass the same way, so ours is gone.
  • Neural rendering before the upscaler now gets the chain's own depth, motion, jitter and resets.
  • Recorder: the new files go through main's recorder (vk: Add an opt-in recorder thread for the serial replay #1473), and test_recorder_sync.py passes.

#1831, #1833 and #1834 build only together, as the descriptions now say.

@FIocker

FIocker commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, @hckrman101, and for crediting the ideas on #2118. As suggested, the single, pair and no-weight actor-motion layouts are now their own PR on main: #2787. The neural rendering in #1833 is rebuilt on #2118's NGX session.

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.

1 participant