-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microstuttering on Windows with VSync #71391
Comments
Related to #71361. Vsync via Compositor was removed because it had lots of issues, such as arbitrarily enforcing half refresh rate V-Sync on some setups. @TinkerWorX Please upload a minimal reproduction project to make this easier to troubleshoot. Can you reproduce this after switching to the Mobile rendering method in the advanced Project Settings? Also try the Compatibility rendering method. Also, does this only occur on startup or does it keep occurring after several minutes of running the project? Does this occur when the editor is not open in the background? Does this occur in an exported project in release mode? |
Hello, I don't know if this is the same issue, but when using the Vulkan renderer and having VSync on the game stutters quite a lot if I run it from the editor. This does not happen when I don't have vsync on, or when running the exported version of the game and using vsync on it. |
Do you have the remote scene tree visible in the editor when running the project? This may cause stuttering as per #13219. |
Interesting, I didn't have auto switch to remote scene tree on, but by setting both Remote Scene Tree Refresh Interval and Remote Inspector Referesh Interval to 0.1 like a comment in that issue suggested, all the stuttering was gone. Thanks! |
That refresh interval trick should be documented somewhere imho |
It's strange that decreasing these settings from their default resolves the stuttering for you. There are 2 possibilities here:
|
Hmm... Yeah it seems yesterday was a fluke, it's been stuttering today as well. But I'm not even on the remote scene tree. |
@TinkerWorX Can you (or anyone else) still reproduce this bug in Godot 4.2.1 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. Also, we need more information about your setup:
|
Closing due to lack of response. Please comment if you can still reproduce this bug on the latest Godot version. PS: Since no minimal reproduction project was included in the original bug report, please upload one as well to ease troubleshooting. |
Apologies for not updating this, real life got in the way, here's some more documentation, as of v4.3.dev4.mono.official [df78c06], where the issue still persists. Here's a project used for testing: JitterBug.zip Here's an example video. The quality is bad because any conventional screen recording wouldn't catch the issue, so I had to grab a 240 FPS video from my phone. Ignore any vertical movement, that's just the camera not being still, it's the horizontal movement that is interesting. The top movement has vsync enabled, and shows clear stuttering. Godot.Stutter.mp4Every other setting is identical, other than vsync mode. Just to add, I'm using a 75Hz display with AMD FreeSync. |
Can you reproduce this with the Compatibility rendering method? If not, this is likely a duplicate of #84137. |
I get the same microstuttering with Compatibility rendering. This is a bug I've been following for a long time, even before Godot, and my conclusion is that it's related to the Windows compositor and certain combinations of hardware. It's never an issue with DirectX, only with OpenGL/Vulkan. Would be great if we could have the Vsync via Compositor option back, and then just make it a setting for my players, so if it does bug or cause issues, they can just opt to not use it. EDIT: |
Remember that on NVIDIA, you can force any OpenGL/Vulkan app to be presented via DXGI in the driver options: godotengine/godot-proposals#5692 (comment) Godot 4.3 also has a Direct3D 12 rendering driver which you can try:
Rendering via Direct3D automatically uses DXGI by design on all vendors, not just NVIDIA. |
I'll try the NVIDIA DXGI setting. Initial test didn't fix anything, but I'll need to do a few more tests where I also reboot my system. I tried to use Direct3D12, but Godot refuses to launch when I do that, but maybe I was missing that dll, I guess I need to file a different issue for that if it still doesn't work. |
A quick update, using the DirectX Shader Compiler and Direct3D 12 mode alleviates the issue.
I assume the above log message confirms it's now using Direct3D 12 instead. |
Using Direct3D 12 and Exclusive Fullscreen was the only settings that fixed this issue for me. Also, I experimented all other settings with no success (Direct3D 12 and Window Mode, Vulkan and Exclusive Fullscreen Mode, etc), it would always randomly stutter, and after minimizing and focusing the window again would fix it temporarily. When it started to stutter, everything in the profiler, Monitors, Video RAM, etc, seemed normal (including the FPS which were stable at 60 for me). |
Godot version
v4.0.beta10.mono.official [d0398f6]
System information
Windows 11 22H2, GeForce GTX 1080, GeForce Game Ready Driver 528.02, default backend (Vulkan?)
Issue description
On my machine I get micro stutters more or less consistently. In Godot 3 there was the following setting that fixed the issue:
I am unable to find this setting in Godot 4, which means I'm now dealing with persistent micro stutters.
Steps to reproduce
Make any project with a camera that can move and some objects that are visible, observe the stutters in the camera as it moves around, make sure vsync is enabled.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: