- Home /
Gfx.waitForPresent kills performances
Hi there, I'm using Unity 5.1.1f1 Personal Edition and I have an issue in a scene in my game: it is quite big, but it is also well optimized with occlusion culling, LOD groups, etc. Testing the scene it shutters somethimes. Opening the Profiler, I discovered that was 'Gfx.WaitForPresent' causing the shuttering and I've tried to disabiliting the VSync and the shadows but it didn't work. 'Gfx.WaitForPresent' appears in both Forward and Deferred Rendering. What could I do?
My PC Specifications:
Windows 8.1 Pro 64 bit
Intel Core i5 4460 3.4 GHz
8 GB System RAM
NVidia GeForce GTX 745 whit 4GB VRAM
Answer by WillNode · Jul 15, 2015 at 11:44 AM
Gfx.WaitForPresent
is a wait time takes into next frame.
Wait time is needed for your game since your FPS has beyond than Monitor can do (it's around 60 Hz). if wait time isn't used, your game will do unnecessary calculations and just heating your PC up.
but somebody (i don't remember where) said that if your run unity in Compabitily mode (Windows XP Service 3). this Gfx.WaitForPresent
will be not popped out on profiler.
Yeah, I know that is a sort of VSync or something like that, but the fps are around 25fps. I have the same issue with a terrain.
running game with some editor tab opened (heavy task like inspector & profiler) also could make this Gfx
more increased.
maybe you could try to maximize the game window while playing.
The game runs better in a $$anonymous$$imized player (maximized resolution=1600x900 (20/25 fps) vs $$anonymous$$imized resolution=720x480 (45/50fps)). I've fixed this issue in the occluded scene with occlusion culling and dividing the scene in different parts and activating them only when passing though loading doors, but I still don't know what to do with the "open-air" scene.