Repository: godot
Issue: Forward Plus Renderer causes frameskips/jitter/judder/stutter, GPU frames aren't sorted correctly on Windows
Labels: bug,platform:windows,topic:rendering,confirmed



### Godot version

4.1.3

### System information

Windows 11, NVIDIA GeForce GTX 1070, i7-7700K CPU 4.20GHz, 1920x1080 60Hz IPS monitor & a 2560x1440 adaptive 100Hz monitor

### Issue description

The forward plus renderer, causes jitters in movement. It's especially visible when V-Sync is switched on. 
This happens in 2D and 3D
Those jitters are more or less pronounced, depending on which screen you use, they might not be very visible on a 60HZ screen but are still there.

[!](https://user-images.githubusercontent.com/8904620/281073340-49a8af27-6859-4423-b404-df69ed453625.mp4)

when i talk about "jitter" i am talking about this effect happening in the video above or clearly observable in this older video here at 5, 8, 11 and 13 seconds:
[Video](https://monobyte.uber.space/jitter.webm)

The problem seems to be tha tthe renderer has a cache of 4 GPU frames and that the sorting of those frames is jumbled up.
So basically by design we seem to have an reoccuring order of 0, 1, 3, 2, 3, ... 4, 5, 8, 7, 8...
This means some frames don't get shown, others get shown twice and the judder is caused by a step back

Currently it's not clear if it's a problem with the way how the frames are put together, or if it's a driver related issue related to memory. It could be 2 bugs, as comment sin the thread show other bugs play into this

### Steps to reproduce

- Simply use forward plus renderer. 
- Preferably use a screen with a low refresh rate, as frames are displayed longer and the jumbles are easier to see. 
- If you want to experience it very clearly, switch off camera smoothing and switch on V-Sync.
- set your game to a very low resolution e.g. 160x90 scaled by 12 something like this makes the steps between images way bigger and therefore the issue is clearer visible.

### Can this be circumvented?

No. It's a very critical and very deep sitting bug. 
With the forward plus renderer there is no way to circumvent this and it will happen on any hardware. THe higher the resolution, the less obvious the bug is, however it's always there. **The forward plus renderer is simply broken and can't be used in the current state.**

You could Use the gl_compatibility renderer, which doesn't have this problem, but this is not a good solution either.

## Minimal reproduction project:
I made a simple project in which the character can only run left and right per key input. That's literally all the code we need to test the issue properly, the setup described above is key for making it visible.



# Conclusion
1. Only by enabling the gl_compatibility renderer the jitter seems to be solved. The visibility of the problem and the intensity the skips are happening is however different based on the settings.
2. It happens in 2D and 3D
3. Disabling V-Sync with the forward plus renderer makes issues less pronounced than with having V-Sync enabled...
4. ...especially on a 60Hz screen on windows disabling the V-Sync leads to way less experienced jitter, it's still there though
5. The problem happens with process function and with physics_process() function.  

# Hypothesis

I think the core of the problem lies with the forward plus renderer (There however might be additional problems with V_Sync, Camera or Physics)

### Minimal reproduction project

[Project Download](https://drive.google.com/file/d/1m-igfENCTPHTm9zdM4MPshv53aFIYkWO/view?usp=sharing)
This includes a small platformer project. Project settings need to be adjusted according to my tests to reproduce the issues.