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

Mention buffer size and Windows 11 mouse polling in Fixing jitter, stutter and input lag #7829

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions tutorials/rendering/jitter_stutter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Finally, a game exhibiting *stutter* will appear smooth, but appear to *stop* or

.. image:: img/motion_stutter.gif


Jitter
------

Expand Down Expand Up @@ -98,6 +97,11 @@ games, will usually not exhibit this problem anyway).
For fullscreen, Windows gives special priority to the game so stutter is no
longer visible and very rare. This is how most games are played.

When using a mouse with a polling rate of 1,000 Hz or more, consider using a
fully up-to-date Windows 11 installation which comes with fixes related to high
CPU utilization with high polling rate mice. These fixes are not available in
Windows 10 and older versions.

.. tip::

Games should use the **Exclusive Fullscreen** window mode, as opposed to
Expand Down Expand Up @@ -157,7 +161,20 @@ Project configuration

On platforms that support disabling V-Sync, input lag can be made less
noticeable by disabling V-Sync in the project settings. This will however cause
tearing to appear, especially on monitors with low refresh rates.
tearing to appear, especially on monitors with low refresh rates. It's suggested
to make V-Sync available as an option for players to toggle.

When using the Forward+ or Mobile rendering methods, another way to reduce
visual latency when V-Sync is enabled is to use double-buffered V-Sync instead
of the default triple-buffered V-Sync. Since Godot 4.3, this can be achieved by
reducing the **Display > Window > V-Sync > Swapchain Image Count** project
setting to ``2``. The downside of using double buffering is that framerate will
be less stable if the display refresh rate can't be reached due to a CPU or GPU
bottleneck. For instance, on a 60 Hz display, if the framerate would normally
drop to 55 FPS during gameplay with triple buffering, it will have to drop down
to 30 FPS momentarily with double buffering (and then go back to 60 FPS when
possible). As a result, double-buffered V-Sync is only recommended if you can
*consistently* reach the display refresh rate on the target hardware.

Increasing the number of physics iterations per second can also reduce
physics-induced input latency. This is especially noticeable when using physics
Expand Down Expand Up @@ -187,6 +204,13 @@ every input, rather than accumulating inputs and waiting for a frame to be
rendered. Disabling input accumulation will increase CPU usage, so it should be
done with caution.

.. tip::

On any Godot project, you can use the ``--disable-vsync``
:ref:`command line argument <doc_command_line_tutorial>` to forcibly disable V-Sync.
Since Godot 4.2, ``--max-fps <fps>`` can also be used to set a FPS limit
(``0`` is unlimited). These arguments can be used at the same time.

Hardware/OS-specific
^^^^^^^^^^^^^^^^^^^^

Expand Down