Unity官方文档之“图形性能优化-帧调试器”的翻译

Frame Debugger 帧调试器

The Frame Debugger lets you freeze playback for a running game on a particular frame and view the individual draw calls that are used to render that frame. As well as listing the drawcalls, the debugger also lets you step through them one-by-one so you can see in great detail how the scene is constructed from its graphical elements.

帧调试器可以让你冻结回放运行中游戏的某一帧,然后看那一帧渲染的draw calls。和列出draw calls一样,帧调试器也允许你逐帧调试,所以你可以看到场景如何从它的图形元素构建的大量细节。

Using the Frame Debugger 使用帧调试器

The Frame Debugger window (menu: Window > Frame Debugger) shows the drawcall information and lets you control the “playback” of the frame under construction.

帧调试器窗口(菜单:窗口 > 帧调试器)显示drawcall信息,并且允许你控制构建过程帧的“回放”。

The main list shows the sequence of drawcalls (and other events like framebuffer clear) in the form of a hierarchy that identifies where they originated from. The panel to the right of the list gives further information about the drawcall such as the geometry details and the shader used for rendering.

主列表以资源最初的组织结构格式显示drawcalls序列(和其它事件比如帧缓冲清除),列表右侧的板面显示了关于drawcall更详细的信息,比如几何细节和渲染使用的着色器。

Clicking on an item from the list will show the scene (in the Game view) as it appears up to and including that drawcall. The left and right arrow buttons in the toolbar move forward and backward in the list by a single step and you can also use the arrow keys to the same effect. Additionally, the slider at the top of the window lets you “scrub” rapidly through the drawcalls to locate an item of interest quickly. Where a drawcall corresponds to the geometry of a GameObject, that object will be highlighted in the main Hierarchy panel to assist identification.

点击列表中的一个条目,会(在游戏视图中)随着它的出现显示场景和它的drawcall。工具栏中的左右箭头按钮可以前向或后向选中列表中的条目,使用键盘上的方向键也可以。此外,窗口顶部的滚动条可以让你快速的略过drawcalls定位感兴趣的条目。当一个drawcall对应于一个物体的几何元素时,这个物体在列表面板的资源标识符会高亮。

If rendering happens into a RenderTexture at the selected draw call, then contents of that render texture are displayed in the Game View. This is useful for inspecting how various off-screen render targets are built up, for example diffuse g-buffer in deferred shading:

如果选中的drawcall是渲染到纹理(RenderTexture),游戏视图中会显示渲染纹理的图像。这对于检查各种离屏渲染目标如何创建有用,比如延迟着色的散射物体缓冲(g-buffer,Geometry Buffer)。

Or looking at how the shadow maps are rendered:或者看看如下,阴影是如何被渲染的:

Render target display options 渲染目标显示选项

At the top of the information panel is a toolbar which lets you isolate the red, green, blue and alpha channels for the current state of the Game view. Similarly, you can isolate areas of the view according to brightness levels using the Levels slider to the right of these channel buttons. These are only enabled when rendering into a RenderTexture.

信息面板的顶部是一个工具栏,允许你分离游戏视图当前状态的红、绿、蓝和透明通道。同样的,你可以使用通道按钮右边的等级滑动条来根据亮度等级分离视野区域。只有渲染到纹理时才能这样。

When rendering into multiple render targets at once you can select which one to display in the game view. Shown here are the diffuse, specular, normals and emission/indirect lighting buffers in 5.0 deferred shading mode, respectively:

当一次渲染到多个渲染目标时,你可以选择在游戏视图中显示哪一个。下面的视图分别是Unity 5.0延迟着色模式的散射、镜面反射、法线和发射或非直线光:

Additionally, you can see the depth buffer contents by picking “Depth” from the dropdown:

此外,你可以通过选择下拉菜单的“深度”看到深度缓存内容:

By isolating alpha channel of the render texture, you can see occlusion (stored in RT0 alpha) and smoothness (stored in RT1 alpha) of the deferred g-buffer:

通过分离渲染到纹理的透明通道,你可以看到延迟g-buffer的闭合(RT0透明通道中)和平滑(RT1透明通道中):

The emission and ambient/indirect lighting in this scene is very dark; we can make it more visible by changing the Levels slider:

这个场景中的发射光和环境光很暗,我们可以通过滑动等级滚动条让它更能被看清楚:

Alternative frame debugging techniques 其它可供选择的帧调试技术:

You could also use external tools to debug rendering. Build a standalone player, run it through Visual Studio graphics debuggerIntel GPARenderDocNVIDIA NSight orAMD GPU PerfStudio, then capture a frame of rendering, and step through the draw calls and other rendering events to see what’s going on.

你也可以使用外部的工具调试渲染。打一个独立播放包,用Visual Studio图形调试器Intel GPARenderDocNVIDIA NSightAMD GPU PerfStudio运行,然后抓取渲染的一帧,并且逐步调试draw calls和其它渲染事件看看发生了什么。

This is a very powerful approach, since these tools can provide you with a lot of information to really drill down.

因为这些工具提供了真正穿过每个draw call的很多信息,所以是很强大的。

时间: 2024-10-05 11:55:26

Unity官方文档之“图形性能优化-帧调试器”的翻译的相关文章

Unity官方文档阅读之Architecture

1.资源地址 http://docs.unity3d.com/Manual/Architecture.html http://unity3d.com/learn/tutorials/modules/beginner/architecture 2.

Unity3D - 图形性能优化:帧调试器

Unity官方文档之"图形性能优化-帧调试器"的翻译,E文链接. Frame Debugger 帧调试器 The Frame Debugger lets you freeze playback for a running game on a particular frame and view the individual draw calls that are used to render that frame. As well as listing the drawcalls, th

Unity3D - 图形性能优化:优化着色器加载时间

Unity官方文档之"图形性能优化-优化着色器加载时间"的翻译,E文链接. Optimizing Shader Load Time 优化着色器加载时间 Shaders are small programs that execute on the GPU, and loading them can take some time. Each individual GPU program typically does not take much time to load, but shade

Unity3D - 图形性能优化

Unity官方文档中有一篇是讲图形性能优化的,这篇文章无疑是指导Unity开发优化的最佳文章.Unity圣典曾翻译过旧的版本,但是太老旧了,跟最新的文档差别很大.我试着翻译一下最新的文档,点击查看原文链接. Optimizing Graphics Performance  图形性能优化 Good performance is critical to the success of many games. Below are some simple guidelines for maximizing

iOS9官方文档

       iOS9已经发布一段时间了,我也在最近升级了Xcdoe 7.0正式版,升级后才发现又有了很多奇妙的变化,于是查看官方文档的一些解释,顺便做了一些翻译,和大家分享一下(转载请注明出处). iPad多任务增强 iOS9增强了对iPad用户的多任务处理如滑动(Slide Over),拆分视图(Split View)和画中画(Picture in Picture)的体验.该滑过功能允许用户选择一个次要的App并快速地与之交互.拆分视图功能让用户能够同时并排开启两个App.画中画功能(也称为

Unity性能优化(2)-官方文档简译

本文是Unity官方教程,性能优化系列的第二篇<Diagnosing performance problems using the Profiler window>的简单翻译. 简介 如果游戏运行缓慢,卡顿,我们知道游戏存在性能问题.在我们尝试解决问题前,需要先知道引起问题的原因.不同问题需要不同的解决方案.如果我们靠猜测或者其他项目的经验去解决问题,那么我们可能会浪费很多时间,甚至使得问题更严重. 这时我们需要性能分析,性能分析程序测量游戏运行时的各个方面性能.通过性能分析工具,我们能够透过

Mysql优化(出自官方文档) - 第八篇(索引优化系列)

目录 Mysql优化(出自官方文档) - 第八篇(索引优化系列) Optimization and Indexes 1 Foreign Key Optimization 2 Column Indexes 3 Column Indexes && Multiple-Column Indexes 4 Comparison of B-Tree and Hash Indexes 5 Use of Index Extensions 6 Invisible Indexes 7 Descending In

Mysql优化(出自官方文档) - 第十二篇(优化锁操作篇)

目录 Mysql优化(出自官方文档) - 第十二篇(优化锁操作篇) 1 Internal Locking Methods 2 Metadata Locking 3 External Locking Mysql优化(出自官方文档) - 第十二篇(优化锁操作篇) 1 Internal Locking Methods 这里介绍Mysql的几种锁,该锁由Mysql自行进行管理,用户不需要处理该锁. Row-Level Locking 对于InnoDB,行锁可以通过SELECT ... FOR UPDAT

Android Studio官方文档之构建和运行你的APP

Android Studio官方文档之构建和运行你的APP 本文由MTJH翻译,jkYishon审校. 前言 默认情况下,Android Studio设置新的项目并且部署到模拟器或者真机设备上,只需要点击几下.使用即时运行,你并不需要构建一个新的APK即可将改变后的方法和现有的应用资源应用到一个正在运行的应用程序中,所以代码的改变是即时可见的. 点击Run来构建并运行你的APP.Android Studio通过Gradle构建你的App,选择一个部署的设备(模拟器或连接的设备),然后把你的APP