godotengine / godot

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

Severe input lag in editor with enabled V-sync. #95694

Closed orriginalo closed 1 month ago

orriginalo commented 1 month ago

Tested versions

System information

Godot v4.3.stable - Windows 10.0.22631 - d3d12 (Forward+) - dedicated NVIDIA GeForce GTX 1050 (NVIDIA; 32.0.15.6081) - Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz (4 Threads)

Issue description

Reproducible on both d3d12 (Forward+) and Vulkan (Forward+) and is also reproducilble on Vulkan (Mobile) and d3d12 (Mobile), but not on Compitability renderer. In Godot 4.2, when V-sync is enabled, there is an input lag in the editor, and when V-sync is disabled, the input lag disappears. But in Godot 4.3, when V-sync is disabled, the input lag does not disappear.

Steps to reproduce

  1. Create a new project in godot v4.3.dev4.official [df78c0636] or later.
  2. Hold RMB or MMB in "viewwindow space" and move mouse.
  3. You will see input lag.
  4. Disable V-sync in editor settings and reload project.
  5. Try steps 1-3 again, and input lag does not disappear.

Minimal reproduction project (MRP)

Empty project.

orriginalo commented 1 month ago

I just noticed that this input lag is prominent not only in the 2/3d preview but also in the whole editor, for example when dragging files around in the filesystem.

Calinou commented 1 month ago

Can you check if this occurs with Single Window Mode enabled in the Editor Settings?

But in Godot 4.3, when V-sync is disabled, the input lag does not disappear.

In 4.3, V-Sync in the editor is governed by a new editor setting, not the project setting like in 4.2 and prior.

orriginalo commented 1 month ago

Turning off V-Sync in the editor fixed the input lag. Thank you.

Calinou commented 1 month ago

Thanks for the report! Consolidating in https://github.com/godotengine/godot/issues/79290 and https://github.com/godotengine/godot/issues/90871.