- Home /
rendering to buffer faster than screen refresh
Is there a stupid-quick way to get Unity to render to a buffer as fast as the GPU can render, even if the buffer only copies to the screen at the monitor's vsync rate? What I'm thinking of doing here is a motion-blur postprocess effect which accumulates over as many execution-"frames" as possible per display-frame. When I'm not vsyncing, I can easily run 150-500fps, which makes me think that I ought to be able to get a nice smooth multi-pass blur going every display-frame. The only question is whether I can get Unity to do that for me, or whether I need to redo my execution timing to manually increment-and-render n times per frame.
My first thought might be to turn vsync off and use 2 cameras, one of which renders with motion blur to a texture, the other of which somehow waits for vsync before GUI-rendering that texture on itself and clearing it. But I don't know offhand if there's a way to wait for vsync when vsync is disabled in quality settings...
Answer by sean · Feb 23, 2012 at 10:54 PM
Kinda-half-ish: Looks like this is Unity's native behavior when you turn off VSync. So just putting the stock blur shader on a camera and maybe a dynamic tuning script to keep the effective blur rate (actual blur rate * number of renders per display frame) steady when you tun off vblank will get most of the way there. If you don't mind tearing (which you may not, if you're bluring the heck out of everything anyway), this is quick and simple. Doing any sort of double-buffering with multiple passes per frame, however, may require more code.
Your answer
![](https://koobas.hobune.stream/wayback/20220613064407im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Refreshrates and vsyncCount, what code should be applied? 0 Answers
particle systems' physics heavily depends on framerate?? 1 Answer
Blur the camera and overlay them (Add) 0 Answers
Timing of WaitForEndOfFrame relative to vertical blank onset? 3 Answers
Character Controller.isGrounded flickers true/false while stationary, but not while moving/jumping 0 Answers