Add MVFG, a motion-vector frame generator for any GPU #98
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/gamingwithhomie--larp!98
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-98"
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?
@Omnicrash on GitHub · 2026-12-05 18:22 UTC · original
Omnicrash:mvfg-pr→main· +1144 −17 · 13 files · 1 commits · merged 2026-12-05 19:00 UTCThis adds MVFG, a motion-vector frame generator, as a third option next to DLSS FG and FSR FG. It runs on any GPU up to 4x.
The interesting part isn't the generator itself, it's the cleanup. A naive motion-vector FG looks pretty rough in this game, so most of the effort went into hunting down artifacts one by one.
Artifacts it fixes
We originally wrote this for the PS5 version and tuned it there with a small simulator: it rebuilds a real frame from its neighbors and scores the result against the actual frame. Every fix below was checked against that score and in-game.
The HUD and menus are never generated. larp already composites the UI plane on top of every frame, so they stay sharp.
You can turn most fixes off to compare, with
LARP_MVFG_OFF=and a comma-separated list:noshadenogapnoedgenofringenocorenobothThe car, poles and subtitles fixes are always on. There's also
mvflip, which flips the motion vectors for debugging.Usage
In the F10 menu, set Frame generator to MVFG and pick 2x, 3x or 4x. Or start with
LARP_FRAME_GENERATOR=mvfg.How it works
Seven compute passes per generated frame:
Thresholds use the same units as on the PS5, 0-255 in display encoding (PQ for float HDR), so the tuned numbers carry over as they are.
Files
crates/larp-gpu/src/mvfg.rs,mvfg.hlsl: the generator. The shaders compile at runtime withD3DCompile(cs_5_1).crates/larp-gpu/src/dlssfg.rs: hooks MVFG in as a third generator, with up to 3 generated frames.Testing
Tested on an RTX 3090 on Windows 11, in Series S mode at 1080p with DLSS Performance: 30 fps with MVFG 2x at 60 locked, in HDR10.
Not tried on PC yet: 3x and 4x, the FSR upscaler, SDR, and float HDR output. The code is there.