1.0.7 | 渲染管線架構(gòu)

目錄索引

本系列與知乎同名翻譯同步更新,原文鏈接:https://zhuanlan.zhihu.com/p/645932209
如有任何翻譯錯(cuò)誤,歡迎在評(píng)論區(qū)踹我:)!
原文對(duì)照
In current versions of Unity, there are three types of rendering pipeline:?Built-in RP,?Universal RP?(called?Lightweight?in previous versions) and?High Definition RP.
It is worth asking ourselves, what is a render pipeline, then? To answer this, the first thing we have to understand is the "pipeline" concept.
A pipeline is a series of stages that perform a more significant task operation. So what does rendering pipeline refer to? Let's think of this concept as the complete process that a polygon object must take (e.g. object with extension .fbx) to be rendered onto our computer screen; it is like an object travelling through the Super Mario pipes until it reaches its final destination. So, each rendering pipeline has its characteristics, and depending on the type we are using: material properties, light sources, textures, and all the functions that are occurring internally within the shader, will affect the appearance and optimization of objects on the screen.
Now, how does this process happen? For this, we must talk about basic rendering pipeline architecture. Unity divides this architecture into four stages: application, geometry processing, rasterization, and pixel processing.
Please note that this corresponds to the basic model of a render pipeline for real-time rendering engines. Each of the mentioned stages has threads that we will define next.

譯文
在當(dāng)前的Unity版本中,一共有三種類型的渲染管線,分別是內(nèi)置渲染管線、通用渲染管線(在早期版本中被稱為輕量渲染管線)和高清渲染管線。
所以,什么是渲染管線呢?要想回答這個(gè)問(wèn)題,我們首先得理解“管線”這個(gè)概念。
管線(流水線)指的是通過(guò)執(zhí)行一系列操作來(lái)完成一項(xiàng)更為重要的任務(wù)。那么渲染管線具體指的又是什么呢?讓我們將它理解為一個(gè)模型(例如擴(kuò)展名為 .fbx 的模型)要渲染到電腦屏幕上所必須經(jīng)歷的一個(gè)完整流程。這個(gè)流程就像“超級(jí)瑪麗”中的管道,模型需要穿過(guò)它才能到達(dá)終點(diǎn)(電腦屏幕)。每種渲染管線都有自己的特點(diǎn),我們使用的材質(zhì)屬性、光源、紋理以及著色器內(nèi)部的所有功能都會(huì)影響屏幕上物體的效果。
渲染管線內(nèi)究竟發(fā)生了什么事呢?為此,我們必須談?wù)勪秩竟芫€的基本架構(gòu)。Unity 將渲染管線的基本架構(gòu)分為四個(gè)階段:應(yīng)用階段、幾何處理階段、光柵化階段和像素處理階段。
請(qǐng)注意,這個(gè)架構(gòu)相當(dāng)于實(shí)時(shí)渲染引擎中渲染管道的基本模型。我們將在接下來(lái)的內(nèi)容中介紹上述提到的四個(gè)階段。
