Hello,
We are encountering an issue similar to the one in the thread below but it offers no solution.
[Content removed]
When our MaxFPS is set to a higher value than the monitor refresh rate and VSync is active, we get very erratic framerate that in turn cause camera jittering. The above thread mentions the RHI thread being enabled but in our case, it seems to have limited effect, albeit disabling the RHI thread improves the situation by allowing the framerate to raise 4-5 FPS and therefore going over the monitor refresh rate. When we set the MaxFPS to the monitor refresh rate, the framerate stabilizes even with VSync on. Of course, none of this happens with VSync off.
We know this issue affects all our supported platforms (XBox, PS and PC) but we are really only concerned with PC as consoles just lock the FPS through VSync and do not use MaxFPS. We have such reports on various different PC setups with different CPUs and GPUs (Intel, AMD or Nvidia).
I tried disabling Smooth Frame Rate, thinking it might be conflicting with the other VSync settings. No luck. I also tried playing the the RHI SyncInterval but it persists.
I attached an Insights capture where I go through the different settings (you can see the console commands in the capture to know what changed). The capture starts with MaxFPS = 60 and VSync On. Monitor is set at 60Hz.
What are we missing here?
Steps to Reproduce
Enable VSync and set MaxFPS to a value over the refresh rate
For example, with a 60Hz monitor,
VSync ON and MaxFPS = 90 leads to irregular frame pacing and jitter.
Hello,
Thank you for reaching out.
I’ve been assigned this issue, and we will be looking into this frame pacing for you.
Hello,
Thank you for reaching out.
We have been unable to reproduce this issue.
Can you please send us a minimal test project that demonstrates this frame pacing issue?
The guide for test projects:
[Content removed]
In addition, can you please answer these questions?
- Does this require a 60hz monitor, or can a monitor be set to 60hz mode via OS settings?
- Does this reproduce in the editor as well, or only packaged builds?
Hello Stephen,
I will try to get a simple project to repro. In the mean time, here is the answer to your questions:
1- You can set the monitor to 60Hz in Windows settings to reproduce. My setup is a monitor with 59.97 and 99.98Hz support. I can reproduce the issue by using 60Hz and setting the MaxFPS to 90 or 120 in our game settings or by setting the monitor to 100Hz and setting MaxFPS to 120.
2- It seems to occurs only in packaged builds. We’ve seen it in Shipping, Test and DebugGame configurations. We also see it in both full screen or windowed mode. Everything looks fine in Editor viewport, PIE and Standalone game, with VSyncEditor set to ‘1’/ON where applicable.
I remember reading a thread about FSR causing similar issues. We have FSR integration in our game but this problem also occurs when FSR is disabled. So I’m unsure if it has anything to do with it. Perhaps something to keep in mind.
One other question. To work around this problem, I implemented a “smart” FPS cap that will look at the monitor’s available refresh rates and set the MaxFPS to the refresh rate “closest to the selected FPS cap” (highest available under the selected max FPS). However, we cannot determine if that refresh rate is the one currently active, leaving some possibility of the pacing bug still occuring. Is there a way to know which refresh rate is being vsynced to?
Thanks and I’ll get back shortly with a repro project, hopefully.
So I’ve been unable to get a proper project to repro. I’m unsure what part of our settings or code could cause that at this point and I need to move on unfortunately. I did integrate the UE5 GetMaxRefreshRate into our code and it works fine, allowing us to bypass the issue for now.
Thanks
Hello,
To get the Monitor’s refresh rate, you can look at how Unreal Engine 5 implements “FWindowsPlatformMisc::GetMaxRefreshRate()”. This is not implemented in Unreal Engine 4.27, so you could try backporting it.
Please let us know if this helps.
Hello,
Thank you for the reply.
Can we now close your case? You can always re-open it if you return to this issue or need further assistance with the same topic.
Yes, I’ll reopen if I find more information.
Thanks