I’ve been experiencing spikes in my game even when things were already loaded until I noticed that it happens right before an object with a transparent material was about to enter in camera. This spike happens with a Sphere and the simplest Transparent Material. This is the profiler at the spike, and the material applied to a Sphere.
The issue disappears if I disable “Refraction” from the Frame Settings, even though the material refraction model is marked as “None”. I’m using refraction for other materials in other parts of the project, so deactivating it is not an option, but maybe it gives you a clue.
If someone else encounters this issue, after a lot of testing, I found out that this issue only happens when using D3D12.
The spike disappears when using D3D11.