resolution: 4K interface plane at 2560x1440 (VICTORY_UI_PLANE) #63
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/lobomfz--VIctory-xmem!63
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-63"
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?
@MathiewMay on GitHub · 2026-12-01 11:40 UTC · original
MathiewMay:fix/ui-plane-1440p→main· +240 −2 · 2 files · 2 commits · closed without mergingRefs #24. Complements #52.
At
VICTORY_OUTPUT=2560x1440the title's HUD and menus are drawn half again too large: the minimap and money are oversized, and in Settings → Controller the diagram and its callouts run into the settings list while the button prompts overlap. At 1920x1080 it is about twice too large. At 3840x2160 output everything is right, and so is the 3D scene at every size.Cause
On the Series X path the title lays its interface out one to one on a 3840x2160 canvas and has no scale for smaller ones. Its Scaleform movie views map one stage unit to one screen pixel; at 2560x1440 the visible stage is 51200x28800 twips, i.e. 2560x1440 px. Layout code anchors to the real stage edges, so things stay at the edges but are too large. The title never scales element sizes with the output: no global goes from 1.0 at 4K to 0.667 at 1440p.
These don't change it: render scale (native 1440p looks the same), the title's
hdtest (+0x274ba10, width > 1920 or height > 1080), the display mode reported to it (VICTORY_DISPLAY_MODE), anduiOverlay/uiResolutioninsettings.xml. The device is made from the settings' defaults before the file is read, and the file's values for these two never reach the live settings.Change
VICTORY_UI_PLANE=<w>x<h>(one of the title's modes;3840x2160is the one it is laid out for) gives the title the interface plane it has on Series S. The plane is drawn at that size, presented as a second plane and composed over the scene byvictory_gpu::compose. The scene stays atVICTORY_OUTPUT. Without the switch nothing changes. Like every other site, each one is compared byte for byte first.mov rax, stub ; jmp rax. The stub does the title's own store (1920x1080 at +0x204), thenuiResolution(+0x1ec) anduiOverlay(+0x1e8 = 1). The device then copies them (+0x1e0fb30 → +0xa9438ec..+0xa9438f4), the interface size cache +0x92d7924 takes the plane size (+0x1de4030), and +0x5eb2590 makes the planes beside the back buffers.mov ecx, 64 MiB). It is sized for two back buffers of the output plus two interface planes, with 16 MiB to spare, in 16 MiB steps: 112 MiB at 2560x1440 with a 4K plane. Series S's 82 MiB (#52) holds a 1080p scene with a 4K plane (about 79 MiB), but not a 1440p one (2 x 14.06 + 2 x 31.69 = 91.5 MiB), which is why #52 leaves 2560x1440 out.How this relates to #52: #52 turns the plane on by default at 1080p with the Series S pool and writes the plane fields in the output block. This one is opt-in at any output size, sizes the pool from the output, and patches the defaults instead. Both use the name
VICTORY_UI_PLANE(#52:0/1; here: a size). I'm happy to align them: rebase onto #52, or make #52's plane usepool_size()so it covers 1440p.Testing
cargo build --releaseforx86_64-pc-windows-msvcpasses.resolutiontests pass under Wine: all 6, including the newthe_interface_plane_codes.VICTORY_OUTPUT=2560x1440,VICTORY_RENDER_SCALE=0.75,CONSOLE=series-x,VICTORY_UI_PLANE=3840x2160:the back buffers' pool size (112 MiB),the settings' defaults (interface plane) (interface plane 3840x2160)andthe title presents more than one plane planes=2 … second_known=true;uiOverlay=1,uiResolution=3840x2160and the interface cache 3840x2160 after the settings file has loaded;Not tested: 1080p and 720p with this sizing, the Series S profile, and triple buffering. The pool assumes double buffering, as the title's settings have it; triple buffering would need about 137 MiB at 1440p.
@coil111 on GitHub · 2026-12-01 13:44 UTC · original
With
VICTORY_FSR_4Kthe plane is not made:run.rsskipsapply_askedon the FSR path (fsr.is_none()), and running it there would also applyVICTORY_OUTPUT(2560x1440 by default) over FSR's 4K output.The patch below moves the plane's sites into
push_ui_plane(and the write loop intowrite_all), whichapply_askeduses as before, and addsapply_ui_plane(base, size, output), which the FSR path calls with 3840x2160.apply_askedbehaves as before. #52/#60 did the same for the 1080p plane.Tested at
VICTORY_FSR_4K=performance,VICTORY_UI_PLANE=3840x2160, Series X, RX 9070 XT: the three sites patch (pool 144 MiB for a 4K output and a 4K plane),the title presents more than one plane planes=2, the HUD at its normal size. It is what lets frame generation (#68) keep the HUD out of the interpolation at FSR 4K.resolutiontests pass under Wine (6).Apply on this branch with
git apply:@MathiewMay on GitHub · 2026-12-01 17:13 UTC · original
Thanks @coil111, applied as
d5a9832with you as co-author. The patch went on cleanly, and the result matches your post-image blobs.Here,
cargo build --release -p victoryforx86_64-pc-windows-msvcpasses and theresolutiontests pass under Wine (6).apply_askedis unchanged, so the 2560x1440 path works as tested before. I couldn't test the FSR 4K path myself, so that part rests on your run.@Luxuride on GitHub · 2026-12-04 12:03 UTC · original · edited 2026-12-05 11:24 UTC
As I read it, this is already in
main: both commits are patch-identical to main (b2ab26b→e949bdb,d5a9832→3f7cddd), and main has since made this a superset —crates/victory-loader/src/resolution/ui_plane.rs(953e0bb"enable 4K interface plane at 1080p by default",7156c9e"size the display pool once for an explicit UI plane"), plusVICTORY_UI_PLANE_720and the framegen path (ed52726,b76f277).There is no defect in the patch — it has a real test (
the_interface_plane_codes) — it is simply older than what runs.VICTORY_UI_PLANEis documented indocs/SETTINGS.mdandrun.conf.defaulton main.If the shipped
ui_plane.rsmisses a case theVirtualAlloc-stub version handled, that is worth an issue against it; it is not worth rebasing 385 commits.Whether it still has work of its own is the maintainer's call, not mine.
Pull request closed