100FPS without vsync and 15fps with vsync

Hi Everyone,

I’m hoping for some guidance.

My project is still in its early stages. The game really isnt doing any heavy lifting yet.
Almost all of my game logic is run via coroutines (and not in the update method)

In the editor, my game plays great with +100fps
In a build the game stutters and almost every other frame. (FPS drops to ~30)

In my investigation, I disabled vsync and made a build. This build ran at +100FPS

So I returned to vsync to see the effect it’s having on my game.

vsync off
FPS = +100FPS

vsynch every v blank
FPS = ~30FPS

vsync every second v blank
FPS = ~15FPS

I understand that vsync is there to delay the draw to prevent screen tearing, but this seems heavy price with game breaking stutter.

Is it a bug? is vsync broken?
Or is there something I’m missing?

thanks
j.



What version of Unity are you using it help alot…

This sounds correct to me. Looks like Vsync is locking your frame rate to the monitor refresh rate / requested frame rate.
Trying setting your Application.targetFrameRate to 60 or higher.

FYI, Gfx.WaitForPresent() is the GPU idling while the CPU waits to show the frame buffer.

using current GA release 2017.1.1f1

I agree that vsync should wait for target framerate, but if thats the case its doing so a little heavy handed as im seeing stuttering in my gameplay logic. (which are in coroutines not the update)

I’m not sure why you think that Update would be different to Coroutines. Coroutines run at the same rate as Update.

Is your gameplay logic running at less than 30fps?

when vsync is on my game logic appears to be negatively impacting running sub 30 fps

the result is elements on the screen starting to stutter and jump around.