godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.83k stars 21.13k forks source link

FPS cap with V-Sync enabled is incorrect with multiple monitors with different refresh rates #89681

Open bogcow opened 7 months ago

bogcow commented 7 months ago

Tested versions

System information

Windows 10

Issue description

I have two monitors: one is 144Hz and the other is 60Hz. If I run an empty project with V-Sync enabled, the FPS is always capped at 144. Even if I drag the game window to my 60Hz monitor, the game is still capped at 144 FPS. This is different from Godot 3.5.3, where if I dragged the game window to my 60Hz monitor, the FPS cap would update to 60, which I believe should be the intended behavior. Even if I launch the game window on my 60Hz monitor by setting the initial_position_type in ProjectSettings, the FPS is still capped at 144 rather than 60.

Steps to reproduce

Create a new project with V-Sync enabled. Check the fps as you move the game window between two monitors with different refresh rates.

Minimal reproduction project (MRP)

N/A

AThousandShips commented 7 months ago

Can you test this on 4.2.1 or 4.2.2.rc2, or even better on 4.2.dev5? I know some issues with frame rate has been solved not too long ago

bogcow commented 7 months ago

I just tried testing on 4.2.2.rc2 and 4.2.dev5 and the issue is present on both versions as well

brcontainer commented 7 months ago

Can you test this on 4.2.1 or 4.2.2.rc2, or even better on 4.2.dev5? I know some issues with frame rate has been solved not too long ago

Do you mean 4.3dev5?


@bogcow Did you test on 4.3? Download: https://godotengine.org/download/archive/

bogcow commented 7 months ago

Oh, I meant to say 4.3.dev5, yes the issue is present on 4.3.dev5

ghost commented 5 months ago

I have a similar problem but in my case the fps is not capped even if vsync is on and Nvidia Control Panel has fps limit on.

Calinou commented 5 months ago

I have a similar problem but in my case the fps is not capped even if vsync is on and Nvidia Control Panel has fps limit on.

Does FPS get capped with RTSS' framerate limiter active? This is more reliable than NVIDIA's method in my experience, and it can be adjusted while a game is already running.

ghost commented 5 months ago

I have a similar problem but in my case the fps is not capped even if vsync is on and Nvidia Control Panel has fps limit on.

Does FPS get capped with RTSS' framerate limiter active? This is more reliable than NVIDIA's method in my experience, and it can be adjusted while a game is already running.

No, even with msi afterburner frame limiter the 3d editor fps is not capped. But msi afterburner overlay shows 60 fps lock but godot editor show a much higher fps (500~)

Calinou commented 5 months ago

but godot editor show a much higher fps (500~)

The Godot editor displays an estimated FPS based on the measured CPU/GPU time. It doesn't actually display the real FPS you are getting within the editor. See https://github.com/godotengine/godot/issues/69218 and https://github.com/godotengine/godot/pull/75512.