Need help to understand HDRP scene frame structure in profiler

So, there are 5 main parts in the frame:

1 - my code
3 - CPU part of HDRP code

But what are 2, 4 and 5? Could anyone please explain these parts and maybe name a few things that could be done first to try to reduce length of parts 3 and 4?

2, 4 and 5 are the actuall Unity Editor running. This is why its recomended to make a development build and profile it rather than profile directly in the editor. As for reducing the time for 3 well you just have to render less. Decrease the number of realtime shadow casting lights, render less geometry by baking occlussion culling for your scene, reduce the complexity of the geometry, use Lods where you dont cast shadows at the lowest lod and using the new shadow caching features are some of the simpler fixes.

1 Like

There’s also the standalone profiler, which has a few bugs in some versions but generally pretty stable

It generally helps detach the editor overheads more without having to build.

You’d still need to build to run GPU profiling in most hardware cases, but you can still see some data from editor

1 Like

Thanks, guys. I have another question.

Is it correct that “Gfx.WaitForPresentOnGfxThread” segment means that GPU computations are the bottleneck in the frame?

You can read the docs here https://docs.unity3d.com/Manual/profiler-markers.html

1 Like

Also, for GPU profiling you don’t need to make a build. GPU performance metrics from the profiler are accurate in editor and build, but the CPU isn’t, a lot of overhead in editor.