Draw supported menus and HUD at output resolution with DLSS and FSR3/4 #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "MilqueAndToast/fe3h-recomp:codex/dlss-output-resolution-ui"
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?
Not much of a dev but I have a codex sub and want to play through this with proper temporal upscaling. I'll have codex take it from here.
Codex here, posting for MilqueAndToast.
What this changes and why
Below Native, fine lettering and HUD icons can soften when the scene is upscaled. This builds on Jack’s temporal upscaler integration. With
LARECOMP_OUTPUT_UI=1set before launch, supported menus, text, and HUD elements are drawn at display resolution after DLSS or FSR3/4 reconstructs the scene. Leave the variable unset or set it to0for the current upstream behavior.The scene still renders at the selected quality. Supported overlays keep their draw order and depth tests. Extra color and depth buffers cost memory and rendering time. On the FSR path, menus start using display resolution after the first successful scene reconstruction. FSR provider selection, retry behavior, and the decision to enter temporal post-processing follow upstream.
Earlier DLSS Quality comparison
These crops show the same equipment row in the prologue battle on an earlier build, rendering at 1707 × 960 for a 2560 × 1440 display. Look at the “Iron Sword” lettering and the edge of the sword icon.
Existing UI path (default in this revision)
Display-resolution UI (opt-in in this revision)
Tested on
0d1c3191. Both kept the existing UI path with it unset or set to0. Checks covered the chapter intro and prologue battle, including unit markers and portraits.make test-modspassed. Actual FSR4 rendering still needs testing on compatible AMD hardware.Currently working toward
The RX 9070 retest confirmed why the monastery calendar stays on the legacy UI path with FSR4 Quality. The driver can read the game’s depth/stencil format as a blit source, but it can’t write to that format as a blit destination. RX 9070 retest
We’re testing a local shader fallback that copies both depth and stencil up to display resolution for UI rendering and back to the game’s internal resolution before the game reuses them. It uses one draw on devices that support stencil export, with a nine-draw fallback for devices that need it. Devices that support the existing blit continue to use it by default.We’re checking known depth and stencil values in each direction, offscreen rendering, and frame-time cost. The RTX 3070 lets us compare the existing blit with the forced nine-draw path. An Intel GPU with the same missing blit capability lets us exercise automatic selection of the one-draw path. The shader fallback is still local, and RX 9070 gameplay verification remains pending.Developed with Codex assistance. Contributed under the project’s MIT license.
WIP: Draw supported menus and HUD at output resolution with DLSSto WIP: Draw supported menus and HUD at output resolution with DLSS and temporal FSRWIP: Draw supported menus and HUD at output resolution with DLSS and temporal FSRto WIP: Draw supported menus and HUD at output resolution with DLSS and FSR3/4Thanks a lot for this, and for the clear write-up and the comparison crops. Sharp menus below Native is exactly what was missing after the temporal upscalers went in, and the approach (drawing the UI after the cut into output-size targets) is the one I'd hoped for.
A few things before it can go in:
Opt-in for now. New defaults only go live where they've been tested, and so far that's DLSS and FSR 3 on one NVIDIA card. Could you flip it so
LARECOMP_OUTPUT_UI=1turns it on and the default stays the current behaviour? I'll test it myself on AMD (RX 9070, FSR 3 / 4) and on an RTX 3050 Ti laptop (DLSS), and once it's been seen working we can make it the default per vendor.Please split out the FSR provider / fallback changes. The PR also changes how FSR 4 vs FSR 3 is chosen, makes any failed FSR dispatch fall back to FSR 1 until restart, and sends every frame through the temporal path when FSR 3 or DLSS is chosen but unavailable (the
post_processcondition). Those affect every FSR player even with the new UI path off, and they touch fixes we only recently validated (quality changes, a Radeon 6800 XT where AMD's DLL offers FSR 4). A separate PR lets me test them on their own.Docs. I'd rather not add
docs/OUTPUT-RESOLUTION-UI.md: I'll fold the important points (limits, the switch, the fallback reasons in the log) into the project notes. The Upscaler quality text in the menu is read by players, so something simpler would be better, e.g. "With these upscalers, menus and text are drawn at your display's resolution."Thanks again!
Sounds good. I'll try to rein in the docs in future contributions, I've noticed it likes to make and share technical docs about everything. I imagine if they're important enough (and not player-facing) it can just attach them to the PR post itself.
A minor thing, but I'm assuming it titled it
LARECOMP_OUTPUT_UIin reference to the original Link's Awakening project. Would you rather it be something else likeFERECOMPorFE3HRECOMP?922942f1a0to0d1c3193b8Codex here, posting for MilqueAndToast.
Thanks for the review. I’ve updated the draft at
0d1c319against the currentfe3h.LARECOMP_OUTPUT_UI=1before launching to try it. Leaving it unset or setting it to0keeps the current behavior.post_processcondition now match upstream.On an RTX 3070, DLSS Quality and FSR 3.1.6 Quality both drew supported menus and battle HUD elements at 2560 × 1440 with the scene at 1707 × 960. Both passed the unset and
0checks. FSR3 stayed on the existing menu path until the first successful scene reconstruction. We also tested an injected FSR failure and recovery from losing FSR availability while the UI target was active. The build andmake test-modspassed.WIP: Draw supported menus and HUD at output resolution with DLSS and FSR3/4to Draw supported menus and HUD at output resolution with DLSS and FSR3/4Thanks, this is exactly what I asked for. Two small things:
LARECOMP_name: all the project’s switches use that prefix (it comes from LAS Recomp), and testers already know it.I’ll test it on the RX 9070 (FSR 3 / 4) and the RTX 3050 Ti laptop (DLSS) and report back here.
@MilqueAndToast Tested on AMD: RX 9070, driver 26.8.1, 2560 × 1440, FSR 4 at Quality and Performance,
LARECOMP_OUTPUT_UI=1. FSR 4 itself runs fine (60 fps), but the UI stays on the old path: the overlay showsUI legacy: depth size, format or slot limiton the monastery calendar menu (screenshots attached).The log has no
[output-ui] post-cutormenuline in a 4.5-minute session: it falls back from the first FSR 4 frame onward, every frame, which points to the format check rather than the slot limit.Likely cause: on AMD the game’s depth24/stencil8 targets are D32_SFLOAT_S8_UINT (the log says
depth24 stencil8: D32_SFLOAT_S8_UINT), since AMD has no D24S8.ui_blittablerequiresBLIT_DSTfor the depth format, and Vulkan doesn’t require that for depth/stencil formats. As far as I know AMD’s driver doesn’t offer it, while NVIDIA’s D24S8 does, which would explain why it worked on your 3070. Not proven yet: the fallback reason covers four checks.Two requests:
BLIT_DST, the depth copy needs another way on AMD, for example a fullscreen pass that writes depth (and stencil throughVK_EXT_shader_stencil_export, which AMD supports) instead of a blit.I’ll test the next revision on the RX 9070 again.
Draw supported menus and HUD at output resolution with DLSS and FSR3/4to WIP: Draw supported menus and HUD at output resolution with DLSS and FSR3/4It's telling that I didn't realize that it made that unnecessary menu change in the first place. I'll have to work on a system for preventing that.
Codex here.
Thanks for testing on the RX 9070. Commit
4872442restores the original Upscaler quality tooltip and keepsLARECOMP_OUTPUT_UI=1. The overlay and log now identify the depth check that caused the fallback. If the format lacks a blit capability, the message includes the Vulkan format and namesBLIT_SRC,BLIT_DST, or both.Thanks for offering to retest on the RX 9070. This revision is ready when you are.
I'm planning on looking into this edge shimmer next.I'm realizing after the fact that most of this should be in a separate issue, lol my mistake.
Codex here. The shimmer comparison and investigation are now tracked in #9.
@MilqueAndToast Retested on the RX 9070 (driver 26.8.1, FSR 4 Quality,
LARECOMP_OUTPUT_UI=1) with4872442: the new message confirms it.[output-ui] legacy fallback: depth VkFormat 130 missing BLIT_DST. That’s the only reason in the log, from the first FSR 4 frame on (screenshot attached). The original menu text is back too, thanks.So on AMD, D32_SFLOAT_S8_UINT can’t be a blit destination. Note that the PR blits depth both ways: up into the output-size copy (
ui_blit(d, &ui.ds[i]), and on reload when stale) and back down into the game’s depth (ui_sync, and before offscreen passes). Both directions write into format 130, so both need another way on AMD. One option is a fullscreen pass that samples the source depth and writesgl_FragDepth, with stencil written throughVK_EXT_shader_stencil_export(or a stencil-only pass per value if that’s simpler). It’s probably best to keep the blit whereBLIT_DSTis offered and use the pass only where it isn’t, so the NVIDIA path you’ve tested stays as it is.The edge shimmer you described happens with the feature off too, so could you open a separate issue for it? That keeps this PR to the UI change.
Codex here.
Thanks for pinning down the missing
BLIT_DSTon the RX 9070 and pointing out the copy back into the game’s depth image.7878ad2covers both directions and is ready for your FSR4 Quality retest on the monastery calendar.We seeded the two copy directions with different patterns and read the results back from the GPU. Every depth value and stencil byte matched on all four paths we tested. The RTX 3070 passed with its normal blit and with the nine-draw fallback forced. The Intel UHD 770 automatically selected single-draw stencil export on format 130, where its driver also lacks
BLIT_DST. It also passed with stencil export disabled. An offscreen write followed by a reload preserved the newer game depth and stencil. The isolated tests reported zero Vulkan validation errors.In the prologue battle at 1440p DLSS Quality on the RTX 3070, forcing the nine-draw fallback raised average GPU work from 7.07 to 7.29 ms per frame over 1,440 warmed frames per path. Both averaged 16.74 ms between presented frames at the 60 FPS cap. The full-game runs reported the same three Vulkan validation IDs with identical counts on both paths. We haven’t measured the single-draw path’s gameplay cost on Radeon.
@MilqueAndToast Tested and merging, thanks! RX 9070 (driver 26.8.1, 1440p, FSR 4 Quality/Performance): shader stencil-export depth copy, menus and HUD at 2560 × 1440, battles, return to the start screen, 60 fps. RTX 3050 Ti laptop (driver 621.01, 1080p, DLSS Quality): blit path, same results. It stays opt-in (
LARECOMP_OUTPUT_UI=1) for this release.One thing for later, on the RTX 3050 Ti: at one point the game copied from the promoted image and the frame fell back (
legacy fallback: copy from promoted attachment, repeated for a couple of seconds). The fallback worked as designed, but if you want to look at it, that’s the case to support. It didn’t show on the AMD run.Separately: we found and fixed the edge flicker that showed with all temporal upscalers (jitter moved the viewport’s clip edges, plus a 1706.67-vs-1707 scale mismatch). That’s in
fe3hnow, in case you were seeing it while testing #9.WIP: Draw supported menus and HUD at output resolution with DLSS and FSR3/4to Draw supported menus and HUD at output resolution with DLSS and FSR3/4