Choosing a Rendering Path

Unity supports a number of rendering techniques, or ‘paths’. An important early decision which needs to be made when starting a project is which path to use. Unity’s default is 'Forward Rendering”.

U3D支持一连串数字渲染技术,或者是多路径”, 在早期创建u3d的工程的时候需要确认当前工程的渲染方式。u3d的默认渲染方式是“正向渲染”

Forward Rendering(正向渲染)

In Forward Rendering, each object is rendered in a ‘pass’ for each light that affects it. Therefore each object might be rendered multiple times depending upon how many lights are within range.

在正向渲染中,每一个物体是在一个渲染管道中,每个灯光都会对他造成影响。所以,每一个物体将会渲染多个时间依赖,更多的灯光将会影响更多的种类。

The advantages of this approach is that it can be very fast - meaning hardware requirements are lower than alternatives. Additionally, Forward Rendering offers us a wide range of custom ‘shading models’ and can handle transparency quickly. It also allows for the use of hardware techniques like ‘multi-sample anti-aliasing’ (MSAA) which are not available in other alternatives, such as Deferred Rendering which can have a great impact on image quality.

有好处的地方是这中渲染方式非常快,意味着硬件需求非常低。另外,正向渲染要比普通的“阴影模型”处理透明更快。它也允许使用硬件技术,例如MSAA这将不能够被另外一个替代,例如延迟渲染它能够有一个更好的影响,在图像质量方面。

However, a significant disadvantage of the forward path is that we have to pay a render cost on a per-light basis. That is to say, the more lights affecting each object, the slower rendering performance will become. For some game types, with lots of lights, this may therefore be prohibitive. However if it is possible to manage light counts in your game, Forward Rendering can actually be a very fast solution.

然而,正向渲染有一个重要的不利条件是每一个灯光渲染消耗都是昂贵的。换言之,这些灯光影响每一个物体,这将会使渲染变的很慢。一些游戏中,含有大量灯光,这种方式将会被禁止。但是如果你能够管理你在游戏中的灯光数量,正向渲染的确能够成为一个更快的解决方案。

Deferred Rendering(延迟渲染)

In 'Deferred' rendering, on the other hand, we defer the shading and blending of light information until after a first pass over the screen where positions, normals, and materials for each surface are rendered to a ‘geometry buffer’ (G-buffer) as a series of screen-space textures. We then composite these results together with the lighting pass. This approach has the principle advantage that the render cost of lighting is proportional to the number of pixels that the light illuminates, instead of the number of lights themselves. As a result you are no longer bound by the number of lights you wish to render on screen, and for some games this is a critical advantage.

在延迟渲染中,另外一种渲染方式。我们延迟了阴影以及灯光信息直到

Deferred Rendering gives highly predictable performance characteristics, but generally requires more powerful hardware. It is also not supported by certain mobile hardware.

For more information on the Deferred, Forward and the other available rendering paths, please see the documentation here.

猜你喜欢

转载自blog.csdn.net/gaojinjingg/article/details/80753266