最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

1.1.2 | 渲染管線類型

2023-08-05 16:40 作者:GeometryGlacier  | 我要投稿

目錄索引

本系列與知乎同名翻譯同步更新,原文鏈接:https://zhuanlan.zhihu.com/p/646121988

如有任何翻譯錯誤,歡迎在評論區(qū)踹我:)!

原文對照

As we already know, there are three types of render pipelines in Unity. By default, we can find a?Built-in RP?that corresponds to the oldest engine belonging to the software, on the other hand,?Universal RP?and?High Definition RP?belong to a type of render pipeline called?Scriptable RP, which is more up-to-date and has been pre-optimized for better graphics performance.

Fig. 1.1.2a. When we create a new project in Unity, we can choose between these three rendering engines. Our choice depends on the needs of the project at hand

Regardless of the rendering pipeline, if we want to generate an image on the screen, we have to travel through the "pipeline".

A pipeline can have different processing paths. These are known as?render paths; as if the example pipe in section 1.0.7 had more than one way to reach its destination.

A rendering path corresponds to a series of operations related to lighting and shading objects. This allows us to graphically process an illuminated scene (e.g. a scene with directional light and a Sphere).

Examples of these paths are?forward?rendering,?deferred shading,?legacy deferred?and?legacy vertex lit. Each of these has different capabilities and performance characteristics.

In Unity, the default rendering path corresponds to?forward rendering; this is the initial path for the three types of pipeline render that are included in Unity. This is because it has greater graphics card compatibility and a lighting calculation limit, making it a more optimized process.

Please note that in Universal RP, we can only use?forward?as a rendering path, whereas High Definition RP allows illuminated material rendering using either?forward?or?deferred?shading.

Fig. 1.1.2b. To select a rendering path in Built-in Render Pipeline, we must go to our hierarchy, select the main camera and in the property “Rendering Path” we can change the configuration according to the needs of our project

To understand this concept, we are going to suppose that we have an "object" and a "direct light" in a scene. The interaction between the light and the object is based on two points, they are.

1. Lighting characteristics.

2. Material characteristics.

The interaction between these two elements is called the?lighting model.

The basic lighting model corresponds to the sum of three different properties, which are ambient color, diffuse reflection and specular reflection.

The lighting calculation is carried out within the shader, this can be carried out per-vertex or per fragment. When the illumination is calculated by vertex it is called per-vertex lighting and is performed in the?vertex shader stage, likewise, when it is calculated per fragment it is called per-fragment or per-pixel shader and is performed in the?fragment shader stage.

譯文

在Unity中,目前有三種已知的渲染管線。我們可以在引擎中找到足以支持最古老版本的內(nèi)置渲染管線(Built-in RP),除此之外還有通用渲染管線(URP)高清渲染管線(HDRP),它們屬于更為先進的可編程渲染管線(SRP),經(jīng)過預先優(yōu)化可以展現(xiàn)出更好的圖形性能。

Fig. 1.1.2a. 當通過Unity創(chuàng)建新項目時,我們可以根據(jù)項目的實際需要選擇三種不同的渲染管線

然而無論我們選擇使用哪一種渲染管線,生成在屏幕上的圖像都必須經(jīng)過渲染管線的處理。

一種渲染管線可以有不同的處理路徑,這些路徑被稱為渲染路徑;就像第1.0.7節(jié)中示例的管線有不止一條完成任務的路徑一樣。

一條渲染路徑對應一系列與照明和著色有關的操作。這樣,我們就能以圖形方式處理照明場景(例如,帶有定向光和球體的場景)。

有哪些渲染路徑呢?常見的例子包括?前向渲染、延遲渲染、遺留的延遲渲染?和?遺留的頂點照明渲染,它們各自具有不同的功能與特點。

在 Unity 中,默認的渲染路徑是前向渲染,這也是 Unity 的三種渲染管線的初始渲染路徑。前向渲染具有更強的顯卡兼容性和光照計算限制,這使得它成為一個更優(yōu)的選擇。

需要注意的是,在 URP 中我們只能使用?前向渲染?作為渲染路徑,而 HDRP 允許使用?前向渲染?或?延遲渲染?進行照明材質(zhì)渲染。

Fig. 1.1.2b. 要想在內(nèi)置渲染管道中選擇渲染路徑,我們需要進入層級,選擇主攝像機,然后在渲染路徑 - 屬性中根據(jù)項目需要更改配置

為了理解這個概念,我們假設場景中有一個模型和一束方向光。光線和模型之間的相互作用基于兩個要素,它們分別是 :

  1. 光照特性

  2. 材質(zhì)特性

這兩個要素之間的相互作用稱為光照模型

基本光照模型相當于將環(huán)境光、漫反射和鏡面反射三種不同的“光”疊加在一起。

光照計算在著色器中進行,可以采用逐頂點或逐片元的方式進行計算。當通過一個個頂點計算照明時,稱為逐頂點照明,在頂點著色器階段執(zhí)行光照計算;當通過一個個片元計算照明時,稱為逐片元或逐像素照明,在片元著色器階段執(zhí)行光照計算。

1.1.2 | 渲染管線類型的評論 (共 條)

分享到微博請遵守國家法律
多伦县| 青州市| 汉寿县| 邵阳县| 潜山县| 陵川县| 商丘市| 雷山县| 新野县| 丘北县| 嘉兴市| 宜都市| 奉贤区| 蓝田县| 拉萨市| 修水县| 红桥区| 临颍县| 宝坻区| 盐亭县| 泽州县| 犍为县| 新昌县| 安仁县| 成安县| 周宁县| 开阳县| 长阳| 平潭县| 扶绥县| 泾阳县| 库伦旗| 新巴尔虎左旗| 孝昌县| 万州区| 英吉沙县| 广平县| 大竹县| 平阳县| 青田县| 马关县|