Screen filters (CRT, Scanlines, Film) in the Graphics tab, and the free camera hides the HUD #1488

Open
KrysGG wants to merge 7 commits from KrysGG/feat/cheats-mods into main
KrysGG commented 2026-11-10 04:51:12 +00:00 (Migrated from github.com)

What

Two additions:

  • Screen filter and Filter strength rows in the Graphics tab, after Sharpness. The filters are Off, CRT (curved glass, scanlines, an aperture grille and a vignette), Scanlines alone, and Film (a warm grade, moving grain and a vignette). Strength goes from 0 to 100%. Both are saved.
  • The free camera hides the HUD. While the debug tools' free camera is on, the hearts, item slots and minimap aren't drawn, so the screen is clear for screenshots and for looking around. Turning the free camera off brings the HUD back. The same programs draw the item wheel's cards, so those hide too while the free camera is on.

(This PR first added a Cheats/Mods tab of its own. Once #1485 gave the debug tools their own DEBUG tab, with the free camera in it, I dropped the duplicate free camera row. The filters are a picture setting, so they sit in Graphics after Sharpness, as suggested.)

How

  • vk_menu.cpp: the two rows in Graphics after Sharpness, outside the Quality preset (preset_exempt). Restart and Quit stay the table's last two rows. Filter strength is a slider (is_slider).
  • vk_draw.cpp hud_hidden: while menu_free_camera() is on, the draws of the ten programs that draw OoT's HUD and menus are left out. I found them as the programs drawn both in play and behind the item wheel, and checked them with RX_VK_SKIP_FILE: with them out, the world looks the same and no HUD shows.
  • shaders/fg_scale.comp: the filters run in the present's scale pass, after the upscale filter and the sharpen (and over #1352's menu sides). The push block grows by 12 bytes (fx, strength, time) to 32. The film grain's clock is presents_now / 60. With a filter on, the pass runs even with no upscaling or sharpness, and vk_replay.cpp takes that path for it.
  • Tests: upscale_independent_test.cpp for the 32-byte push and the filter alone running the pass.

Tested

RTX 5080, Windows 11, 5120x1440:

  • The rows change with the arrows and Enter, and the strength slider works with the mouse.
  • Free camera on (Debug tools, then the free camera): the camera leaves Link (cheats: free camera at ... in the log), and no hearts, item slots or minimap show. Off brings them back.
  • CRT, Scanlines and Film show over the whole picture. Off is the picture as before.
  • tests/run_all.py: the same results as main on this machine.

#1352 is merged now; this branch has main merged in. The scale pass's push block holds both: the menu sides and the filter (32 bytes), and the filter goes over the menu sides too.

--Original--
Screenshot 2026-11-10 004707

--Filters--

[CRT]
Screenshot 2026-11-10 004535

[Film]
Screenshot 2026-11-10 004627

## What Two additions: - **Screen filter** and **Filter strength** rows in the **Graphics** tab, after Sharpness. The filters are Off, **CRT** (curved glass, scanlines, an aperture grille and a vignette), **Scanlines** alone, and **Film** (a warm grade, moving grain and a vignette). Strength goes from 0 to 100%. Both are saved. - **The free camera hides the HUD.** While the debug tools' free camera is on, the hearts, item slots and minimap aren't drawn, so the screen is clear for screenshots and for looking around. Turning the free camera off brings the HUD back. The same programs draw the item wheel's cards, so those hide too while the free camera is on. (This PR first added a Cheats/Mods tab of its own. Once #1485 gave the debug tools their own DEBUG tab, with the free camera in it, I dropped the duplicate free camera row. The filters are a picture setting, so they sit in Graphics after Sharpness, as suggested.) ## How - `vk_menu.cpp`: the two rows in Graphics after Sharpness, outside the Quality preset (`preset_exempt`). Restart and Quit stay the table's last two rows. Filter strength is a slider (`is_slider`). - `vk_draw.cpp` `hud_hidden`: while `menu_free_camera()` is on, the draws of the ten programs that draw OoT's HUD and menus are left out. I found them as the programs drawn both in play and behind the item wheel, and checked them with `RX_VK_SKIP_FILE`: with them out, the world looks the same and no HUD shows. - `shaders/fg_scale.comp`: the filters run in the present's scale pass, after the upscale filter and the sharpen (and over #1352's menu sides). The push block grows by 12 bytes (`fx`, `strength`, `time`) to 32. The film grain's clock is `presents_now / 60`. With a filter on, the pass runs even with no upscaling or sharpness, and `vk_replay.cpp` takes that path for it. - Tests: `upscale_independent_test.cpp` for the 32-byte push and the filter alone running the pass. ## Tested RTX 5080, Windows 11, 5120x1440: - The rows change with the arrows and Enter, and the strength slider works with the mouse. - Free camera on (Debug tools, then the free camera): the camera leaves Link (`cheats: free camera at ...` in the log), and no hearts, item slots or minimap show. Off brings them back. - CRT, Scanlines and Film show over the whole picture. Off is the picture as before. - `tests/run_all.py`: the same results as `main` on this machine. #1352 is merged now; this branch has main merged in. The scale pass's push block holds both: the menu sides and the filter (32 bytes), and the filter goes over the menu sides too. --Original-- <img width="2492" height="1399" alt="Screenshot 2026-11-10 004707" src="https://github.com/user-attachments/assets/4669c59c-b02f-4930-9dd8-5423533541ad" /> --Filters-- [CRT] <img width="2552" height="1384" alt="Screenshot 2026-11-10 004535" src="https://github.com/user-attachments/assets/91019b4b-6651-497d-a91a-0474bd1c7127" /> [Film] <img width="2479" height="1395" alt="Screenshot 2026-11-10 004627" src="https://github.com/user-attachments/assets/1fde8a7e-b453-4a36-acb4-677811c6dabb" />
hckrman101 commented 2026-11-10 05:26:25 +00:00 (Migrated from github.com)

#1459 rewrites the entire menu, I can assist rebasing this PR on top of the other (trying to merge ASAP)

https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/1459 rewrites the entire menu, I can assist rebasing this PR on top of the other (trying to merge ASAP)
KrysGG commented 2026-11-10 05:31:18 +00:00 (Migrated from github.com)

Thanks, sounds good! Since #1485 gave the debug tools their own DEBUG tab, this PR only adds two rows there (Screen filter and Filter strength: tx_screen_filter plus is_slider). The rest stays out of the menu: the filters in fg_scale.comp and the scale pass, and the HUD hiding in vk_draw.cpp while the free camera is on. So the rebase on #1459 should be small. I'll update the title and description to match.

Go ahead with #1459 first. Once it's in, I'll rebase this onto it, or take your help if you'd rather, whichever is quicker for you.

Thanks, sounds good! Since #1485 gave the debug tools their own DEBUG tab, this PR only adds two rows there (Screen filter and Filter strength: tx_screen_filter plus is_slider). The rest stays out of the menu: the filters in fg_scale.comp and the scale pass, and the HUD hiding in vk_draw.cpp while the free camera is on. So the rebase on #1459 should be small. I'll update the title and description to match. Go ahead with #1459 first. Once it's in, I'll rebase this onto it, or take your help if you'd rather, whichever is quicker for you.
hckrman101 (Migrated from github.com) reviewed 2026-11-10 16:39:10 +00:00
hckrman101 (Migrated from github.com) left a comment

The filter pass itself looks right to me: push block 8 to 20 bytes matches the shader, pipe creation, the test and the pc initializer; the pass now runs for a filter alone in both framegen_scale and do_present; and the extern int64_t presents_now sits in mkwvk outside the unnamed namespace, so it links.

Two things before this can merge:

  1. The branch is 145 commits behind main and GitHub reports it as conflicting (dirty). Main's vk_menu.cpp has changed a lot in that time (the Debug tab's rows were rearranged), so please merge main and re-check the row placement and the kCheatsRow/kQuitRow/kRestartRow counting. The fg_scale.comp push block overlap with #1352 you mentioned is the other one to settle, and fg_scale_comp_spv.h will need regenerating after any shader merge.

  2. The description says the Screen filter and Filter strength rows are in the Debug tab, but in this head they are TAB_GAMEPLAY rows (placed just before Restart and Quit), and the comment above them says "the Gameplay tab's screen filters". Either the description or the tab is stale. If you do want them in Debug, they'd go before that tab's own rows, and the Restart/Quit counting then changes.

Nits: the comments in fg_scale.comp, vk_draw.cpp and vk_framegen.cpp still say "Cheats/Mods tab", which no longer exists. I can't verify the ten HUD program keys in hud_hidden without running the game; I'm relying on your RX_VK_SKIP_FILE check. Note it also hides the item wheel's cards while the free camera is on.

The filter pass itself looks right to me: push block 8 to 20 bytes matches the shader, pipe creation, the test and the `pc` initializer; the pass now runs for a filter alone in both `framegen_scale` and `do_present`; and the `extern int64_t presents_now` sits in `mkwvk` outside the unnamed namespace, so it links. Two things before this can merge: 1. The branch is 145 commits behind main and GitHub reports it as conflicting (`dirty`). Main's `vk_menu.cpp` has changed a lot in that time (the Debug tab's rows were rearranged), so please merge main and re-check the row placement and the `kCheatsRow`/`kQuitRow`/`kRestartRow` counting. The `fg_scale.comp` push block overlap with #1352 you mentioned is the other one to settle, and `fg_scale_comp_spv.h` will need regenerating after any shader merge. 2. The description says the Screen filter and Filter strength rows are in the Debug tab, but in this head they are `TAB_GAMEPLAY` rows (placed just before Restart and Quit), and the comment above them says "the Gameplay tab's screen filters". Either the description or the tab is stale. If you do want them in Debug, they'd go before that tab's own rows, and the Restart/Quit counting then changes. Nits: the comments in `fg_scale.comp`, `vk_draw.cpp` and `vk_framegen.cpp` still say "Cheats/Mods tab", which no longer exists. I can't verify the ten HUD program keys in `hud_hidden` without running the game; I'm relying on your RX_VK_SKIP_FILE check. Note it also hides the item wheel's cards while the free camera is on.
KrysGG commented 2026-11-10 17:48:08 +00:00 (Migrated from github.com)

Thanks! Both points are addressed:

  1. Merged main (now at e4ea245). The two rows stay TAB_GAMEPLAY, placed just before Restart and Quit, which are still the table's last two rows. So kQuitRow (the last row) and kRestartRow (the one before) count back correctly. kCheatsRow no longer exists on main. fg_scale_comp_spv.h is regenerated after the shader comment change.
  2. The rows are meant to be in Gameplay (a look for playing, not a debug tool). I've updated the title and description to say so.

Nits: the "Cheats/Mods tab" comments in fg_scale.comp, vk_draw.cpp and vk_framegen.cpp now name the Gameplay tab's Screen filter and the Debug tab's Free camera. The description now also says the item wheel's cards hide while the free camera is on.

Checked on the new menu (headless, RX_VK_SHOT_MENU=1): turning on Debug → Free camera hides the hearts, item slots and minimap, and the Gameplay tab shows Screen filter and Filter strength above Restart and Quit.

On the fg_scale.comp push-block overlap with #1352: whichever of the two merges first, I'll merge it into the other and regenerate the header.

Thanks! Both points are addressed: 1. Merged main (now at `e4ea245`). The two rows stay `TAB_GAMEPLAY`, placed just before Restart and Quit, which are still the table's last two rows. So `kQuitRow` (the last row) and `kRestartRow` (the one before) count back correctly. `kCheatsRow` no longer exists on main. `fg_scale_comp_spv.h` is regenerated after the shader comment change. 2. The rows are meant to be in **Gameplay** (a look for playing, not a debug tool). I've updated the title and description to say so. Nits: the "Cheats/Mods tab" comments in `fg_scale.comp`, `vk_draw.cpp` and `vk_framegen.cpp` now name the Gameplay tab's Screen filter and the Debug tab's Free camera. The description now also says the item wheel's cards hide while the free camera is on. Checked on the new menu (headless, `RX_VK_SHOT_MENU=1`): turning on Debug → Free camera hides the hearts, item slots and minimap, and the Gameplay tab shows Screen filter and Filter strength above Restart and Quit. On the `fg_scale.comp` push-block overlap with #1352: whichever of the two merges first, I'll merge it into the other and regenerate the header.
hckrman101 commented 2026-11-10 17:49:24 +00:00 (Migrated from github.com)

Maybe should be in graphics tab? also conflicts

Maybe should be in graphics tab? also conflicts
KrysGG commented 2026-11-10 18:02:12 +00:00 (Migrated from github.com)

Moved both rows to Graphics, right after Sharpness, as you suggested (outside the Quality preset, like Sharpness). Restart and Quit are untouched as the table's last two. Merged main with #1352 in: the scale pass now carries both, with the menu sides and the filter in one 32-byte push block, and the filter drawn over the sides too. fg_scale_comp_spv.h is regenerated. Title and description updated.

Moved both rows to **Graphics**, right after Sharpness, as you suggested (outside the Quality preset, like Sharpness). Restart and Quit are untouched as the table's last two. Merged main with #1352 in: the scale pass now carries both, with the menu sides and the filter in one 32-byte push block, and the filter drawn over the sides too. `fg_scale_comp_spv.h` is regenerated. Title and description updated.
hckrman101 (Migrated from github.com) approved these changes 2026-11-10 18:13:32 +00:00
hckrman101 (Migrated from github.com) left a comment

Thanks for the quick turnaround. Both points from last time are sorted:

  • Main is merged in (including #1352), and GitHub shows no conflicts now. The scale pass's push block is 32 bytes. The shader's P, the pc struct in framegen_scale, make_pipe(..., 32) and the test's struct all match, and the 1/8 blur dispatch shares the same pc. The filter is applied to the menu sides as well (both the fully outside early-out and the feathered mix).
  • The rows are on the Graphics tab after Sharpness, preset_exempt, and Restart and Quit are left alone. They're saved under their name keys (screen_filter, filter_strength). The description now matches.
  • The stale "Cheats/Mods" comments are gone, and the description mentions that the item wheel's cards hide too.

I found nothing new. The CRT curve is applied after the side 3 early return, so the 1/8 picture isn't warped, and the black frame outside the curve is fine. As before, I'm relying on your RX_VK_SKIP_FILE check for the ten HUD keys in hud_hidden.

CI was still pending when I looked. Main currently has a few failing tests of its own (test_recomplauncher_json, test_lift_cleanup_error, nx2/test_draw_parameters, nx2/test_nup_out_of_space), so if those show up here they're not from this PR.

Thanks for the quick turnaround. Both points from last time are sorted: - Main is merged in (including #1352), and GitHub shows no conflicts now. The scale pass's push block is 32 bytes. The shader's `P`, the `pc` struct in `framegen_scale`, `make_pipe(..., 32)` and the test's struct all match, and the 1/8 blur dispatch shares the same `pc`. The filter is applied to the menu sides as well (both the fully outside early-out and the feathered mix). - The rows are on the Graphics tab after Sharpness, `preset_exempt`, and Restart and Quit are left alone. They're saved under their name keys (`screen_filter`, `filter_strength`). The description now matches. - The stale "Cheats/Mods" comments are gone, and the description mentions that the item wheel's cards hide too. I found nothing new. The CRT curve is applied after the side 3 early return, so the 1/8 picture isn't warped, and the black frame outside the curve is fine. As before, I'm relying on your RX_VK_SKIP_FILE check for the ten HUD keys in `hud_hidden`. CI was still pending when I looked. Main currently has a few failing tests of its own (test_recomplauncher_json, test_lift_cleanup_error, nx2/test_draw_parameters, nx2/test_nup_out_of_space), so if those show up here they're not from this PR.
hckrman101 commented 2026-11-11 15:51:05 +00:00 (Migrated from github.com)

Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!

Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!
Joey-Magnus (Migrated from github.com) reviewed 2026-11-11 21:45:55 +00:00
Joey-Magnus (Migrated from github.com) left a comment

This was approved at 5e71aeb, but main has moved about 445 commits since. A merge now conflicts in fg_scale.comp, fg_scale_comp_spv.h, vk_draw.cpp, vk_menu.cpp and vk_replay.cpp. The last CI run failed on nx2/test_draw_parameters.py (Linux) and nx2/test_nup_out_of_space.py (Windows). Neither touches your files; both were failing on main at that point.

When you rebase fg_scale.comp, note that main now compiles it twice. The second variant is FG_SCALE_PQ (rgb10_a2 dst, the game's native HDR10 PQ codes; #2038 and #2342). As written, screen_fx would multiply PQ codes for the scanlines, mask and vignette. That gives a much stronger, non-linear darkening than in SDR. Either skip the filter in the PQ variant or apply it in linear light. Please also regenerate both SPIR-V headers.

Main's title check will run on the rebase, so the title needs a conventional-commit prefix, e.g. feat(vk):. The hud_hidden part still applies: nothing on main hides the HUD under the free camera.

This was approved at 5e71aeb, but main has moved about 445 commits since. A merge now conflicts in `fg_scale.comp`, `fg_scale_comp_spv.h`, `vk_draw.cpp`, `vk_menu.cpp` and `vk_replay.cpp`. The last CI run failed on `nx2/test_draw_parameters.py` (Linux) and `nx2/test_nup_out_of_space.py` (Windows). Neither touches your files; both were failing on main at that point. When you rebase `fg_scale.comp`, note that main now compiles it twice. The second variant is `FG_SCALE_PQ` (`rgb10_a2` dst, the game's native HDR10 PQ codes; #2038 and #2342). As written, `screen_fx` would multiply PQ codes for the scanlines, mask and vignette. That gives a much stronger, non-linear darkening than in SDR. Either skip the filter in the PQ variant or apply it in linear light. Please also regenerate both SPIR-V headers. Main's title check will run on the rebase, so the title needs a conventional-commit prefix, e.g. `feat(vk):`. The `hud_hidden` part still applies: nothing on main hides the HUD under the free camera.
Commenting is not possible because the repository is archived.
No description provided.