FSR 3 frame generation: fix smearing at the screen edges and behind the player's vehicle #588
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!588
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-588"
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?
@c0ldpiston on GitHub · 2026-12-05 13:16 UTC · original
c0ldpiston:main→main· +1600 −19 · 14 files · 2 commits · openTwo fixes to the built-in FSR 3.1 frame generator (
VICTORY_FIDELITYFX_FRAMEGEN=1, or4after it falls back to FSR 3.1). We patch AMD's own interpolation pass, build it from the FidelityFX SDK source and swap it in at runtime. The driver's ML generator (FSR 4, mode4) is never touched.Both fixes are on by default once
./setup.sh fsr4has built the shaders, and each can be turned off on its own.1. Edge fade (
VICTORY_FIDELITYFX_FRAMEGEN_FIX_EDGE)Near a screen edge, the half-way warp samples outside the frame, so while the camera moves AMD's interpolation smears or inpaints a band along that edge.
patches/fsr3-edge-fade.patchaddsComputeGenerationEdgeFade. Where the warp distance reaches the edge, it blends the generated frame toward the current frame over at most 12 px. A border that isn't moving is left as it is.setup.sh fsr4fetches the FidelityFX SDK v2.4.0 source once, pinned to a revision. It only needs theapiandframegeneration/fsr3folders. It also fetches the Linux DXC, andtools/build-fsr3-framegen.shuses both to buildfsr4/fg-edge/interpolation.dxil. The build is stamped, so it only runs again when DXC, the SDK revision, the patches or the tools change.framegen::edgehooks the host device up front, because the device is created before the frame-generation DLL loads. When the FSR 3.1 generator is created, the hook finds the DLL's interpolation pass by DXBC checksum and swaps in the patched shader, keeping AMD's root signature.replay/hook.rsmoves tocrate::hookso release builds can use it too.2. Vehicle mask (
VICTORY_FIDELITYFX_FRAMEGEN_FIX_VEHICLE)Behind the chase-camera vehicle, the interpolation warps the road the vehicle uncovers and smears or ghosts the vehicle's tail across it, worst while swerving.
framegen::vehiclefinds the player's vehicle on each render frame (tools/fsr3-vehicle-mask.hlsl). The title's stencil gives the player's vehicle the same class as traffic (0x42body,0x41person,0x40other), so the shader combines that class with what only the player's vehicle has: it stays near the same screen spot, barely moves between real frames, and sits at about the same depth.CSNearestCSMarkCSRows/CSColumns0x40runs with no depth jump over 4% between neighbours. The mask reaches the far end of a yawing vehicle and its rider, but not traffic that touches it on screen.CSFieldpatches/fsr3-vehicle-mask.patchreads the mask in the disocclusion pass and tags pixels the vehicle covers or uncovers. Interpolation shows the current frame on those pixels and blends toward it next to them by distance, so the vehicle's shadow stays with it.The vehicle patch applies on top of the edge-fade patch. It also has a build without the fade (
interpolation-no-edge.dxil), so it works withFIX_EDGE=0. The device is hooked if either fix is on.Settings
0VICTORY_FIDELITYFX_FRAMEGEN_FIX_EDGEVICTORY_FIDELITYFX_FRAMEGEN_FIX_VEHICLEBoth settings are documented in
docs/SETTINGS.mdandrun.conf.default.@diafebus on GitHub · 2026-12-05 14:51 UTC · original
Tested #588 locally on an RX 6950 XT (RDNA 2), Core Ultra 7 270K Plus, Fedora with Proton-CachyOS 11 and xmem’s patched RADV. The local base was
8bf4878plus our existing patches, and #596 was enabled alongside #588. FSR 3.1.6 frame generation was on. We tried 2133×1200 and 1920×1080 internal, both upscaled to 3840×2160. The log confirmed that the screen-edge fade and player-vehicle correction were active.During fast driving, the player’s car visibly updated less often than the scenery around it. The car felt disconnected from the terrain, and the shadows still smeared at speed. I didn’t see a net improvement to driving in this run.
That looks consistent with the mask showing the current rendered car while the surrounding scene keeps interpolating. This is a visual and handling observation. We didn’t instrument physics or do a vehicle-mask-only A/B, so I can’t isolate the cause from this combined run.
@xstasy on GitHub · 2026-12-05 21:48 UTC · original
The ML framegen on fast speeds have some vignette flickering behind car as well, maybe this could solve that as well?
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.