#URP Frame Debugger & Profiler

1 messages · Page 1 of 1 (latest)

cobalt loom
#

I made this post yesterday about the Frame Debugger and the Profiler:
https://forum.unity.com/threads/how-to-use-the-frame-debugger-and-profiler-to-identify-bottlnecks.1418674/

I see that my rendering is taking too long:
RenderPipelineManager.DoRenderLoop_Internal() takes around 8-16ms per frame depending what the camera is looking at. I need to get it down to around 4-6ms to achieve my 60FPS target.

But I do not know what exactly in my rendering is taking so long.

Is there any way I can know how many 'ms' It takes per draw call / draw group in the frame debugger by using it in conjunction with the profiler? That would help me identify which parts are slow so that I can change them.

I'm using Unity 2020.3.30f and I don't want to update unless absolutely necessary because I'm close to releasing my game

dawn hawk
#

Heyhey!
The Frame Debugger is helpful when trying to debug the frame. In your case it's showing you have quite a few draw calls and it's mostly transparent objects, which usually mean overdraw issues. It's also showing you that things are batching quite badly. Clickin each event there should give you a reason for why it's not batched better.

Immediately I spot a few things you should take a closer look at:

  1. 1003 SetPass calls. Those are expensive.
  2. 9000 batches. Take a look at the events and see why.
  3. 47 skinned mesh characters
  4. 3 cameras in the scene

It feels like you're using a lot of different shaders & materials in your game. That could be a reason for many issues there.

I also recommend profiling the built player instead of in the Editor to see the actual performance better. Then using a platform compiler like XCode & Pix should give you a good hint at where more bottleneck are happening on the GPU.

cobalt loom
#

Thank you!
That already gives me something to go on.

What do you mean by

9000 batches. Take a look at the events and see why.
Where do I find those events?

Do you mean this (screenshot below)

I have a few:

SRP: First call from ScriptableRenderLoopJob
SRP: Node material requires device state change
SRP: Node use different shader keywords
Where can I find more information on what those mean and how to fix them?

I already removed the 3rd camera which was not needed and I should be able to do something about the skinned mesh characters, I'll try to limit it to 10-15.

So I guess the things I should focus on are SetPass calls and batching, which I'm not super familiar with.

I am using alot of materials because I'm using many assets from the asset store, combined with my own assets, and I sometimes use multiple materials on a single object to add transparent effect layers on top.