I don’t know how to get rid of this, but every time after about a minute or two of running my game in either standalone or packaged, it will get consistent render time spikes each spaced about .3 seconds apart.
I didn’t know what aspect of the game was causing this, so I ran a CSVProfle over the game and I found the pattern showing up in the rendering pipeline. I will put the two svgs here.
The first shows a run of the game where it was smooth for a little bit then had the spike pattern show up later on.
(Dark Blue= FrameTime, Light Blue = RHI Thread Time, Orange = DrawCalls) idk why the key is blurry
.
The second svg (the norm) shows the spikes happening throughout the entire game.
(Dark Blue= FrameTime, Light Blue = RHI Thread Time, Orange = DrawCalls) idk why the key is blurry
.
What’s weird, is if I don’t run the game for a while, I can get the first kind of graph where it waits a bit before spiking. But if I run the game multiple times in a row I will get the second kind of graph where it spikes from the start. Any ideas as to why this is happening.
My project isn’t even a game yet. It’s not even close to being demanding. The character is just a basic low poly character, and the entire project right now is just the player running around on a plane. There is cloth sim on the player, so I disabled that but the issue persists.
The strangest part is that it’s not always immediate, but all parts of the project are present from the start. This implies that there is a buildup of something but I don’t know what.
TLDR: Weird spikes in render time happen after a build up of something (not sure what).
Any ideas?
EDIT
I believe that the issue may be with my sky sphere. It is just a massive sphere with a texture on it. I’m not sure why this causes random spikes, but after removing it the issue has momentarily subsided. I will update if this is just a coincidence, but is there any reason that this would mess with rendering in this way?