present: VICTORY_PILLARBOX=1 draws black bars in full screen on screens that are not 16:9 #139

Manually merged
github merged 2 commits from github-bot/gh-139 into gh-pr/139/base 2026-12-02 02:49:43 +00:00 AGit
Owner

@⁠ARustyOven on GitHub · 2026-12-02 00:14 UTC · original
ARustyOven:feat/pillarbox-fullscreen → main · +467 −11 · 6 files · 2 commits · merged 2026-12-02 02:44 UTC

Black bars for full screen on ultrawide (and 16:10) screens

With VICTORY_FULLSCREEN=1 (from #7) the window covers the screen, but the swap chain stays the size of the title's 16:9 frame, and the presentation layer stretches it to fill the window. On a 21:9 or 32:9 monitor the image is stretched sideways. This happens when VICTORY_FULLSCREEN_RES isn't set, or is set to the monitor's own resolution. The image only ends up on the left side when VICTORY_FULLSCREEN_RES is set smaller than the monitor, because the window itself is then smaller and sits in the top left corner.

With VICTORY_PILLARBOX=1 the swap chain is made the window's size, and the frame is drawn into the largest 16:9 rectangle at the centre, with the rest cleared to black: bars at the sides on ultrawide screens, above and below on 16:10.

Setting Effect
VICTORY_FULLSCREEN=1 VICTORY_PILLARBOX=1 Borderless full screen, frame centred with black bars

The performance overlay is no longer stretched

The frame-rate panel is now drawn on the window-sized back buffer, after the frame is placed. So with VICTORY_PILLARBOX=1 it keeps its proportions on an ultrawide screen too, where it used to be stretched along with the frame.

Its sizes still describe the title's frame, not the window: at the default 2560x1440 output it shows 1706x960 -> 2560x1440, not 2293x960 -> 3440x1440, since the black bars are neither rendered nor upscaled. The panel is laid out at the window's size but given the frame's size for what it reports.

Notes

  • Off by default. The window-sized swap chain uses more video memory (about 40 MB at 3440x1440), so it only turns on when both variables are set.
  • Files: crates/victory-gpu/src/pillarbox.rs holds the fit maths and a small shader. In host.rs the presenter uses it in place of CopyResource and checks the window's size each frame, so a resize is picked up.
  • Not used with FidelityFX frame generation or the Series S two-plane presentation. Those are presented as before. If the frame's format can't be drawn this way, or the shader fails, it logs a warning and falls back to the old copy.
  • Testing: the fit maths has unit tests (cargo test -p victory-gpu --lib pillarbox). Tested in game on an ultrawide monitor: the frame is centred with black bars instead of stretched, the overlay is no longer stretched, and its render and output sizes leave out the bars.

🤖 Generated with Claude Code

**@⁠ARustyOven** on GitHub · 2026-12-02 00:14 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/139) `ARustyOven:feat/pillarbox-fullscreen` → `main` · +467 −11 · 6 files · 2 commits · merged 2026-12-02 02:44 UTC ### Black bars for full screen on ultrawide (and 16:10) screens With `VICTORY_FULLSCREEN=1` (from #7) the window covers the screen, but the swap chain stays the size of the title's 16:9 frame, and the presentation layer stretches it to fill the window. On a 21:9 or 32:9 monitor the image is stretched sideways. This happens when `VICTORY_FULLSCREEN_RES` isn't set, or is set to the monitor's own resolution. The image only ends up on the left side when `VICTORY_FULLSCREEN_RES` is set smaller than the monitor, because the window itself is then smaller and sits in the top left corner. With `VICTORY_PILLARBOX=1` the swap chain is made the window's size, and the frame is drawn into the largest 16:9 rectangle at the centre, with the rest cleared to black: bars at the sides on ultrawide screens, above and below on 16:10. | Setting | Effect | |---------|--------| | `VICTORY_FULLSCREEN=1` `VICTORY_PILLARBOX=1` | Borderless full screen, frame centred with black bars | #### The performance overlay is no longer stretched The frame-rate panel is now drawn on the window-sized back buffer, after the frame is placed. So with `VICTORY_PILLARBOX=1` it keeps its proportions on an ultrawide screen too, where it used to be stretched along with the frame. Its sizes still describe the title's frame, not the window: at the default 2560x1440 output it shows `1706x960 -> 2560x1440`, not `2293x960 -> 3440x1440`, since the black bars are neither rendered nor upscaled. The panel is laid out at the window's size but given the frame's size for what it reports. #### Notes - **Off by default.** The window-sized swap chain uses more video memory (about 40 MB at 3440x1440), so it only turns on when both variables are set. - **Files:** `crates/victory-gpu/src/pillarbox.rs` holds the fit maths and a small shader. In `host.rs` the presenter uses it in place of `CopyResource` and checks the window's size each frame, so a resize is picked up. - **Not used with** FidelityFX frame generation or the Series S two-plane presentation. Those are presented as before. If the frame's format can't be drawn this way, or the shader fails, it logs a warning and falls back to the old copy. - **Testing:** the fit maths has unit tests (`cargo test -p victory-gpu --lib pillarbox`). Tested in game on an ultrawide monitor: the frame is centred with black bars instead of stretched, the overlay is no longer stretched, and its render and output sizes leave out the bars. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_FULLSCREEN=1 the window covers the screen, but the swap chain
stayed the size of the title's 16:9 frame, so on an ultrawide monitor the
frame sat in the top left corner. With VICTORY_PILLARBOX=1 the swap chain is
made the window's size and the frame is drawn into the largest rectangle of
its own shape at the centre, the rest black. The frame-rate panel is drawn at
the window's size too, so it is no longer stretched.

Off by default: the window-sized swap chain takes more video memory (about
40 MB at 3440x1440). Not used with FidelityFX frame generation or the
two-plane (Series S) presentation; those are presented as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 00:15:48 +00:00
Author
Owner

@⁠ARustyOven on GitHub · 2026-12-02 02:07 UTC · original

Hold off from merging. Adding a fix where the performance overlay correctly shows the resolution that is being rendered.

**@⁠ARustyOven** on GitHub · 2026-12-02 02:07 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/139#issuecomment-7332494310) Hold off from merging. Adding a fix where the performance overlay correctly shows the resolution that is being rendered.
With VICTORY_PILLARBOX=1 the panel is drawn at the window's size, and it
took that as the output: at 3440x1440 it showed 2293x960 -> 3440x1440,
sizes the title never renders at. The panel is still laid out at the size
it is drawn on, but its output and render sizes now come from the title's
frame (1706x960 -> 2560x1440 at the default output and scale).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠ARustyOven on GitHub · 2026-12-02 02:15 UTC · original

Fix is now implemented. Performance overlay no longer includes the pillarbox in the resolution output.

**@⁠ARustyOven** on GitHub · 2026-12-02 02:15 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/139#issuecomment-7332635464) Fix is now implemented. Performance overlay no longer includes the pillarbox in the resolution output.
github-bot referenced this pull request from a commit 2026-12-02 02:49:37 +00:00
github-bot changed target branch from main to gh-pr/139/base 2026-12-02 02:49:38 +00:00
github manually merged commit 6d11ce7174 into gh-pr/139/base 2026-12-02 02:49:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.