Re: Emulating GSync at fixed refresh rate? [triple buffer]
Posted: 29 Jan 2014, 13:55
I did a small experiment today. As we all know, tearing is the result of sending a new frame to the monitor when it's not yet finished displaying the previous frame that was sent. So I thought, what if we match the frequency at which we sent frames exactly to the monitor's refresh rate, and time it in such a way that each frame is sent at the exact right moment?
There's an engine that allows fine frame capping. The Source engine. In this case, Gold Source. So I fired up Counter-Strike Condition Zero and played around with fps_max (with V-Sync disabled, of course.) The sweet spot for my monitor seems to be 59.5055 FPS (yes, you can use floats as values.) With that value, the tearing line always stays on the same spot. I then made two key binds for 59.5055 and 59.6. So I set 59.6, observe the tearing line moving upwards, and when it's at the top of the screen, I press the key for 59.5055. Now the tearing line is out of view and doesn't come back. I get zero input lag and no tearing.
With newer games this doesn't work for long, since there can be stutters (when loading new assets and such) which will destroy the timing and the tearing line can then move to a visible spot again. But with old games such as Gold Source ones (like CS 1.6 and CS CZ), this works for quite a long period of time. At least in Linux. In Windows it appears that the timing is destroyed more often.
This made me wonder though if it would be possible for a rendering engine to do that on its own. That is, turning V-Sync off and manually time everything in such a way that the tearing line isn't visible. Could the monitor's vblank signal be utilized for this but without actually doing full V-Sync?
There's an engine that allows fine frame capping. The Source engine. In this case, Gold Source. So I fired up Counter-Strike Condition Zero and played around with fps_max (with V-Sync disabled, of course.) The sweet spot for my monitor seems to be 59.5055 FPS (yes, you can use floats as values.) With that value, the tearing line always stays on the same spot. I then made two key binds for 59.5055 and 59.6. So I set 59.6, observe the tearing line moving upwards, and when it's at the top of the screen, I press the key for 59.5055. Now the tearing line is out of view and doesn't come back. I get zero input lag and no tearing.
With newer games this doesn't work for long, since there can be stutters (when loading new assets and such) which will destroy the timing and the tearing line can then move to a visible spot again. But with old games such as Gold Source ones (like CS 1.6 and CS CZ), this works for quite a long period of time. At least in Linux. In Windows it appears that the timing is destroyed more often.
This made me wonder though if it would be possible for a rendering engine to do that on its own. That is, turning V-Sync off and manually time everything in such a way that the tearing line isn't visible. Could the monitor's vblank signal be utilized for this but without actually doing full V-Sync?