Skip to content
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

When vsync is off, Godot got higner frame rate but looks like in lower frame rate #47972

Closed
snougo opened this issue Apr 17, 2021 · 5 comments
Closed

Comments

@snougo
Copy link

snougo commented Apr 17, 2021

Godot version:

all 3.3 (include preview 3.2.4) and 3.2.3 stable

OS/device including version:

Screen Shot 2021-04-17 at 18 46 11

Issue description:

when I set vsync to off, and printed FPS to output, I saw I got higher frame rate, but the game actually looks like in lower frame rate

Steps to reproduce:

vsync.off.vs.vsync.on.2D.mov
vsync.off.vs.vsync.on.3D.2.mov

Minimal reproduction project:

RenderingTest.zip

@snougo
Copy link
Author

snougo commented Apr 17, 2021

also see the latest comment from me here #43038

@lawnjelly
Copy link
Member

Some possibles are some kind of throttling issue on your system (is the GPU overheating?), or it is running out of resources and garbage collecting or something (we could even be e.g. rendering 10 frames ahead, it runs out of memory and stalls until it catches up etc). The running out of resources (especially vertex buffers) could have been influenced by the flags in 3.3, but if they don't seem to help I'm running out of ideas.

Artificially limiting the frame rate via sleep may be helping with either of these possibilities (and using vsync which I assumed you had tried). There are also countless other possibilities of course. Unfortunately it's mostly guesswork unless you accidentally hit on something that triggers it, given that we can't reproduce this our side.

@snougo
Copy link
Author

snougo commented Apr 17, 2021

@lawnjelly yeah, I agreed, these issues are very likely only appeared on specific device or system and hard to find what's going on, anyway thank you for your patient response! at least I find the solution how to fix them in my device 🕶️

@snougo snougo changed the title When vsync is off, Godot got higner frame ratebut looks like in lower frame rate When vsync is off, Godot got higner frame rate but looks like in lower frame rate Apr 17, 2021
@Calinou
Copy link
Member

Calinou commented Apr 17, 2021

Video captures do not accurately display the effective framerate you can reach, unless you use a capture card. This is especially true when not using V-Sync and having an uncapped framerate, as the CPU and/or GPU will be saturated by the game, leaving few resources for the video encoding process and causing it to drop frames.

Also, I recommend always limiting framerate, either by using V-Sync or using the Force Fps project setting. This is because unlimited FPS leads to unpredictable smoothness input lag, which creates a poorer experience overall. Even though this might defy expectations, limiting your FPS can also reduce input latency if your game is GPU-limited.

Lastly, enabling V-Sync will generally lead to smoother visuals if your machine can keep up with the monitor's refresh rate, while also avoiding tearing. This comes at the cost of higher input lag and stuttering if your machine can't keep up, though.

@snougo
Copy link
Author

snougo commented Nov 7, 2021

#48555 this PR has sloved this issue @lawnjelly thanks a lot!

@snougo snougo closed this as completed Nov 7, 2021
@akien-mga akien-mga added this to the 3.4 milestone Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants