When should I clear an auxilliary render target?
- by Raptormeat
I'm using a few different render targets in my game in addition to the back buffer. These other render targets are only used in a few places, for specific tasks.
I'm wondering when I should be clearing them. Right now I clear all of my render targets at the beginning of the frame, and it seems like I'm waiting for all the textures to clear before the rest of the drawing gets underway.
Would it be more efficient to clear these textures later in the frame, when they aren't being used? Is there any hope of the GPU sort of clearing them "on the side" while unrelated rendering is happening? Or are these tasks always sequential and will I always need to wait for clearing?