I know it might be a bit of an odd/stupid question but do sprites that are “drawn” out of screen affect performance at all?
Mostly the gpu will clip them very very early still if they don’t need to be drawn the cpu is wasting time figuring out were to tell the gpu to draw them.
If you’re instancing to were its almost all on the gpu which is you probably are not then the answer is simply very very minorly aka no as they will get clipped super quick in the vertex shader.
If your talking about sprite batch calculating them each frame then the answer is depends on how many a few sprites probably are microscopic.
Best answer make a frame rate counter and check by drawing a ton of them out of bounds before and after without the draws to see what the actual difference is.
Yeah, i guess i was wondering if checking if the object to be rendered was on screen before rendering would be more performance heavy than just telling the program to render them anyway.
Sprites out of screen are still sent to the GPU and processed by the VertexShader - they just wont get processed by the PixelShader.
But it’s actually super easy to cull them beforehand, so there is almost no excuse to send them over to the GPU and waste StateChanges or bandwidth