Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Rendering Profiler module reference

Reference for the Rendering Profiler module, which displays rendering statistics and information about what the CPU and GPU do to render the scene.
Read time 14 minutesLast updated 4 days ago

The Rendering Profiler displays rendering statistics and information about what the CPU and GPU do to render the Scene. You can use these statistics to measure the resource intensity of different areas of the Scene, which is useful for optimization.
To open the Profiler window, go to Window > Analysis > Profiler.
The chart displays one set of counters at a time. The lower pane displays more rendering statistics, which match the ones shown in the Game view Rendering Statistics window.

The Rendering Profiler module

Chart modes

To select which set of counters the chart displays, use the chart mode dropdown in the module toolbar. The frame range stays the same when you change the mode.
The dropdown contains the following modes:

Mode

Description

RenderingDisplays the batch, shader pass, triangle, and vertex counts for a frame. The chart displays this mode by default. For more information on Rendering counters, refer to Rendering.
GRD PipelineDisplays the CPU time the GPU Resident Drawer spent in each stage of a frame. For more information on GRD Pipeline counters, refer to GRD Pipeline.

Note: This mode displays data only for the frames in which the GPU Resident Drawer ran.
GRD CoverageDisplays the number of renderers the GPU Resident Drawer drew, and the number it excluded. For more information on GRD Coverage counters, refer to GRD Coverage.

Note: This mode displays data only for the frames in which the GPU Resident Drawer ran.
GRD InstancesDisplays the number of instances the GPU Resident Drawer processed, and the reason it culled each of them. For more information on GRD Instances counters, refer to GRD Instances.

Note: This mode displays data only for the frames in which the GPU Resident Drawer ran.
GRD BatchesDisplays how efficiently the GPU Resident Drawer batched the renderers it drew. For more information on GRD Batches counters, refer to GRD Batches.

Note: This mode displays data only for the frames in which the GPU Resident Drawer ran.
Each mode displays the counters from one Profiler category. The Rendering counters belong to the Render category, and the GRD counters belong to the GPU Resident Drawer category. Use the category to find a counter in the Profiler Module Editor or to read it with the ProfilerRecorder API.

Rendering

The Rendering mode contains the following counters:

Counter

Description

Batches CountDisplays the number of batches Unity processed during a frame.
SetPass Calls CountDisplays the number of times Unity switched which shader pass it used to render GameObjects during a frame. A shader might contain several shader passes and each pass renders GameObjects in the scene differently.
Triangles CountDisplays the number of triangles Unity processed during a frame.
Vertices CountDisplays the number of vertices Unity processed during a frame.

GRD Pipeline

The GRD Pipeline mode contains the following counters:

Counter

Description

Data CollectionDisplays the time the GPU Resident Drawer spent collecting renderer data from the scene.
Batch BuildingDisplays the time the GPU Resident Drawer spent building the batches for the frame.
CPU to GPU UploadDisplays the time the GPU Resident Drawer spent uploading instance data to the GPU.
Culling ScheduleDisplays the time the GPU Resident Drawer spent building the culling job graph for each camera. This value doesn't include the time the culling jobs take to run.

GRD Coverage

The GRD Coverage mode contains the following counters:

Counter

Description

GRD RenderersDisplays the number of renderers the GPU Resident Drawer drew during a frame.
Excluded RenderersDisplays the number of renderers the GPU Resident Drawer excluded during a frame, which fell back to another rendering path. For more information, refer to GPU Resident Drawer exclusion reasons reference.
Non-Rendering RenderersDisplays the number of renderers that have a problem with their assets, such as a missing mesh or an unassigned material. These renderers produce no draw call.
Inactive RenderersDisplays the number of renderers whose GameObject or Renderer component is disabled. No rendering path draws these renderers.
Coverage %Displays the number of GRD Renderers as a proportion of GRD Renderers and Excluded Renderers.

Note: Unity excludes Non-Rendering Renderers and Inactive Renderers from this calculation, because neither describes a choice between the GPU Resident Drawer and another rendering path.

GRD Instances

The GRD Instances mode contains the following counters:

Counter

Description

Total InstancesDisplays the number of instances the GPU Resident Drawer processed during a frame. This is the sum of all the other counters in the GRD Instances mode.

Note: The GRD Instances counters include only the instances Unity culls for cameras, not the instances it culls for shadow maps. Unity adds the instances for each camera, so a second camera that renders the same instances doubles the Total Instances value.
Visible InstancesDisplays the number of instances that remain visible after culling.
Disabled Renderer CulledDisplays the number of instances Unity culled because their Renderer component is disabled.
Layer CulledDisplays the number of instances Unity culled because the camera's culling mask excludes their layer.
Frustum CulledDisplays the number of instances Unity culled because they fall outside the camera frustum.
Occlusion CulledDisplays the number of instances Unity culled with occlusion culling.
GPU Occlusion CulledDisplays the number of instances Unity culled with GPU occlusion culling.
LOD Group CulledDisplays the number of instances Unity culled because their LOD Group selected a different level of detail.
Small Mesh CulledDisplays the number of instances Unity culled because they cover too few pixels on screen.
Other CulledDisplays the number of instances Unity culled for any other reason.

GRD Batches

The GRD Batches mode contains the following counters:

Counter

Description

Batch CountDisplays the number of batches the GPU Resident Drawer drew during a frame.
Unique MaterialsDisplays the number of distinct materials across the batches the GPU Resident Drawer drew during a frame.
Unique MeshesDisplays the number of distinct meshes across the batches the GPU Resident Drawer drew during a frame.
Single-Instance BatchesDisplays the number of batches the GPU Resident Drawer drew during a frame that contain a single instance, which instancing doesn't improve.

Module details pane

When you click on the Rendering Profiler module, the details pane in the lower half of the window displays detailed rendering statistics. These statistics are similar to the statistics shown in the Rendering Statistics window.
In the top left of the details pane, select Open Frame Debugger to open the Frame Debugger, which gives you information on individual draw calls that rendered the frame.
You can access all these statistics through the ProfilerRecorder API and in the Profiler Module Editor so you can add them to a custom Profiler module. To find the name of each counter, refer to Rendering counters.
The details pane displays the following statistics.

Frame statistics

The top row of the details pane contains the following statistics:

Statistic

Description

Accessible in Release Players

SetPass callsDisplays the number of times Unity switched which shader pass it used to render GameObjects during a frame. A shader might contain several shader passes and each pass renders GameObjects in the scene differently.Yes
Draw callsDisplays the total number of draw calls Unity issued during a frame. Unity issues draw calls when it renders GameObjects to the screen.Yes
TrianglesDisplays the number of triangles Unity processed during a frame.Yes
VerticesDisplays the number of vertices Unity processed during a frame.Yes

Batching statistics

The details pane displays the following batching statistics:

Statistic

Description

Accessible in Release Players

Dynamic BatchingDisplays the number of draw calls Unity combined with dynamic batching, and the number of batches.No
Static BatchingDisplays the number of draw calls Unity combined with static batching, and the number of batches.No
InstancingDisplays the number of draw calls Unity combined with GPU instancing, and the number of batches.No

Resources

The bottom row of the details pane contains the following statistics. Each statistic appears only if Unity captured data for it.

Statistic

Description

Accessible in Release Players

BuffersDisplays the total number of GPU buffers and the memory they used. This includes vertex, index and compute buffers, and all internal buffers required for rendering.Yes
VBO uploadsDisplays the number of times the CPU uploaded vertex, normal, and texture coordinate data to the GPU during a frame, and the amount of data it uploaded. This statistic includes only the geometry Unity transfers in a frame, so there might already be geometry on the GPU.Yes
IBO uploadsDisplays the number of times the CPU uploaded triangle index data to the GPU during a frame, and the amount of data it uploaded. This statistic includes only the geometry Unity transfers in a frame, so there might already be geometry on the GPU.Yes
TexturesDisplays the number of textures Unity used during a frame, and the amount of memory those textures used.No
RT changesDisplays the number of times Unity set one or multiple RenderTextures as render targets during a frame.Yes
Skinned meshesDisplays the number of Skinned Mesh Renderers that were visible during a frame.Yes

GPU Resident Drawer

If the GPU Resident Drawer ran during the frame you select, Unity displays a GPU Resident Drawer area in the details pane. Each section in this area appears only if Unity captured data for it.
The title row of the area can display the following badges. Hover over the renderer issues badge to display its breakdown by reason.

Badge

Description

renderer issuesDisplays the number of renderers that have a problem with their assets, such as a missing mesh or an unassigned material. These renderers produce no draw call.

Note: Unity excludes this value from Coverage %.
inactiveDisplays the number of renderers whose GameObject or Renderer component is disabled. No rendering path draws these renderers.

Note: Unity excludes this value from Coverage %.
The area contains the following sections.

Section

Description

GRD coverageDisplays a bar split into GRD, which is the number of renderers the GPU Resident Drawer drew, and Excluded, which is the number that fell back to another path. The trailing percentage is the number of GRD renderers as a proportion of both values. If there are exclusions, expand the GRD coverage row to display the count for each exclusion reason. For more information, refer to GPU Resident Drawer exclusion reasons reference.
CullingDisplays a bar that splits the instances the GPU Resident Drawer processed into Visible and the categories that removed the rest: Frustum, Occlusion, GPU occlusion, LOD group, Small mesh, and Other. The trailing percentage is the proportion of instances that are visible. Other combines Layer mask, Rendering disabled, and any remaining categories. Expand the row to display each of these separately.
LOD distributionDisplays the number of rendered instances at LOD 0, LOD 1, LOD 2, and LOD 3+. The trailing percentage is the number of instances Unity drew at an LOD level of an LOD Group, as a proportion of all instances the GPU Resident Drawer processed. Because the total includes culled instances, the percentage isn't a proportion of rendered instances.
PipelineDisplays the CPU time the GPU Resident Drawer spent in the frame, split into Data collection, Batch building, Upload, and Culling schedule, with the total in milliseconds. Select the Pipeline row to display the individual stages, including the Transform, Motion, Probe, and Component override dispatch stages.
To use these statistics to improve coverage in your project, refer to Analyze the GPU Resident Drawer in URP.

Availability in Players

The Rendering module Profiler counters are also available in Players. Use the ProfilerRecorder API to access Render Profiler module information in Players. Some Rendering counters are also available in Release Players. For more information, refer to Rendering counters.
The GPU Resident Drawer counters belong to the GPU Resident Drawer Profiler category. They're available only in the Unity Editor and in development Players, not in Release Players.
The following example contains a simple script that collects
SetPass Calls Count
,
Draw Calls Count
and
Vertices Count
metrics and displays those as TextArea.
using System.Text;using Unity.Profiling;using UnityEngine; public class RenderStatsScript : MonoBehaviour{ string statsText; ProfilerRecorder setPassCallsRecorder; ProfilerRecorder drawCallsRecorder; ProfilerRecorder verticesRecorder; void OnEnable() { setPassCallsRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "SetPass Calls Count"); drawCallsRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Draw Calls Count"); verticesRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Vertices Count"); } void OnDisable() { setPassCallsRecorder.Dispose(); drawCallsRecorder.Dispose(); verticesRecorder.Dispose(); } void Update() { var sb = new StringBuilder(500); if (setPassCallsRecorder.Valid) sb.AppendLine($"SetPass Calls: {setPassCallsRecorder.LastValue}"); if (drawCallsRecorder.Valid) sb.AppendLine($"Draw Calls: {drawCallsRecorder.LastValue}"); if (verticesRecorder.Valid) sb.AppendLine($"Vertices: {verticesRecorder.LastValue}"); statsText = sb.ToString(); } void OnGUI() { GUI.TextArea(new Rect(10, 30, 250, 50), statsText); }}
The Rendering counters belong to the ProfilerCategory.Render Profiler category.
If you want to highlight the selected Rendering counters in a custom module, use the Module Editor to configure the chart and detailed view.

Rendering counters

Use the following counter names with the
ProfilerCategory.Render
category in the ProfilerRecorder API or the Profiler Module Editor.

Counter

Description

Accessible in Release Players

SetPass Calls Count
The number of times Unity switched which shader pass it used to render GameObjects during a frame.Yes
Draw Calls Count
The total number of draw calls Unity issued during a frame.Yes
Triangles Count
The number of triangles Unity processed during a frame.Yes
Vertices Count
The number of vertices Unity processed during a frame.Yes
Standard Draw Calls Count
The number of draw calls Unity issued without batching.Yes
Standard Indirect Draw Calls Count
The number of indirect draw calls Unity issued without batching.Yes
Standard Instanced Draw Calls Count
The number of draw calls that GPU instancing optimized.Yes
SRP Batcher Draw Calls Count
The number of draw calls that the SRP Batcher optimized.Yes
BRG Draw Calls Count
The number of draw calls that the BatchRendererGroup API optimized, which includes the draw calls the GPU Resident Drawer issued.Yes
BRG Indirect Draw Calls Count
The number of indirect draw calls that the BatchRendererGroup API optimized.Yes
Null Geometry Draw Calls Count
The number of draw calls that rendered no geometry.Yes
Null Geometry Indirect Draw Calls Count
The number of indirect draw calls that rendered no geometry.Yes
Dynamic Batches Count
The number of dynamic batches Unity processed during a frame.No
Dynamic Batched Draw Calls Count
The number of draw calls Unity combined into dynamic batches.No
Dynamic Batched Triangles Count
The number of triangles in the GameObjects included in the dynamic batches.No
Dynamic Batched Vertices Count
The number of vertices in the GameObjects included in the dynamic batches.No
Static Batches Count
The number of static batches Unity processed during a frame.No
Static Batched Draw Calls Count
The number of draw calls Unity combined into static batches.No
Static Batched Triangles Count
The number of triangles in the GameObjects included in the static batches.No
Static Batched Vertices Count
The number of vertices in the GameObjects included in the static batches.No
Instanced Batches Count
The number of batches Unity processed to render instanced GameObjects during a frame.No
Instanced Batched Draw Calls Count
The number of draw calls Unity combined into instance batches.No
Instanced Batched Triangles Count
The number of triangles in the instanced GameObjects.No
Instanced Batched Vertices Count
The number of vertices in the instanced GameObjects.No
Used Textures Count
The number of textures Unity used during a frame.No
Used Textures Bytes
The total memory size, in bytes, of the textures Unity used during a frame.No
Render Textures Count
The number of RenderTextures Unity used during a frame.Yes
Render Textures Bytes
The total memory size, in bytes, of the RenderTextures Unity used during a frame.Yes
Render Textures Changes Count
The number of times Unity set one or multiple RenderTextures as render targets during a frame.Yes
Used Buffers Count
The total number of GPU buffers. This includes vertex, index, and compute buffers, and all internal buffers required for rendering.Yes
Used Buffers Bytes
The amount of memory the GPU buffers used, in bytes.Yes
Vertex Buffer Upload In Frame Count
The number of times the CPU uploaded vertex, normal, and texture coordinate data to the GPU during a frame.Yes
Vertex Buffer Upload In Frame Bytes
The amount of vertex, normal, and texture coordinate data the CPU uploaded to the GPU during a frame, in bytes.Yes
Index Buffer Upload In Frame Count
The number of times the CPU uploaded triangle index data to the GPU during a frame.Yes
Index Buffer Upload In Frame Bytes
The amount of triangle index data the CPU uploaded to the GPU during a frame, in bytes.Yes
Shadow Casters Count
The number of GameObjects that cast shadows during a frame. If multiple lights light a GameObject, the GameObject has one entry for each shadow it casts.Yes
Visible Skinned Meshes Count
The number of Skinned Mesh Renderers that were visible during a frame.Yes
For the names of the GPU Resident Drawer counters, refer to the counter tables in Chart modes. The counter names match the names in the tables.

Additional resources