I have investigated this some time ago and I have came to a conclusion, that a 2D square will always jitter, even if you will move it without any delta (like 10 pixel to the right every frame with vsync on). It will jitter because of the way screens are refreshed. The refresh is from the top to the bottom, line by line, from the left to the right. So the whole square will not change the position at the same time, it will move line by line. Sure the refreshing is really fast, but our eyes/brains can notice this as a lack of smooth movement/jitter/tearing, especially when you are paying attention to this. And it’s much more easy to notice this when you look at a 2D square on a solid background. If you will try to notice this in a complicated 3D environment, it will not be so noticeable (if at all).
The jitter is less noticeable when you move the square from the top to the bottom. It’s again due to the way the monitor refreshes. When you move the square from the left to the right, and looking in a very slow motion, you can notice that at some point half of your square has been already moved to the right and the other half still waits for the refresh process to finish. If you move from top to the bottom and the square has one color, the jitter is less noticeable because the same color will be refreshed over the same color and there will also be no situation when half of your square is already moved to the bottom and half is not (remember, the refreshing process is from the left to the right, line by line). The jitter will be only noticeable at the top and bottom edge of the square.
Anyway, let’s get back to the delta. Sure 2% is not a lot, but. You have to remember that most of the time you will move things with some speed, if it will be high enough, the variation will scale up. Our brain is really good at noticing errors in the smoothness.
If you object will move with the speed equal to 500 pixels per second and the delta variation is from 15.7ms to 17.5ms (as on the samples from one of the posts above), then your object will move:
0.0157 * 500 = 7.85 pixels per frame
0.0175 * 500 = 8.75 pixels per frame
(0.0175 - 0.0166) / 0.0166 * 100 = 5.42%
The fact that the square can be moved only by the whole pixels, makes things even more complicated. One pixel difference due to the delta variation
1 / 7 * 100 = 14.29%
I think something like that may be noticeable, even if only sometimes. We should try to avoid this if possible. On top of that I just want to know what is going on under the hood. We are using deltaTime all the time so it’s worth knowing what is going on with it and why. I hope Dave will provide us some answers. Thank you for your help!