loader: interface by its root size below 4K (fixes phone screen, nearby missions, map icons) #50
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!50
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-49"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@GiovanniFadanelli on GitHub · 2026-12-04 16:53 UTC · original
GiovanniFadanelli:fix/ui-root-size-below-4k→main· +126 −1 · 1 files · 1 commits · merged 2026-12-05 09:27 UTCSummary
Fixes the interface below 4K output (e.g.
VICTORY_OUTPUT=2560x1440): with thefwuilayout scale from36ea0e5the HUD was the right size, but the phone screen's content was drawn in the top-left two thirds of the phone (the rest black) and the nearby-missions markers (hold D-pad down) were out of place.Change
crates/victory-loader/src/resolution.rs, no new switch, Series S mode (own interface) unchanged:2160 / height(3840x2160 at 2560x1440). The title then lays its whole interface out as at 4K, draws it into a target of that size and scales that target to the output itself, so every part stays in proportion, including the phone and the 3D-anchored markers. Thefwuiscale patches are not written in that case; the pause-map cursor patches still are.+0x18instead of+0x30) so the map is not rebuilt every update.Every site is compared byte for byte before it is written, as the other resolution patches are. Unit tests check the new displacements.
Test plan
cargo clippy --locked -p victory-loader --all-targets -- -D warningscargo build --release --locked -p victorycargo test --locked -p victory-loader -- --test-threads=1🤖 Generated with Claude Code
@pew404 on GitHub · 2026-12-05 03:57 UTC · original
Tested on 1920x1080 output, which the PR description does not cover (it was checked at 2560x1440).
Build: this branch (
b84ce67), built from source, launched from the launcher UI.RX 9060 XT 16 GB / Ryzen 5 5600 / 32 GB / Windows 11. Series X, output 1920x1080, FSR 4.1.2 Quality, Frame Gen off. ~17 min of play.
Log shows the new patches applied: UI root size 3840x2160, screen map width/height/size check from the output, pause-map cursor patches at 1920x1080.
Checked by eye, all correct:
Before this PR (v0.3.0, Series X, 1920x1080 output) the HUD was drawn about 2x too large.
Performance in the same run: median 23.8 fps (p10 18.5, p90 30.0, 30 fps cap), no errors in the log.
Works on 1920x1080 for me.
@MiguelAlexS on GitHub · 2026-12-05 12:28 UTC · original
On
mainata6b5a99(v0.6.0) the interface below 4K output is cut off for me: at 2560x1440 the pause menu, pause map, weapon wheel and loading screens end at 1706x960, i.e. two thirds of the screen, and the rest of the UI is missing (the world renders full screen behind it). It looks like the UI is laid out at 3840x2160 and scaled by 2/3, but only the top-left 2560x1440 of the 4K-sized UI target is drawn.Setup: RX 9070 XT, Windows 11, built from source at
a6b5a99, launcher, Series X, output 2560x1440, FSR 4.1.2 Native AA, PC quality, ray tracing off.Log, all as expected:
resolution: patched site=0x1de410a what="UI root size (the UI's layout size)" value="3840x2160"2560x1440 (inv=1.5000)Ruled out:
VICTORY_THIN_SPLIT(toggled off live, still cut); the FSR profile patches only change the render scale.This PR was tested on its base
01852c0; main has many GPU/loader commits since then, so it may be an interaction with something merged afterwards. At 3840x2160 output everything is fine.@gopinet on GitHub · 2026-12-05 17:13 UTC · original
Adding a data point to @MiguelAlexS's report above, same setup family (2560x1440 output, FSR 4.1.2 Native AA): here the gameplay HUD is missing altogether with Native AA, and comes back with the Quality preset.
Setup: RX 9060 XT 16 GB (driver 32.0.32029.2010), i5-12400F, 32 GB, Windows 11. Series X,
VICTORY_OUTPUT=2560x1440, ray tracing off, frame generation off, launched withscripts\play.ps1(diagnostics build). Same save, same scripted input in all three runs (walk a few steps, open the phone with D-pad up), 3 minutes each.8f78f14(before this PR)nativea6b5a99(with this PR)nativea6b5a99(with this PR)qualitySo the phone fix works at 1440p in both presets, but with render size == output size the HUD plane does not reach the screen. With
qualityeverything is right by eye.The logs of the two
a6b5a99runs differ only in the preset (preset="native" quality=0 scale=1.0,expected_render=[2560, 1440] output=[2560, 1440]against the quality sizes). Both show the same patched sites:resolution: patched site=0x1de410a what="UI root size (the UI's layout size)" value="3840x2160"2560x1440 (inv=1.5000)The HUD is also missing in longer
nativesessions at 1440p with ray tracing on, so it does not depend on that. Not checked here: 1920x1080 output withnative, pause menu and map (the cut-off described above).One caveat on the build: my
a6b5a99runs were built with the open PRs #43, #117, #113 and #103 merged on top (VICTORY_THIN_ORDERoff,VICTORY_TRIM_BELOW_MBunset); none of them touchesvictory-loaderor presentation. I am looking for the cause locally and will post it here if I find it.cc @GiovanniFadanelli
@MiguelAlexS on GitHub · 2026-12-05 18:45 UTC · original
Follow-up to my report above, after @gopinet's table: the preset decides it here too. Same build (
a6b5a99), same setup, output 2560x1440, only the FSR preset changed from Native AA to Quality (expected_render=[1706, 960] output=[2560, 1440]):The log shows the same patched sites as the Native AA run (
UI root size … 3840x2160, pause-map cursor patches at2560x1440 (inv=1.5000)), so the difference is only render size == output size. With Native AA the UI ends at 1706x960 for me (the pause menu and map cut off, HUD drawn), with Quality it is whole. So both reports look like the same bug: with Native AA the UI plane is composited at the wrong size or not at all.Correction to my report: "the FSR profile patches only change the render scale" was wrong, the preset is what triggers it.
@gopinet on GitHub · 2026-12-05 19:06 UTC · original
Found the cause locally, and a small fix that works here. Thanks @MiguelAlexS for the Quality run: your "ends at 1706x960" is exactly the fraction this predicts.
Cause. With this PR the UI root size is 3840x2160 below 4K output, so the title draws its interface into a 3840x2160 colour target. But the title only makes the interface's own depth-stencil (at the root size) when the render size differs from the output size. When they are equal (Native AA), two twin checks take the other branch:
title+0x1edb9ec: the own depth-stencil is not made (mov eax,[output width]; cmp eax,[render width]; jne <make it>… same for the heights)title+0x31a7b0: the getter hands out the scene's depth-stencil, which has the render size, in place of the interface's own ([+0x7665cb0])Every interface draw then has a 3840x2160 colour target with a 2560x1440 depth-stencil, and only the common top-left corner is drawn: output/root = two thirds at 1440p (1706x960 on screen), one half at 1080p. The minimap and button prompts sit outside that corner, which is the "HUD missing" I reported; the pause menu and map are cut at two thirds, which is the other report. With Quality the render size differs from the output, the own depth-stencil exists, and everything is whole.
Measured (frame captures of the interface pass in menus/loading screens at 2560x1440 output, diagnostics build):
a6b5a99a6b5a992560x1440depth-stencil3840x2160depth-stencilViewport and scissor are 3840x2160 in all three. Read statically in the title image: the two checks and the sizes the two depth-stencils are made with. Assumed, not verified with the debug layer: that the clipping itself comes from the colour/depth size mismatch.
Fix tried here. Two one-byte in-memory patches, written only when the UI root size is written (output under 2160 lines) and both sites match their bytes:
title+0x1edb9f8:75 24→eb 24(make the interface's own depth-stencil whatever the render size)title+0x31a7bc:75 24→eb 24(hand it out whatever the render size)Both are the first
jneof each check, right aftercmp eax, [+0x99fecf8](render width). All incrates/victory-loader/src/resolution.rs, next to the UI root site; nothing else changes, and nothing at 4K or on Series S.Result (RX 9060 XT 16 GB, i5-12400F, Series X, frame generation off, 3-minute runs, no errors in the logs):
Cost: one more depth-stencil, about 40 MB of VRAM; frame rate unchanged.
Not tested: pause menu, pause map and weapon wheel with the fix (the cut-off @MiguelAlexS saw; by the mechanism they should be whole, but I have not looked), other output sizes and ultrawide, long sessions. Same build caveat as my previous comment (open PRs #43, #117, #113, #103 on top of
a6b5a99).cc @GiovanniFadanelli @ReTerryDavis