Big thread didn’t read all the posts yet sorry but wanted to chime in with my little simple test I just did… This is how it looked for me:
Bilinear + Vsync = 5-6 frames (83-100 ms)
Integer + Vsync = 4-5 frames (67-83 ms)
Integer - Vsync = 2-3 frames (33-50 ms)
Hardware:
Acer Chromebook 14 (2016)
8Bitdo SFC30 gamepad (Bluetooth Xinput)
Moto X 2015 phone (120fps SlowMo)
Software:
Retroarch 1.7.1 32bit (Windows)
Wine staging 32bit (Windows 7)
GalliumOS 64bit (Xubuntu)
I did a quick test with my 8Bitdo Bluetooth gamepad, recording the screen with my Moto X 2015 phone camera and watching the built-in software framerate counter in RetroArch. I don’t have the best equipment or method here but with this simple test video I could still get some fairly objective results studying the video using VLC frame-by-frame playback.
I did not use hard GPU/CPU sync, did not change any polling options or disable WiFi or anything, this is how it runs on this Chromebook with this wireless gamepad. Of course I turned down all the extra frame delay options in the options to 1 or 0 frames but otherwise no special tweaks… I could not get the native Linux build to work on my system, it didn’t even start up, so I am using the Windows build through Wine instead, which runs perfectly! Input options are set to Raw and Xinput.
Sorry for not editing the video, it’s just an upload of the recording captured on the phone, it’s 4x slow motion… (11 minutes might be slow to watch). If you download the video you can use for example VLC frame-by-frame playback to see the difference easier like I did. Otherwise you’ll have to take my word on those results
It looks like using this wireless controller adds less than one frame of lag, in fact when I compared with the keyboard input I could not really tell any difference from filming it. Basically my tests looked the same using the built-in laptop keyboard buttons or the bluetooth gamepad, I did not expect that!
I’ve tried laggy bluetooth keyboards and mice in the past that had significant input latency compared to wired or dedicated RF dongles. I guess these newer bluetooth devices makes it practically placebo for me here. There’s probably some extra lag using bluetooth but I could not detect it through recording it with my phone at least. It must be less than one frame, maybe it’s up to 8ms extra if it’s polling at 125Hz but I don’t know, would need a faster camera I guess, but either way I’d say the difference is practically insignificant in total input latency. Maybe the built-in laptop keyboard has extra lag too?
Anyway it looks like Vsync is adding 2 frames and Bilinear is adding a third frame on top. Now 5-6 frames of latency sounds like a lot but compared to most modern games it’s normal, for me it’s OK! However it is objectively worse than what we had in the 80’s and 90’s so of course if it can be reduced all the better!
Turning of Bilinear looks better in some games you see the pixel art perfectly but the picture can get a bit noisy and harder on the eyes in some games. The filter is cleaner and more comfortable to look at in general, although a little blurry… Personally for a default setting I would leave this on when playing.
As for the Vsync, having it enabled looks so perfect in those old 2D side scrolling games so I can’t really recommend turning that off either in general, the screen tearing and stuttering can be quite distracting, it’s up to you!
Hmm, this also makes me think, would it be possible to implement some sort of frame interpolation, like doubling 60fps to 120fps like that soap opera effect on modern TVs? There are some software players also able to do this, of course this as any post processing will add some lag, but for those who can run 120Hz it might be cool! However I think it might be more difficult to do well compared to standard video playback…
When using OpenGL it could be nice to have an option to use real triple buffering. This uses two backbuffers which are constantly swapped and overwritten, one backbuffer is being actively drawn to and the other one is locked and ready for display. Compared to double buffering which only has one backbuffer that is locked and can not be overwritten, by design that’s how it’s supposed to work.
With double buffering it means if you have 200fps or 2000fps (each frame takes 0.5ms render time) doesn’t matter. The next successive frame will be 17ms old every time because drawing was started right after the previous frame (when the frontbuffer and backbuffer gets swapped).
With real OpenGL triple buffering (not a triple frame buffer queue) the next frame will be 0.5ms old because it’s constantly overwriting and updating the dual backbuffers every 0.5ms or however fast it can render. The downside is that with lower framerates triple buffering will give less smooth motion because it is not synced with the refreshrate. However with old games running very high framerates the juddering effect is probably negligible!
Double buffering runs like clockwork because there’s only one frontbuffer which is used by the screen and one backbuffer which is used for storing the next frame. So it has to wait for the front/back buffers to swap each frame. Each frame is therefore started exactly 16.7ms apart (at 60fps) which gives as stable motion as possible.
Triple buffering might judder because the frames being displayed on the screen are not 16.7ms old each time (at 60fps). Because it uses dual backbuffer slots only one frame is locked/finished and the other slot is free. It does not have to wait, it keeps overwriting/swapping each of the two backbuffer slots in the background. The screen is being drawn using the third slot, the frontbuffer. Two locked slots, one free, that’s why you need three (triple) to keep rendering constantly without waiting/syncing with the screen.
So with triple buffering you usually get a little motion judder but it does effectively lower the input lag, as long as the possible framerate is significantly higher than the refreshrate. And it also eliminates tearing like standard Vsync.
Triple buffering would be an option somewhere between double buffered Vsync and the new Runahead method. Actually triple buffering is similar to runahead in that it renders multiple frames in the background and finally picks the best one to display while discarding the rest, if I understand it right in that regard, one is working in parallel and the other in serial. Runahead is probably the ultimate method if you have enough parallel processing power for it. But I think triple buffering could be a very good choice to have on slower computers and it would be compatible with all games like standard Vsync.
It’s pretty interesting that the Raspberry Pi gets more lag than Windows, could it be simply because of difference in processing speed? What about an older Pentium III, P4 or Athlon XP, does Windows still have less input lag then?
(I’m rocking a Pentium N3160 on this system I think it’s around 3 times as fast compared to Pi3 but it’s hard to compare x86 to ARM directly)