fidelityfx: switches for the upscaler's own exposure and its pre-exposure #442
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!442
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-442"
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?
@TreXito on GitHub · 2026-12-04 04:28 UTC · original
TreXito:pr/fsr4-exposure→main· +67 −0 · 2 files · 2 commits · merged 2026-12-04 19:36 UTCTwo opt-in switches for the host upscaler. Nothing changes unless they are set.
VICTORY_FSR_AUTO_EXPOSURE=0: the upscaler is made without its own exposure. The title creates it with flags0x29(HDR, inverted depth, own exposure).VICTORY_FSR_PRE_EXPOSURE=<value>: the pre-exposure each upscaling tells the host, in place of the title's 1. The upscaler divides its input by it and multiplies its output by it again, so the picture keeps its level.Why
On an RX 7800 XT, FSR 4's INT8 build made the shade about half as bright as without FSR, or with FSR 3.1 on the same inputs. Sunlit surfaces and sky barely changed. Without the upscaler's own exposure, the shade came back to 80-90%. A pre-exposure of 0.25 on top brought it level with no FSR, which points at the INT8 path losing precision on dark values.
Mean grey (0-255) of four regions of the same spawn view, newest save, ray tracing off, 2560x1440 output:
AUTO_EXPOSURE=0AUTO_EXPOSURE=0,PRE_EXPOSURE=0.25The camera spawns a few degrees apart between runs, so the sky moves by about 3%.
Cost
Release, 300 s standing, two runs per side (ABAB), i5-13600KF, RX 7800 XT,
VICTORY_OUTPUT=2560x1440withVICTORY_FSR_4K=quality(1706x960 to 1440p) and both switches, against no FSR: 25.50 fps vs 26.71 (-4.5%), p10 22.2 vs 23.1, no crashes. It also ran withVICTORY_FRAME_GEN=1andVICTORY_UI_PLANE=3840x2160.FSR 4 on RDNA 3 depends on the Wine runtime
Wine loads its own builtin
amdxc64.dll, not the copysetup.sh fsr4puts insystem32. GE-Proton10-34's builtin checks for wave-matrix support and logsFSR4 not supported on this system!on RDNA 3, so the upscaler stays at 3.1.6. Valve'sexperimental_11.0bridge (auto-enable on Navi 3x, September 2026) upgrades withFSR4_UPGRADE=1and logsReplaced FSR3 with FSR4!underWINEDEBUG=warn+amdxc; the provider then reports 4.1.1.Not checked
RDNA 4 (FP8): whether its shade changes with the upscaler's own exposure is not known, so both switches stay off by default.
Checked
cargo fmt --checkclean for the changed file.pre_exposure=0.25 flags=0x9and gives 146.2 / 22.0 / 16.4 / 21.6 in the table's regions.🤖 Generated with Claude Code
https://claude.ai/code/session_01WNCfbX5dPKJzSkgbf16GX4
@WillyBrown69 on GitHub · 2026-12-04 08:27 UTC · original
This fixes #350 for me, thank you
@Luxuride on GitHub · 2026-12-04 11:28 UTC · original
Clean and small, and the index is right:
settings[3]atcrates/victory-hle/src/modules/fidelityfx.rs:760ispre_exposureper the test's named struct (crates/victory-hle/tests/fidelityfx.rs:96-120),[4]isreset, the0x1b0size assertion is untouched. The mask also lands on the copy that is kept (:463-465before:531), so the first-dispatch log shows the masked 0x9 rather than the title's original, and clearing bit0x20cannot change which dispatches the frame generator treats as temporal (framegen.rs:67keys on0x1e).One nit worth a line: values it ignores are silent —
VICTORY_FSR_AUTO_EXPOSURE=off/false/1andVICTORY_FSR_PRE_EXPOSURE=0/-1/nan.0is the one that will bite, because the sibling switch uses0as "off" whilepre_exposure()rejects it, and the docs row says only "a number above 0" without saying what happens otherwise. A warn line, or one clause in the row, is enough.Both rows would also read better saying they affect the title's own temporal dispatch path only, not every FSR path.
@TreXito on GitHub · 2026-12-04 12:01 UTC · original
Thanks. Addressed in
66ca20c:VICTORY_FSR_AUTO_EXPOSUREvalues other than0(and1) now log a warning instead of passing silently.VICTORY_FSR_PRE_EXPOSURE=0, negative, non-finite and non-numeric values now log a warning that says0does not mean off; the title's value is kept. An empty value still counts as unset.VICTORY_FSR_4K,VICTORY_FSR_HOST), not frame generation, and what happens to ignored values.Checked with a release build, booting with
VICTORY_FSR_AUTO_EXPOSURE=off VICTORY_FSR_PRE_EXPOSURE=0: both warnings are logged once, FSR 4 runs as before, 215 s in the world, no crash.One caveat I found after opening this, now noted in the pre-exposure row. With AMD frame generation on (
VICTORY_FIDELITYFX_FRAMEGEN=1), the shade still came out at about 45% in 4 of 5 runs, even with both switches. That is the same level as without them.VICTORY_BVH_BUILDER=0.@WillyBrown69 good to hear. I haven't linked #350, since that report doesn't say which upscaler it uses.
AI-assisted: yes
@danfq on GitHub · 2026-12-05 21:15 UTC · original
A data point from an RX 7600 XT (RDNA 3, FSR 4.1.2, 1280x720 to 1920x1080, xmem
b581f7e, ray tracing off at the time):VICTORY_FSR_AUTO_EXPOSURE=0withVICTORY_FSR_PRE_EXPOSURE=0.25: in daylight, the highlights clipped to white (a sunlit patch of road, a white pickup, white clothes), while the shade stayed dark.VICTORY_FSR_AUTO_EXPOSURE=0alone: the highlights kept their detail and the picture looked balanced. That's the one I kept.So 0.25 doesn't seem to carry over to every card or scene. It may be worth noting next to the setting that the pre-exposure value depends on the card. Both runs were in daylight at different spots and judged by eye from screenshots, so I have no brightness numbers to add.