Rendering Profiler 显示有关 CPU 和 GPU 为渲染场景完成的工作的渲染统计信息和信息。您可以使用这些统计信息来衡量场景不同区域的资源强度,这对优化很有用。
该图表显示您的应用程序渲染的批次 (Batches)、SetPass 调用 (SetPass Calls)、三角形 (Triangles) 和顶点 (Vertices) 的数量。下方的面板将显示更多渲染统计信息,这些统计信息与 GameView Rendering Statistics 窗口中显示的统计信息一致。
。
Rendering Profiler 模块的图表分为四个类别:
图表 | 描述 |
---|---|
Batches | Unity 在一帧内处理的批次数。 |
SetPass Calls | Unity 在一帧中切换用于渲染游戏对象的着色器通道的次数。一个着色器可能包含多个着色器通道,每个通道以不同的方式渲染场景中的游戏对象。 |
Triangles | Unity 在一帧内处理的三角形数。 |
Vertices | Unity 在一帧内处理的顶点数。 |
当您单击 Rendering Profiler 模块时,窗口下半部分的详细信息窗格会显示详细的渲染统计信息。这些统计数据类似于 Rendering Statistics 窗口中显示的内容。
在详细信息窗格的左上角,选择 Open Frame Debugger 以打开帧调试器,它为您提供有关渲染帧的各个绘制调用的信息。
这些统计信息也可通过 ProfilerRecorder API 及 Profiler Module Editor 获得,因此您可以将它们添加到自定义性能分析器模块中。
统计信息 | 描述 |
---|---|
SetPass Calls | Unity 在一帧中切换用于渲染游戏对象的着色器通道的次数。一个着色器可能包含多个着色器通道,每个通道以不同的方式渲染场景中的游戏对象。 |
Draw Calls | Unity 在一帧内发出的绘制调用总数。Unity 在将游戏对象渲染到屏幕时发出绘制调用。这个数字包括非批量绘制调用以及动态和静态批量绘制调用。 |
Total Batches | Unity 在一帧内处理的批次总数。这个数字包括静态和动态批次。 |
Tris | Unity 在一帧内处理的三角形数。 |
Verts | Unity 在帧期间处理的顶点数。 |
(Dynamic Batching) | 本部分包含有关动态批处理的统计数据。 |
Batched Draw Calls | Unity 合并为动态批次的绘制调用数。 |
Batches | Unity 在帧期间处理的动态批次数。 |
Tris | 动态批次中包含的游戏对象中的三角形数。 |
Verts | 动态批次中包含的游戏对象中的顶点数。 |
(Static Batching) | 本部分包含有关静态批处理的统计数据。 |
Batched Draw Calls | Unity 合并为静态批次的绘制调用数。 |
Batches | Unity 在一帧内处理的静态批次数。 |
Tris | 静态批次中包含的游戏对象中的三角形数。 |
Verts | 静态批次中包含的游戏对象中的顶点数。 |
(Instancing) | 本部分包含有关 GPU 实例化的统计数据。 |
Batched Draw Calls | Unity 合并为实例化批次的绘制调用数。 |
Batches | Unity 在一帧内渲染实例化游戏对象的处理批次数。 |
Tris | 实例化游戏对象中的三角形数。 |
Verts | 实例化游戏对象中的顶点数。 |
Used Textures | Unity 在帧期间使用的纹理数以及纹理使用的内存量。 |
RenderTextures RenderTextures Bytes |
Unity 在帧期间使用的 RenderTextures 数以及 RenderTextures 使用的内存量。 |
RenderTextures Switches | Unity 在帧期间将一个或多个 RenderTextures 设置为渲染目标的次数。 |
Screen | The resolution of the screen and the amount of memory it used. |
VRAM Usage | How much video memory Unity allocated to render the frame. |
VBO Total | The number of compute buffers on the GPU. |
VB Uploads | The amount of geometry that the CPU uploaded to the GPU in a frame. This represents the vertex/normal/texcoord data. There might already be some geometry on the GPU. This statistic only includes geometry that Unity transfers in a frame. |
IB Uploads | The amount of geometry that the CPU uploaded to the GPU in a frame. This represents the triangle indices data. There might already be some geometry on the GPU. This statistic only includes geometry that Unity transfers in a frame. |
Shadow Casters | 在一帧中投射阴影的游戏对象的数量。如果一个游戏对象投射多个阴影(因为多个光源照亮它),该对象投射的每个阴影都有一个条目。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.