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

Jittering and Non Screen Tearing even when disabling V-Sync #57914

Open
owstetra opened this issue Feb 10, 2022 · 13 comments
Open

Jittering and Non Screen Tearing even when disabling V-Sync #57914

owstetra opened this issue Feb 10, 2022 · 13 comments

Comments

@owstetra
Copy link

owstetra commented Feb 10, 2022

Godot version

Godot 4 Alpha 2

System information

Windows 10 - GTX 980

Issue description

After disabling V-Sync the screen tearing is gone, it should appear, also the game Start jittering and stuttering, and when enabling V-Sync the game still jittering/stuttering
In Alpha 1 after disabling V-Sync, the screen tearing will appear, but there is no Jitter, and the game runs very smooth no matter what compared to Alpha 2
All of this happen when in Full screen

Edit : You can download this Advanced movement system template and test it, Before you test it add this line of code in _ready()

DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)

Untitled

now open it in Alpha 1, You will see the game runs very smooth, but in Alpha 2 the game stuttering, press shift to run and rotate the camera around you and you will see

Steps to reproduce

in any 3D project that contain a fast moving camera, open it in Alpha 1 and Alpha 2, and see the difference

Minimal reproduction project

None
_

@akien-mga
Copy link
Member

Might be related to Windows fullscreen mode changes @bruvzg.

@bruvzg bruvzg self-assigned this Feb 10, 2022
@owstetra
Copy link
Author

Might be related to Windows fullscreen mode changes @bruvzg.

i retested it again in window mode, the issue still there too
it feels laggy and jittery when moving the camera in game

@bruvzg
Copy link
Member

bruvzg commented Feb 10, 2022

Might be related to #57928 (no it's not in alpha 2), fullscreen mode should have at least the same performance as window mode.

@Calinou
Copy link
Member

Calinou commented Feb 10, 2022

Jitter and stutter will always happen to an extent when you have V-Sync disabled, because the physics step does not match the rendered frame rate. Physics interpolation fixes this by ensuring every rendered frame "sees" a different physics state, but it's not implemented yet.

If you need physics interpolation right now, you could try porting https://github.com/lawnjelly/smoothing-addon to master.

@owstetra
Copy link
Author

Jitter and stutter will always happen to an extent when you have V-Sync disabled, because the physics step does not match the rendered frame rate. Physics interpolation fixes this by ensuring every rendered frame "sees" a different physics state, but it's not implemented yet.

If you need physics interpolation right now, you could try porting https://github.com/lawnjelly/smoothing-addon to master.

The problem is not with physics interpolation, no... it will never Jitter/Stutter at all if V-Sync is disabled in any game or engine, you maybe mean Screen tearing ?
Because in Alpha 1 there is no Jitter/Stutter at all when moving the camera in 3D when the V-Sync is disabled and there is Screen Tearing
But in Alpha 2 There is Jitter/Stutter but there is no Screen tearing when V-Sync is disabled, and even if V-Sync is Enabled the Stutter is still there

@Calinou
Copy link
Member

Calinou commented Feb 11, 2022

@owstetra If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.

@AttackButton

This comment was marked as off-topic.

@bruvzg
Copy link
Member

bruvzg commented Feb 11, 2022

snap_controls_to_pixels was broken and restored in #57481, and it probably reintroduced #28804 issue (this was fixed and reverted multiple times in 3.x). But this should not affect 3D, so probably is not the only reason.

@AttackButton

This comment was marked as off-topic.

@owstetra
Copy link
Author

owstetra commented Feb 11, 2022

Untitled

Here's something, You can download this Advanced movement system template and test it, Before you test it add this line of code in _ready()
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)

now open it in Alpha 1, You will see the game runs very smooth, but in Alpha 2 the game stuttering, You can press shift to run and rotate the camera around you, it's hard to see at first but you will feel it and start seeing it

@akien-mga
Copy link
Member

Is this still reproducible in 4.0 RC 3 or later?

@akien-mga akien-mga modified the milestones: 4.0, 4.x Feb 22, 2023
@dreamsComeTrue
Copy link
Contributor

yes, I can confirm that - I still get jiter movement when VSync is enabled. When I disable it, it's also there but less noticeable.
I have the simplest scene: CharacterBody3D with _physics_process adjusting it's Velocity and then move_and_collide()
I am using latest 4.1 version of Godot

@akien-mga akien-mga changed the title [Godot 4.0 Alpha 2] - Jittering and Non Screen Tearing even when disabling V-Sync Jittering and Non Screen Tearing even when disabling V-Sync Nov 24, 2023
@akien-mga
Copy link
Member

Might be the same issue as #84137 - presumably a Windows DWM bug.

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

6 participants