XeFG: Dynamic MFG #1220

Open
dashdogy wants to merge 2 commits from dashdogy/xefg-dynamic-mfg into master
dashdogy commented 2026-10-15 09:21:33 +00:00 (Migrated from github.com)

Adds Dynamic MFG to the XeFG output. With it on, the Frame Gen setting becomes the max and the multiplier gets picked every frame to follow a target FPS. The target defaults to the FPS limit, or just under the refresh rate if there isn't one. If you want to move the ui around thats fine @FakeMichau, however if you could keep the XeFG model status that be sick and awesome. Sorry for the large commit.

The controller XeFG_DynamicCount.h works from the game's real frame rate, leaving out the time spent waiting in OptiScaler's limiter and present. With nothing capping the frame rate, it goes for the multiplier that lands nearest the target (Up / Down rounding pick the closest one above / below instead). Under an FPS limit or V-Sync it steps up when it falls short and steps down when one less should still hold, and undoes step downs that don't. If the target is out of reach, extra generated frames only stay if they actually add FPS. It can also drop to 1X by switching XeFG's frame generation off with xefgSwapChainSetEnabled(false). While at 1X, GetInterpolatedFrameCount() returns 0 so the limiters, menu and swapchain wrapper see it.

There's also Use target as cap (TargetAsCapDMFG). It makes the target the FPS limit as well, and a simpler controller (XeFG_DynamicCap.h) just holds it.

New [XeFG] options, also in the menu: DynamicMFG, FramerateTargetDMFG, RoundingDMFG, DynamicAllow1X and TargetAsCapDMFG.

Adds Dynamic MFG to the XeFG output. With it on, the Frame Gen setting becomes the max and the multiplier gets picked every frame to follow a target FPS. The target defaults to the FPS limit, or just under the refresh rate if there isn't one. If you want to move the ui around thats fine @FakeMichau, however if you could keep the XeFG model status that be sick and awesome. Sorry for the large commit. The controller `XeFG_DynamicCount.h` works from the game's real frame rate, leaving out the time spent waiting in OptiScaler's limiter and present. With nothing capping the frame rate, it goes for the multiplier that lands nearest the target (Up / Down rounding pick the closest one above / below instead). Under an FPS limit or V-Sync it steps up when it falls short and steps down when one less should still hold, and undoes step downs that don't. If the target is out of reach, extra generated frames only stay if they actually add FPS. It can also drop to 1X by switching XeFG's frame generation off with `xefgSwapChainSetEnabled(false)`. While at 1X, `GetInterpolatedFrameCount()` returns 0 so the limiters, menu and swapchain wrapper see it. There's also **Use target as cap** (`TargetAsCapDMFG`). It makes the target the FPS limit as well, and a simpler controller (`XeFG_DynamicCap.h`) just holds it. New [XeFG] options, also in the menu: `DynamicMFG`, `FramerateTargetDMFG`, `RoundingDMFG`, `DynamicAllow1X` and `TargetAsCapDMFG`.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dashdogy/xefg-dynamic-mfg:dashdogy/xefg-dynamic-mfg
git switch dashdogy/xefg-dynamic-mfg

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff dashdogy/xefg-dynamic-mfg
git switch dashdogy/xefg-dynamic-mfg
git rebase master
git switch master
git merge --ff-only dashdogy/xefg-dynamic-mfg
git switch dashdogy/xefg-dynamic-mfg
git rebase master
git switch master
git merge --no-ff dashdogy/xefg-dynamic-mfg
git switch master
git merge --squash dashdogy/xefg-dynamic-mfg
git switch master
git merge --ff-only dashdogy/xefg-dynamic-mfg
git switch master
git merge dashdogy/xefg-dynamic-mfg
git push origin master
Sign in to join this conversation.
No description provided.