I am, and have been experiencing performance spikes in my HDRP Project.
OUTLINE OF ISSUE:
-I have a first person player controller.
-I have a world in which there are assets (some i made myself, others off the store, these have textures, but no fancy shaders, (Mostly HDRP/Lit))
-You can walk around this world (there is a terrain, with trees, foliage, grass)
-Camera clipping plane far is set very low (i assumed this would help with the performance, about 100 meters)
-I disabled all post processing to gather all of the following data, along with light sources which cast shadows (the sun)
When i look around with the mouse look, a large performance spike happens, not all of the time, and there is no set interval at which this happens. This can happen in play mode multiple times, there does not seem to be a limit, past which it stops happening. Sometimes these spikes happen after one another, I could move my mouse for 3 seconds before the first one happens, then another can happen a second later, but not always.
To me, this seems to be random
MY CURRENT UNDERSTANDING OF THE ISSUE
I went to the profiler and here is one such spike:
This seems to be something to do with the culling that HDRP does.
NOTE: I have disabled occlusion culling in order to rule that out as a possible cause, and i set it to false on the main camera
This lead me to believe that it is an issue with the frustum culling, which would make sense, considering that the spike only happens when the mouse moves.
IT IS ALSO CONNECTED TO TEXTURES
As seen here, there is a long list of textures which are being read during each of the spikes.
Here is a video, which illustrates how each time a spike happens, its the exact same “HDRenderPipeline.PrepareAndCullCamera()” which ends up reading a bunch of textures.
You may also see how each time the spike occurs, it is with a different set of textures (I assume that this is due to which direction i currently looked, which lead to different textures being needed)
The Video:
Disabling every asset and walking around in just the terrain, with the trees, grass and foliage removes the spikes. But i dont believe that ALL my assets have a problem, though when i look, its always a different asset… and some of these i made myself, they have 3 maps, Albedo, Normal and Mask, with a HDRP/Lit shader.
There seems to be a fundamental problem with just loading in a new texture, and i have looked everywhere to try narrow this down but i seem to be the only one with this specific problem.
A test to illustrate how i can replicate this:
I walked around in the game world, without moving my mouse, and the spike did happen once… this is most likely due to me walking sideways, so the camera frustum would have had encountered a new asset, but not as many things as when i looked around.
I the picked up an item into the players hand, which caused a spike, due to the fact that the item “bolt cutter” was not previously on screen.
To me this all boils down to somehow not being able to asynchronously load in a new texture for an asset which was just viewed for the first time.
CURRENT CONCLUSION
Unfortunately i ignored this issue for a while, so i dont know when it began or what i changed at that time.
Right now i dont know my next step forward, ive looked everywhere to see if anyone had the same problem, i even asked chatgpt to help out, but nothing seems to work, except for disabling most of the assets.
I want to reiterate that i dont believe this is a problem with the assets themselves, as i have made a few myself, and before my problem began, they were already in the scene at that point, yet they now show up in my profiler sometimes, along with the other assets.
I expect this to probably be something on my part, maybe i check a box by accident that i shouldnt have, or i previously made an “optimisation” attempt which had other implications that i was not aware of.
I have looked into texture streaming, maybe that could help, but from the limited time ive tried it, it did not seem to fix the issues which i was having.
I hope to get some help on this because i feel totally lost that the moment
Here are some additional screenshots, all of the same event:










