Need help understanding the GPU Visualizer

So, I am trying to optimize the project I am working on, however the GPU Visualizer seems to be giving me unexpected results. For instance, I ran a visualization and saw a large chunk of time going to ClearTranslucentVolumeLighting (2.66ms) so I decided to turn it off using the console command “r.TranslucentLightingVolume = 0” It got rid of this, but it boosted my “Lights” time by (2.27ms).

Now I understand frame for frame things will be different and the numbers will change, but I see the approximately 1:1 ratio all the time. I disable one feature that is taking up a lot of time and basically the same amount of time is added to something new.

I cannot seem to find any real documentation on what each of the different processes listed here do, so while I can make assumptions I don’t really know what to look at or what to change. For example, under PrePass there is “PosOnlyOpaque” (.29ms) followed by two “Opaque” processes (.36ms) (.02ms). I get that it is running in the PrePass, but I am unsure what the difference in these 3 processes or what exactly they are doing which makes it hard to track down if there is an issue there that I can trim down.

I also get a “ParticleSimulation” process that occasionally jumps up to around .5ms but I have no particle effects/emitters on the screen.

Then there is almost always two “SlateUI” processes at the bottom, but occasional there is only 1. What causes these? Why is it inconsistent when looking in just one direction and not moving?

On the 2.6ms that seems to move around - that’s a common artifact with GPU timestamps, which is how these GPU tasks are measured. Just ignore it (once you identify it). Some things that have been known to make this timing artifact particular bad are running through a Head Mounted Display (VR) or have vsync enabled.

I usually use the log output in Windows → DeveloperTools → OutputLog instead of the UI because it is chronological and therefore makes more sense as the frame is being built up.

Then there is almost always two “SlateUI” processes at the bottom, but occasional there is only 1. What causes these?

I would guess there’s one draw event per slate viewport being rendered. The profiler UI itself is a slate viewport.

I cannot seem to find any real documentation on what each of the different processes listed here do, so while I can make assumptions I don’t really know what to look at or what to change.

There’s a description of the high level rendering order here

It is necessarily technical.

Some things I can gleam from your screenshot:

  • You have a movable skylight, costs .7ms. Make sure this is intended (stationary or static are cheaper)
  • Bunch of GPU time under Lights. You have to expand to see more (or look at the log, it’s better). This is usually dynamic shadowing cost.
  • Prepass / base pass costs are usually based on triangle count, which can be helped by LOD. Use shader complexity viewmode to figure out which materials have high instruction counts.

Sorry it took so long to get back to you, out of office all weekend.

So basically, ignore the skipping around of the random time and ignore at least 1 of the SlateUI components.

Thanks for the link, I have looked at it before, and I generally understand whats in there, but the specific subtasks are where I am getting confused.

I am aware of the lighting costs and tri count. We have one particularly bad scene that is looking down a long straight path and were working to optimize it and the entire scene is dynamically lit, so It is pretty bad haha.

Thanks for the assistance though, at least I can stop worrying about those 2 things too much and focus on real issues.