Now I’m wondering about how to optimize the top offender “HZB SetupMips…” that costs 3.21ms. Any ideas where that cost comes from and how I improve it?
The level is mainly a big landscape that’s dynamically tesselated and obviously got a lot of texture repeats until the horizon line. And I use lightmapping.
I tried to change the Mip settings of the terrain textures I used (“Mip Gen Settings” and “Global Force Resident Mip Levels”) but that did not change much. (Or anything…)
Hi guys, I am also experiencing this issue.
I think it may be a 4.12 regression, as we upgraded from a 4.11 build, and this was not an issue in that version. 5ms for this pass on an i7 with a 980ti is insane!
It seems that it’s a problem that gets worse the longer the editor is running.
I had this problem as well. Out of nowhere, my build started seeing HZB Setup Mips of 8ms to 10ms. Luckily I had that build in Perforce, so I just downloaded a fresh build from scrtach, rebuilt my code and reloaded in editor. Now the HZB Setup is down to 0.5ms for the exact same level. Somehow something must get corrupted. Can anyone shed some light? I still have my old broken build.
looking at DeferredShadingRenderer.cpp and SceneOcclusion.cpp (the latter is where that stat is charged via BuildHZB). The following seems to trigger it:
if (bSSAO || bHZBOcclusion || bSSR)
{
BuildHZB(RHICmdList, Views[ViewIndex]);
}
so you might need the following to disable the call but this might disable screenSpace reflections and ambient occlusion.
That looks like a good way to side step the problem by disabling the features we wish to use, but it doesn’t address the problem where something seems to get corrupted and inflates HZB SetupMips improperly. Like I mentioned earlier, I saw this problem in my build. I got the exact same content/code from my Perforce depot, rebuilt, and the problem went away. It seems that some data is getting corrupted and causing HZB SetupMips to take excessive amounts of time.
yeah I was wondering if you disabled HZB entirely, would the time slowdown still show up but perhaps in the next step – is previous step messing up the state or seem internal to that SetupMips?
I’ve submitted UE-33448 for this to be investigated. It does seem higher when in the Editor/PIE modes, but when I tried in Standalone game the levels were closer to what I would expect.