HUD : Size the interface for 3840x2160 on the 1440p output (HUD, menus, map cursor) #391

Closed
ZackariaB wants to merge 2 commits from upstream-pr/391 into main
ZackariaB commented 2026-11-27 21:50:34 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ZackariaB on 2026-11-27T21:50:34Z.


Fixes #98 at the 2560x1440 output (the Series X default, and -Res 1080to1440).

The problem

The interface is laid out for 3840x2160, the stock Series X output. With the 1440p image patch, the title is told the screen is 2560x1440, so:

  • the HUD and every menu came out 1.5 times too big;
  • Settings > Controls was cut to 2/3: the tab bar, part of the list and the "Default 1 / 3 < >" box were missing;
  • the map's cursor sat at 2/3 of the screen's centre, shifted to the upper left (the one BingYanchi reports).

Before and after (1440p, compared with the stock 4K output)

HUD. Before, at 1440p, the profile screen prompt was 1.5 times too big: it covered 16.6% of the window's width against 11% at 4K. After, it measures 11.05%, and the in-game HUD is the 4K size.

Before (1440p) After (1440p)
HUD before HUD after

Settings > Controls.

Before (1440p) After (1440p) 4K reference
Controls before Controls after Controls 4K

Map. Before, the cursor sat at 2/3 of the centre. After, it is centred, stays centred after snapping to a point of interest, and selects it. The terrain, the fog and the zone borders match the 4K output.

Before (1440p) After (1440p) 4K reference
Map before Map after Map 4K

The fix

apps/victory/src/native_1440p.rs

Applied with the 1440p patch at a 16:9 2560x1440 output. VICTORY_UI_SCREEN=0 turns it off.

  • Screen size getters. The interface reads its screen size through two getters (0x4f21f10, 0x4f21f00). They now read the legacy UI size, 3840x2160 at 0xa9438ec, as on the stock 4K output.
  • Scaleform buffer. Scaleform's buffer size, read at 0x13cba73, comes from the [3840.0, 2160.0] constant. Without this, Scaleform drops whatever lies past 2560x1440.
  • Menu target size. The menus read their target's size at 0x53915bc. That read jumps to a cave in int3 padding, which answers 3840x2160 in place of the output's 2560x1440. Any other size passes through unchanged.
  • Map cursor, when the map opens. The cursor's fraction of the screen is turned into interface pixels by a call at 0xb19a4b. That call now goes to a copy of GetScreenSize that answers 3840x2160.
  • Map cursor, after a snap.
    • The cursor's position is its object's +0x140. The interface is bound to it: 0x388fa0 notifies on change.
    • Its two GetScreenSizeF calls (0x2324351, 0x232478d) go to a copy that answers [3840.0, 2160.0], so the bound position is in interface pixels.
    • The four reads the map's logic makes of it call small stubs that scale it back by 2/3: what lies under the cursor, what is near it, where it points in the world, and the controller's copy.
    • The stubs live in the int3 padding past the code section's used size (0x5f40970). The file maps that padding with the section.
  • Left on the output's size. GetScreenSize itself and the screen size global keep 2560x1440. The map's terrain, its fog of unexplored zones and its zone borders are worked out from them. A 4K run shows all three in the same place as 1440p does.

crates/victory-gpu/src/draw.rs

  • Interface viewports. A viewport of exactly 3840x2160 on a target of at most 2560x1440 is the interface canvas. That viewport and its scissors are scaled onto the output.
  • Left alone. A full-output scissor stays as it is. So does the intro video's own 3840x2160 target, which no longer comes out small.

Checked

  • Tests. The native_1440p tests pass against the retail executable (VICTORY_DISPLAY_PROFILE_TEST_IMAGE).
  • Pre-existing failures. In victory-gpu, indirect::tests::host_list_budget_starts_empty_at_each_submission and warp_batch_charges_every_execution fail the same way on main without this change.
  • In game at 1440p, on this branch, compared with the 4K output:
    • profile screen;
    • intro video;
    • in-game HUD;
    • Settings > Controls;
    • map: cursor, points of interest, fog, zone borders.

Not covered

  • Other outputs. A 1920x1080 output (Series S, or a 1080p VICTORY_DISPLAY_MODE) is unchanged. Issue #98 also mentions it, but it is not the 1440p patch's path.
  • Not checked.
    • The mouse in menus.
    • The in-game fps cost. The menus' own fps went from about 440 to about 300 on the profile screen, because Scaleform now renders at its 4K size.
    • Every other screen. Some may still convert between screen and interface pixels with the output's size. For example, the place names on the map look slightly off in scale.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5533538140 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/391). Originally posted by [ZackariaB](https://github.com/ZackariaB) on 2026-11-27T21:50:34Z. --- Fixes #98 at the 2560x1440 output (the Series X default, and `-Res 1080to1440`). ## The problem The interface is laid out for 3840x2160, the stock Series X output. With the 1440p image patch, the title is told the screen is 2560x1440, so: - the HUD and every menu came out 1.5 times too big; - Settings > Controls was cut to 2/3: the tab bar, part of the list and the "Default 1 / 3 < >" box were missing; - the map's cursor sat at 2/3 of the screen's centre, shifted to the upper left (the one BingYanchi reports). ## Before and after (1440p, compared with the stock 4K output) **HUD.** Before, at 1440p, the profile screen prompt was 1.5 times too big: it covered 16.6% of the window's width against 11% at 4K. After, it measures 11.05%, and the in-game HUD is the 4K size. | Before (1440p) | After (1440p) | |---|---| | ![HUD before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/hud-before-profile.png) | ![HUD after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/hud-after-ingame.png) | **Settings > Controls.** | Before (1440p) | After (1440p) | 4K reference | |---|---|---| | ![Controls before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-before.png) | ![Controls after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-after.png) | ![Controls 4K](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-4k.png) | **Map.** Before, the cursor sat at 2/3 of the centre. After, it is centred, stays centred after snapping to a point of interest, and selects it. The terrain, the fog and the zone borders match the 4K output. | Before (1440p) | After (1440p) | 4K reference | |---|---|---| | ![Map before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-before.png) | ![Map after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-after.png) | ![Map 4K](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-4k.png) | ## The fix ### `apps/victory/src/native_1440p.rs` Applied with the 1440p patch at a 16:9 2560x1440 output. `VICTORY_UI_SCREEN=0` turns it off. - **Screen size getters.** The interface reads its screen size through two getters (0x4f21f10, 0x4f21f00). They now read the legacy UI size, 3840x2160 at 0xa9438ec, as on the stock 4K output. - **Scaleform buffer.** Scaleform's buffer size, read at 0x13cba73, comes from the [3840.0, 2160.0] constant. Without this, Scaleform drops whatever lies past 2560x1440. - **Menu target size.** The menus read their target's size at 0x53915bc. That read jumps to a cave in int3 padding, which answers 3840x2160 in place of the output's 2560x1440. Any other size passes through unchanged. - **Map cursor, when the map opens.** The cursor's fraction of the screen is turned into interface pixels by a call at 0xb19a4b. That call now goes to a copy of `GetScreenSize` that answers 3840x2160. - **Map cursor, after a snap.** - The cursor's position is its object's +0x140. The interface is bound to it: 0x388fa0 notifies on change. - Its two `GetScreenSizeF` calls (0x2324351, 0x232478d) go to a copy that answers [3840.0, 2160.0], so the bound position is in interface pixels. - The four reads the map's logic makes of it call small stubs that scale it back by 2/3: what lies under the cursor, what is near it, where it points in the world, and the controller's copy. - The stubs live in the int3 padding past the code section's used size (0x5f40970). The file maps that padding with the section. - **Left on the output's size.** `GetScreenSize` itself and the screen size global keep 2560x1440. The map's terrain, its fog of unexplored zones and its zone borders are worked out from them. A 4K run shows all three in the same place as 1440p does. ### `crates/victory-gpu/src/draw.rs` - **Interface viewports.** A viewport of exactly 3840x2160 on a target of at most 2560x1440 is the interface canvas. That viewport and its scissors are scaled onto the output. - **Left alone.** A full-output scissor stays as it is. So does the intro video's own 3840x2160 target, which no longer comes out small. ## Checked - **Tests.** The `native_1440p` tests pass against the retail executable (`VICTORY_DISPLAY_PROFILE_TEST_IMAGE`). - **Pre-existing failures.** In `victory-gpu`, `indirect::tests::host_list_budget_starts_empty_at_each_submission` and `warp_batch_charges_every_execution` fail the same way on `main` without this change. - **In game at 1440p, on this branch, compared with the 4K output:** - profile screen; - intro video; - in-game HUD; - Settings > Controls; - map: cursor, points of interest, fog, zone borders. ## Not covered - **Other outputs.** A 1920x1080 output (Series S, or a 1080p `VICTORY_DISPLAY_MODE`) is unchanged. Issue #98 also mentions it, but it is not the 1440p patch's path. - **Not checked.** - The mouse in menus. - The in-game fps cost. The menus' own fps went from about 440 to about 300 on the profile screen, because Scaleform now renders at its 4K size. - Every other screen. Some may still convert between screen and interface pixels with the output's size. For example, the place names on the map look slightly off in scale. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ZackariaB commented 2026-11-28 12:22:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ZackariaB on 2026-11-28T12:22:53Z.


Closing in favour of #541, which fixes the same problem through the title's own Series S legacy UI path (legacy flag, 3840x2160 layout size, 2560x1440 output in the settings). Every reader of the UI size then agrees, with no per-screen patches and no renderer scaling. Tested here on main 63b902f + #541: menus, HUD and the pause map are right.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7239187281 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/391#issuecomment-7239187281). Originally posted by [ZackariaB](https://github.com/ZackariaB) on 2026-11-28T12:22:53Z. --- Closing in favour of #541, which fixes the same problem through the title's own Series S legacy UI path (legacy flag, 3840x2160 layout size, 2560x1440 output in the settings). Every reader of the UI size then agrees, with no per-screen patches and no renderer scaling. Tested here on main `63b902f` + #541: menus, HUD and the pause map are right.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!391
No description provided.