- Home /
Best way to do a primary full-framerate main thread, Secondary low-framerate background rendering thread?
I have a Unity situation where:
Primary onscreen needs to be run at full framerate=Hz (full 60fps, 90fps or 120fps). Rendering is intentionally simplified to take only about 1ms to 2ms on most target systems. It needs to stay at full framerates as much as possible, much like VR requires.
Secondary offscreen (Camera rendered to texture) that can render slowly over multiple refresh cycles, with erratic render times. Occasionally will spike to 50ms+. It can be a low priority thread.
There seems to be multiple hacky ways to do this (segmented/staged rendering, background rendering, etc), but what is the most efficient/easiest way? In a way that (2) is less likely to interfere with (1)?
This is a from-scratch project (I've worked in other engines, like MonoGame, so we are relatively new to Unity specifically). So best-practices and existing code samples are welcome. Can I just have the Camera render to a texture in a separate thread, without it blocking/intefering with the simple-graphics thread?
I found information that didn't look promising, so I don't want to architecture myself into a corner, so that's why I am posting first.
Appreciated!
Your answer
![](https://koobas.hobune.stream/wayback/20220613000638im_/https://answers.unity.com/themes/thub/images/avi.jpg)