03.Unity ShaderGraph序列(Unity相關設置掃盲01)

Scriptable Render Pipeline(SRP)
Graphics
Shader All

What is the Scriptable Render Pipeline

The Scriptable Render Pipeline (SRP) is a feature that gives you full control over Unity’s render pipeline and provides the tools you need to create modern, high-fidelity graphics in Unity.

SRP allows you to write C# scripts to control the way Unity renders each frame. Exposing the render pipeline to you in C# makes Unity less of a “black box” when it comes to rendering. Unlike the original built-in render pipeline, SRP allows you to see and control exactly what happens during the rendering process.

Unity provides you with two prebuilt Scriptable Render Pipelines which you can use in your Projector as a base for your own custom SRP:

  • The Lightweight Render Pipeline (LWRP) offers graphics that scale from mobile platforms to higher-end consoles and PCs.
  • The High Definition Render Pipeline (HDRP) utilizes physically-based lighting techniques to offer high-fidelity graphics to target modern, Compute Shader compatible, platforms.

Rather than developing your own SRP from scratch, you can use either of these prebuilt SRPs as a base to modify and adapt to your own requirements.

什麼是Scriptable Render Pipeline

SRP是一個功能,可以給你全部的渲染管線控制權,並且提供了你需要的工具,包括用Unity創建次世代、高精準顯示;
SRP允許你寫C#代碼來控制Unity每幀的渲染方式;暴露渲染管線到你C#代碼,使Unity減少了一個"black box",當數據來自渲染;
不像通常內建的渲染管線,SRP允許你看到並且控制在渲染過程中的實現。
Unity提供了兩個預建SRP,你可以使用這些在你項目裏面當作你自定義SRP的基礎:
輕度渲染管線(LWRP)提供顯示,最小適配到移動平臺最高更高級控制中心和PC平臺;
高清渲染管線(HDRP),應用了基於物理的光照技術,提供了高精準顯示次世代目標,PC級別平臺的着色器;
寧願無止步的開發你自己的SRP,你也可以這些預建的SRPs作爲基礎修改,並且適配到你自己的需求。

Graphics

在這裏插入圖片描述


Scriptable Render Pipeline Settings

製作的Assets需要放到這裏,來控制顯示效果


Tier Settings

設置需要顯示的等級,分爲高中低等級,點擊OpenEditor…進入設置
可以分別設置Low、Medium、High不同等級的Tier
也可以直接使用Use Defaults來使用默認的設置
這個設置有點和Quality類似,Quality是負責整體遊戲的質量水平,通常說的遊戲高中低畫質是
由Quality決定的,這裏設置是專門負責PBR,高清渲染管線相關的參數。


Built-in Shader Settings

這個存放的是內建Shader,這些Shader在編譯打包的時候會自動打包到基礎包裏面;如果有定義Shader,不用
AssetsBundle加載的話,需要把自定義的Shader添加到這裏。


Shader Stripping

剔除Shader,減少編譯大小,提高loading速度;
Lightmap Modes 光照貼圖模型剔除
Fog Modes 霧貼圖模型剔除
Instancing Variants 實例變體剔除
一般情況下,這些設置即可,由於壓根沒有能力去定製光照渲染和迷霧渲染的相關事宜;
由Unity自行決定就好,如果出現剔除有問題可以找回來看看


Shader Preloading

預加載的Shader,必須是Shader變體集合,如果有部分Shader使用率頻繁,可以使用預加載Shader來提高幀率


Shader All

Unity包括ShaderGraph可以創建的Shader有7種

Standard Surface Shader
Unlit Shader
Image Effect Shader
Compute Shader
PBR Graph Shader
Sub Graph Shader
Unlit Graph Shader
在這裏插入圖片描述

Standard Surface Shader

表面着色器,擁有固定的輸入輸出io,能實現的效果比較少;是Unity二次封裝之後的一種Shader,具體用法未知,簡介而已。

Unlit Shader

定點着色器,用戶自行處理各個頂點的渲染方式

Image Effect Shader

圖片特效處理Shader,專門對圖片特效來處理,配合相機效果製作AE

Compute Shader

邏輯計算Shader,使用顯卡的併發處理能力來分擔處理一些多任務的渲染


PBR Graph

Physical Base Renderer基於物理的渲染可視化編程圖表,用於高精度模型,地表,人物,刻畫細節的都可以

Sub Graph

子圖表,用於PBR多次複用,或者自定義節點圖表

Unlit Graph

非光照圖表,用於UI、特效


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章