feat(vk): actor motion for single-influence, two-influence and rigid one-bone models #2787

Closed
github-sync wants to merge 1 commit from github/pr/2787 into main
Owner

@FIocker opened this pull request on GitHub · 2026-11-12 12:58 UTC · original
Merged on GitHub in dfc8fa5e75

The temporal chain's actor motion only reads skinned draws with four influences per set. Link's cap and shield, Navi and held items use other layouts, so their vertices get the camera's motion or are skinned with part of their weight, and DLSS and FSR ghost behind them. This PR teaches the actor pass three more layouts. It was split out of #1831, as hckrman101 suggested when closing it. #2118's author reported these layouts fix Link's shield and hair.

What it does

dlss_actor.vert serves every engine of the chain. It now reads, besides four influences (RGBA8 weights, RGBA8UI or RGBA16UI joints):

  • One influence in a second set (kSingle): an R8 weight and an R8UI or R16UI joint. This is a fifth bone on Link's draws, his cap's and shield's among them.
  • Two influences (kPair): RG8 weights and RG8UI joints, such as Navi's wings.
  • A rigid model on one bone (kSingle | kNoWeight): a joint and no weight, such as Navi's body, props and held items.

Where each part lives:

  • dlss_actor.h names the bits.
  • vk_draw.cpp's skin check sets them from the draw's vertex formats.
  • vk_temporal.cpp bones_used reads 1, 2 or 4 joints and counts an unweighted joint.
  • The shader reads a set's influences at any byte offset.
  • dlss_actor_vert_spv.h is regenerated with glslang 16.6.0, which is what test_dlss_actor.py checks.

Testing

  • Builds: vk_draw.cpp and vk_temporal.cpp compile with clang using nx2/build.py's renderer flags.
  • Tests: test_dlss_actor.py passes, with the header word for word what glslang 16.6.0 makes, along with the other temporal, DLSS and FSR 3.1 checks. test_motion.py fails on this PC for main as well.
  • In game, before this split: Windows 11, NVIDIA RTX, OoT v131072, DLSS. The motion debug view (RX_VK_DLSS_DEBUG=motion) shows Link's cap and Navi carrying their own motion. This head on main hasn't been played yet.

🤖 Generated with Claude Code

> [@FIocker](https://github.com/FIocker) opened this pull request on GitHub · 2026-11-12 12:58 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2787) > **Merged on GitHub** in https://git.magicbean.dev/MagicBeanDev/Hookshot/commit/dfc8fa5e75aace8f9d09d1da4c217ad9d00dac43 The temporal chain's actor motion only reads skinned draws with four influences per set. Link's cap and shield, Navi and held items use other layouts, so their vertices get the camera's motion or are skinned with part of their weight, and DLSS and FSR ghost behind them. This PR teaches the actor pass three more layouts. It was split out of #1831, as hckrman101 suggested when closing it. #2118's author reported these layouts fix Link's shield and hair. ## What it does `dlss_actor.vert` serves every engine of the chain. It now reads, besides four influences (RGBA8 weights, RGBA8UI or RGBA16UI joints): - **One influence in a second set** (`kSingle`): an R8 weight and an R8UI or R16UI joint. This is a fifth bone on Link's draws, his cap's and shield's among them. - **Two influences** (`kPair`): RG8 weights and RG8UI joints, such as Navi's wings. - **A rigid model on one bone** (`kSingle | kNoWeight`): a joint and no weight, such as Navi's body, props and held items. Where each part lives: - `dlss_actor.h` names the bits. - `vk_draw.cpp`'s skin check sets them from the draw's vertex formats. - `vk_temporal.cpp` `bones_used` reads 1, 2 or 4 joints and counts an unweighted joint. - The shader reads a set's influences at any byte offset. - `dlss_actor_vert_spv.h` is regenerated with glslang 16.6.0, which is what `test_dlss_actor.py` checks. ## Testing - **Builds**: `vk_draw.cpp` and `vk_temporal.cpp` compile with clang using `nx2/build.py`'s renderer flags. - **Tests**: `test_dlss_actor.py` passes, with the header word for word what glslang 16.6.0 makes, along with the other temporal, DLSS and FSR 3.1 checks. `test_motion.py` fails on this PC for main as well. - **In game**, before this split: Windows 11, NVIDIA RTX, OoT v131072, DLSS. The motion debug view (`RX_VK_DLSS_DEBUG=motion`) shows Link's cap and Navi carrying their own motion. This head on main hasn't been played yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- github-sync:item:2787 -->
The temporal chain's actor motion (dlss_actor.vert, for every engine of the chain) read skinned draws with four influences
only (RGBA8 weights, RGBA8UI or RGBA16UI joints). Three more layouts OoT draws with are now read, so those models carry their
own motion instead of the camera's:
- a second set of one influence (kSingle): an R8 weight and an R8UI or R16UI joint. Link's draws have it: a fifth bone, his
  cap's and shield's among them; left out, those vertices were skinned with part of their weight
- two influences (kPair): RG8 weights and RG8UI joints (Navi's wings among them)
- a rigid model on one bone, a joint and no weight (kSingle | kNoWeight): Navi's body, props, held items
dlss_actor.h names the bits, vk_draw.cpp's skin check sets them from the vertex formats, bones_used reads 1, 2 or 4 joints and
counts an unweighted one, and the shader reads a set's influences at any byte offset. dlss_actor_vert_spv.h made again
(glslang 16.6.0, as test_dlss_actor.py checks).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@Joey-Magnus approved on GitHub · 2026-11-12 14:35 UTC · original

I merged this into current main and ran the temporal checks (test_dlss_actor, test_motion, test_dlssg_runtime and the other dlss/temporal ones). All pass, and CI is green on this head, including the DLSS/FSR 4 link check. The new format bits in dlss_actor.h (kSingle 8, kPair 32, kNoWeight 128, each shifted by the set) don't overlap kHalfPosition or kByteJoints for either set, and bones_used in vk_temporal.cpp walks the same 1, 2 or 4 influences the shader reads, so the bone count stays consistent with what's drawn.

The rigid case at vk_draw.cpp:6249 (no weight attribute, an R8UI/R16UI joint at 6) only applies after the existing gates: an indexed scene draw with a 48-byte-multiple bone palette in UBO 3. So I don't expect ordinary unskinned draws to be picked up. The only thing missing is a run in the game on this exact head: your motion-view check was before the split. A quick RX_VK_DLSS_DEBUG=motion look at Link's cap and Navi on this branch would close that. Small note: the description credits "#2118's author", but #2118 is the DLSS Frame Generation PR. You probably meant another number.

> [@Joey-Magnus](https://github.com/Joey-Magnus) approved on GitHub · 2026-11-12 14:35 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2787#pullrequestreview-5876256565) I merged this into current main and ran the temporal checks (test_dlss_actor, test_motion, test_dlssg_runtime and the other dlss/temporal ones). All pass, and CI is green on this head, including the DLSS/FSR 4 link check. The new format bits in dlss_actor.h (kSingle 8, kPair 32, kNoWeight 128, each shifted by the set) don't overlap kHalfPosition or kByteJoints for either set, and bones_used in vk_temporal.cpp walks the same 1, 2 or 4 influences the shader reads, so the bone count stays consistent with what's drawn. The rigid case at vk_draw.cpp:6249 (no weight attribute, an R8UI/R16UI joint at 6) only applies after the existing gates: an indexed scene draw with a 48-byte-multiple bone palette in UBO 3. So I don't expect ordinary unskinned draws to be picked up. The only thing missing is a run in the game on this exact head: your motion-view check was before the split. A quick RX_VK_DLSS_DEBUG=motion look at Link's cap and Navi on this branch would close that. Small note: the description credits "#2118's author", but #2118 is the DLSS Frame Generation PR. You probably meant another number. <!-- github-sync:r:5876256565 -->
github-sync closed this pull request 2026-11-12 17:59:17 +00:00
Author
Owner

@alimjanqadir commented on GitHub · 2026-11-12 18:50 UTC · original

Great effort! Improving DLSS quality is a real game changer. I ran several tests to validate the effects.

Initial Observations (Without Debug Mode)

For simple character movement, I did not see any clearly observable improvement at 2x and 3x. At 4x–6x, some DLSS artifacts—such as tearing and ghosting—started to become observable, but the improvements are hard to see. Although I subjectively think this version might be better, it is just a subjective feeling—very small change between them so I enabled the Debug Mode.

Debug Mode (RX_VK_DLSS_DEBUG=motion)

I enabled RX_VK_DLSS_DEBUG=motion and compared the recordings frame by frame. I observed a tiny, slightly earlier firing of motion signals, which is somewhat clearer with the Navi wing flaps when Link is standing still.

Stand Still

Before After

Movement Testing

Before After

During movement, it is really hard to observe any difference. Both versions do a good job capturing the motion of the mentioned features—the PR hat movement, shield, and body. Subjectively, however, I still think the actor motion enhancement might be better: earlier motion signaling and brighter motion.

> [@alimjanqadir](https://github.com/alimjanqadir) commented on GitHub · 2026-11-12 18:50 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2787#issuecomment-6832864698) Great effort! Improving DLSS quality is a real game changer. I ran several tests to validate the effects. Initial Observations (Without Debug Mode) For simple character movement, I did not see any clearly observable improvement at 2x and 3x. At 4x–6x, some DLSS artifacts—such as tearing and ghosting—started to become observable, but the improvements are hard to see. Although I subjectively think this version might be better, it is just a subjective feeling—very small change between them so I enabled the Debug Mode. Debug Mode (RX_VK_DLSS_DEBUG=motion) I enabled RX_VK_DLSS_DEBUG=motion and compared the recordings frame by frame. I observed a tiny, slightly earlier firing of motion signals, which is somewhat clearer with the Navi wing flaps when Link is standing still. ### Stand Still | Before | After | | :---: | :---: | | <video src="https://github.com/user-attachments/assets/5f1542c5-40b6-4f03-8fd2-7d30f06a00f4" width="400" controls></video> | <video src="https://github.com/user-attachments/assets/01088d79-a1f3-4637-bf70-4f82a06fbdb5" width="400" controls></video> | ### Movement Testing | Before | After | | :---: | :---: | | <video src="https://github.com/user-attachments/assets/a498ffc2-f216-48a6-af13-e9ae3ce005c4" width="400" controls></video> | <video src="https://github.com/user-attachments/assets/e8b6c116-7b2c-406a-a1ac-4a2c2215480a" width="400" controls></video> | During movement, it is really hard to observe any difference. Both versions do a good job capturing the motion of the mentioned features—the PR hat movement, shield, and body. Subjectively, however, I still think the actor motion enhancement might be better: earlier motion signaling and brighter motion. <!-- github-sync:c:6832864698 -->
Commenting is not possible because the repository is archived.
No description provided.