WIP: feat(reshade): live in-game parameter editor and per-area presets #2911

Draft
Cal wants to merge 1 commit from Cal/Longshot:feat/reshade-areas-and-editor into main
First-time contributor

Summary

Adds a live in-game ReShade parameter editor (opened with Shift+F2 by default, rebindable in Controls) and per-area preset overrides (reshade_areas subpage), allowing players to tweak shader uniforms live, save/Save As presets, and bind different presets per game area.

Key files to review first:

  • gpu/vk/reshade/fx_areas.{h,cpp} (per-area preset matching and INI round-trip)
  • gpu/vk/vk_api.h (MKWVK_API_VERSION bumped to 57, HOS_KEY_RESHADE_EDITOR, MkwVkHost::current_area)
  • host/rx_backend.c (host_current_area wiring)
  • gpu/vk/vk_menu.cpp (live editor UI, reshade_areas subpage, shared text-input handling)

Testing

Tested: Windows 11 (x86-64, llvm-mingw), rebased onto origin/main (a425fa2a):

  • tests/test_reshade_editor.py — PASS
  • tests/test_menu_keys.py — PASS
  • tests/test_menu_text_field.py — PASS
  • tests/test_upscaler_round_trip.py — PASS (2082/2082 checks)
  • tests/test_menu_ini_keys.py, tests/test_menu_i18n.py, tests/test_menu_modules.py, tests/test_menu_env_overrides.py, tests/test_sprint.py, tests/test_walk_key.py, tests/test_hos_ab_table.py, tests/test_check_pr_description.py — PASS
  • scripts/reshade/check_fx.py — PASS
  • scripts/check_guide_screenshots.py --review-sources — PASS
  • cargo test -p build-compile plan — PASS
  • Packaged Windows longshot-builder passed longshot_builder.py check and longshot-packager release dry-run --clean (0 missing files, prebuilt liblongshot_rs.a, 322/322 third-party objects).

Still to test:

  • Linux host build and runtime check (@Beanstalk or by hand).

Measurements

Nothing to measure: feature/UI addition; no default rendering or performance path is changed when ReShade presets are off.

Risks

  • MKWVK_API_VERSION bumped to 57 (host and renderer must match, which the builder enforces).
  • Updated tests/test_menu_text_field.py, tests/test_menu_keys.py, and tests/test_upscaler_round_trip.py fixtures for origin/main + shared text-input wiring.
  • Reverting the commit cleanly removes the feature; existing longshot_options.ini files remain compatible.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • Docs updated.
## Summary Adds a live in-game ReShade parameter editor (opened with `Shift+F2` by default, rebindable in Controls) and per-area preset overrides (`reshade_areas` subpage), allowing players to tweak shader uniforms live, save/Save As presets, and bind different presets per game area. Key files to review first: - `gpu/vk/reshade/fx_areas.{h,cpp}` (per-area preset matching and INI round-trip) - `gpu/vk/vk_api.h` (`MKWVK_API_VERSION` bumped to `57`, `HOS_KEY_RESHADE_EDITOR`, `MkwVkHost::current_area`) - `host/rx_backend.c` (`host_current_area` wiring) - `gpu/vk/vk_menu.cpp` (live editor UI, `reshade_areas` subpage, shared text-input handling) ## Testing **Tested:** Windows 11 (x86-64, llvm-mingw), rebased onto `origin/main` (`a425fa2a`): - `tests/test_reshade_editor.py` — PASS - `tests/test_menu_keys.py` — PASS - `tests/test_menu_text_field.py` — PASS - `tests/test_upscaler_round_trip.py` — PASS (2082/2082 checks) - `tests/test_menu_ini_keys.py`, `tests/test_menu_i18n.py`, `tests/test_menu_modules.py`, `tests/test_menu_env_overrides.py`, `tests/test_sprint.py`, `tests/test_walk_key.py`, `tests/test_hos_ab_table.py`, `tests/test_check_pr_description.py` — PASS - `scripts/reshade/check_fx.py` — PASS - `scripts/check_guide_screenshots.py --review-sources` — PASS - `cargo test -p build-compile plan` — PASS - Packaged Windows `longshot-builder` passed `longshot_builder.py check` and `longshot-packager release dry-run --clean` (0 missing files, prebuilt `liblongshot_rs.a`, 322/322 third-party objects). **Still to test:** - Linux host build and runtime check (`@Beanstalk` or by hand). ## Measurements Nothing to measure: feature/UI addition; no default rendering or performance path is changed when ReShade presets are off. ## Risks - `MKWVK_API_VERSION` bumped to `57` (host and renderer must match, which the builder enforces). - Updated `tests/test_menu_text_field.py`, `tests/test_menu_keys.py`, and `tests/test_upscaler_round_trip.py` fixtures for `origin/main` + shared text-input wiring. - Reverting the commit cleanly removes the feature; existing `longshot_options.ini` files remain compatible. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [x] Docs updated.
feat(reshade): live in-game parameter editor and per-area presets
Some checks are pending
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 11s
702fac3638
Adds a docked live ReShade parameter and technique editor (rebindable in Controls, default Shift+F2) and per-area ReShade preset switching behind a Graphics -> Post-processing subpage.

- Live editor: reflects uniform UI annotations, updates UBOs on the GPU timeline via vkCmdUpdateBuffer without shader recompiles, toggles/reorders techniques, exports standalone user INI + FX files without mutating built-ins (preserving LongshotColorSpace=LinearHDR under Native HDR), supports inline Save As naming, and is fully navigable with keyboard, gamepad, or mouse.
- Per-area presets: routes presets via reshade/areas.ini using game_area_info() behind game/game.h (stripping _MQ and keeping transformed area keys distinct), pauses auto-switching while editing, and fast-switches compatible presets in place without rebuilding Vulkan pipelines.
- Localization & tests: adds 13-language translations in menu_i18n.h, game-free unit tests in tests/test_reshade_editor.py, fx_probe, and test_menu_keys.py, and user docs updates.

Assisted-by: Antigravity
Member

Possibly related, for context:

  • PR #1861 feat(reshade): add Vulkan presets and live comparison — Adds the underlying ReShade preset runtime and menu, which this PR extends with live editing.
  • issue #2492 Game: AcerolaFX ReShade preset rejects AcerolaBufferTex texture — Open report involving import/handling of a ReShade shader preset texture.
Possibly related, for context: - PR #1861 feat(reshade): add Vulkan presets and live comparison — Adds the underlying ReShade preset runtime and menu, which this PR extends with live editing. - issue #2492 Game: AcerolaFX ReShade preset rejects AcerolaBufferTex texture — Open report involving import/handling of a ReShade shader preset texture.
Author
First-time contributor

Tested in game: Windows 11: live ReShade parameter editor (Shift+F2) and per-area presets verified in-game; rebased onto origin/main (a425fa2a) and verified with automated menu/editor/FX tests and Windows release packaging dry-run.

Tested in game: Windows 11: live ReShade parameter editor (Shift+F2) and per-area presets verified in-game; rebased onto origin/main (a425fa2a) and verified with automated menu/editor/FX tests and Windows release packaging dry-run.
Some checks are pending
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 11s
This pull request has changes conflicting with the target branch.
  • builder/crates/build-compile/src/plan.rs
  • docs/user/graphics-and-controls.md
  • docs/user/images/guide/manifest.json
  • docs/user/reshade-presets.md
  • game/game.h
  • game/oot_area_names.c
  • gpu/vk/menu/reshade.cpp
  • gpu/vk/menu/reshade.h
  • gpu/vk/menu_i18n.h
  • gpu/vk/reshade/fx_builtin.h
  • gpu/vk/reshade/fx_clarity.h
  • gpu/vk/reshade/fx_runtime.cpp
  • gpu/vk/vk_api.h
  • gpu/vk/vk_menu.cpp
  • gpu/vk/vk_menu.h
  • gpu/vk/vk_replay.cpp
  • host/nn_hid.c
  • host/rx_backend.c
  • scripts/reshade/fx_probe.cpp
  • scripts/screenshots/menu.cpp
  • tests/menu_model_fixture.py
  • tests/test_menu_env_overrides.py
  • tests/test_menu_i18n.py
  • tests/test_menu_keys.py
  • tests/test_menu_modules.py
  • tests/test_menu_save_atomic.py
  • tests/test_menu_text_field.py
  • tests/test_sprint.py
  • tests/test_upscaler_round_trip.py
  • tests/test_walk_key.py
  • website/src/repo-docs/graphics-settings.ts
  • website/tests/graphics-settings.test.ts
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/reshade-areas-and-editor:Cal-feat/reshade-areas-and-editor'
git switch 'Cal-feat/reshade-areas-and-editor'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2911
No description provided.