godotengine / godot

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

Frame rate halved when VSYNC is turned off during runtime and Nvidia low latency mode is ultra. #92689

Open WrobotGames opened 1 month ago

WrobotGames commented 1 month ago

Tested versions

System information

Godot v4.3.beta1 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 32.0.15.5585) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 Threads)

Issue description

The framerate gets halved (360 to 180fps in my tests) when disabling VSYNC during runtime and while low latency mode is set to ultra in the nvidia configuration panel. This can result in situations where the fps is drasticly lower when disabling VSYNC.

For example: Videocard is capable of 160 fps. vsynced to 144fps. disabling vsync during runtime results in 80 fps.

Steps to reproduce

  1. Set "low latency mode" to "ultra" in the Nvidia configuration panel.
  2. Run any 3D project with VSYNC turned OFF in the project settings. (NOT from code)
  3. Note the framerate
  4. Run turn VSYNC on and off again from code.
  5. Note the framerate
  6. The framerate from step 3 is twice as high as the framerate from step 5.

Minimal reproduction project (MRP)

VSYNC.zip Note the framerate from initial load and after switching vsync on and off again with the toggle. Reminder to set low latency mode to ultra.

Calinou commented 1 month ago

Are any other games/programs known to suffer from the same issue? I don't think we can do much about it.

WrobotGames commented 1 month ago

What I find weird is that the issue only occurs when VSYNC is turned off during runtime, it does not occur when VSYNC is off in the project settings.

I dont think a lot of people will come across this bug, because the nvidia setting isn't the default, and after a quick search reddit seems to recommend keeping it off or on. Never "ultra" for all games.