当前位置:网站首页>Unity URP渲染管线摄像机核心机制剖析
Unity URP渲染管线摄像机核心机制剖析
2022-07-31 04:42:00 【Clank的游戏栈】
前言
上一节从项目的目录结构与示例场景的内容分析了UPR渲染管线项目的基本组成,接下来分析URP的主要机制,并通过与内置的向前渲染管线做对比,来比较它们的与不同。按照先后顺序本节首先来分析URP渲染管线的摄像机的策略。

1: URP渲染管线重新定义了摄像机
相比于内置的向前渲染管线,UPR渲染管线首先重新定义了摄像机的策略。接下来看下相比向前渲染管线摄像机机制的核心变化(为了更好的展示,我把URP的摄像机属性面板做成两行,并放大),如图1.2-1与1.2-2对比:

(图1.2-1) URP渲染管线摄像机面板参数,从左到右,从上到小

(图1.2-2) URP渲染管线摄像机面板参数,从左到右,从上到小
由上图对比我们发现了UPR 摄像机相比向前渲染管线,明显变多,同时进行了分类,让整个配置的属性更清晰,先来讲解摄像机的几个核心变化:

(2) Camera后期处理机制: 上一节分析了URP示例场景中Post-process Volume节点做后期处理控制被单独拿出来,分全局与局部,在摄像机处提供一个bool型属性配置”Post-process”, 来配置后期处理是否有效。而内置的向前渲染管线的Camera没有考虑这样的机制,让开发者通过脚本并重载接口来实现后期处理。
(3) 抗锯齿算法: URP渲染管线提供可选的FXAA与SMAA, 内置向前渲染管线提供抗锯齿算法为MXAA。
(4) 其它渲染控制更灵活: 例如URP引入了是否渲染阴影的开关,相比内置的渲染管线,阴影控制更灵活,可以在低端机上关闭阴影,高端机上开启阴影等,更适合手机游戏开发。
…
还有一些很差别,建议大家对着Camera的属性面板进行比对与分析。
2 如何基于URP渲染管线来实现多个摄像机
如何在场景中使用多个摄像机,首先我们创建一个base摄像机。base摄像机就是把Camera组件上的Render Type 设置为 Base。如图1.2-3所示:

(图1.2-3) URP Base摄像机配置


(图1.2-4) 创建Overlay摄像机

(图1.2-5) 将创建的Overlay摄像机放入Base摄像机的Stack中
最后多摄像机的绘制画面就能出现在屏幕上。如图1.2-6所示:

(图1.2-6) URP的多摄像机共存

今天的分享就到这里,关注我们,下一节剖析URP渲染管线的其它核心机制。
END
下节预告:基于URP渲染管线的光照机制剖析
Base-Overlay摄像机模式底层如何处理
URP光照计算引擎内部如何处理
...
更多的URP的底层性能分析,
边栏推荐
- "DeepJIT: An End-To-End Deep Learning Framework for Just-In-Time Defect Prediction" paper notes
- open failed: EACCES (Permission denied)
- mysql基础知识(二)
- How Zotero removes auto-generated tags
- BUG destroyer!!Practical debugging skills are super comprehensive
- XSS靶场(三)prompt to win
- Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
- input输入框展示两位小数之precision
- Learning DAVID Database (1)
- PCL 计算点云坐标最值及其索引
猜你喜欢

WPF WPF 】 【 the depth resolution of the template

How Zotero removes auto-generated tags

The third is the code to achieve

高等数学---第九章二重积分

qlib架构

Learning DAVID Database (1)

Understanding and Using Unity2D Custom Scriptable Tiles (4) - Start to build a custom tile based on the Tile class (below)

Two address pools r2 are responsible for managing the address pool r1 is responsible for managing dhcp relays

BUG消灭者!!实用调试技巧超全整理

Industry landing presents new progress | 2022 OpenAtom Global Open Source Summit OpenAtom OpenHarmony sub-forum was successfully held
随机推荐
(tree) Last Common Ancestor (LCA)
Two address pools r2 are responsible for managing the address pool r1 is responsible for managing dhcp relays
Safety 20220722
马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远
Can't load /home/Iot/.rnd into RNG
【小土堆补充】Pytorch学习笔记_Anaconda虚拟环境使用
errno error code and meaning (Chinese)
[C language] General method of base conversion
npm、nrm两种方式查看源和切换镜像
Can‘t load /home/Iot/.rnd into RNG
BUG destroyer!!Practical debugging skills are super comprehensive
[CV project debugging] CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT problem
Understanding and Using Unity2D Custom Scriptable Tiles (4) - Start to build a custom tile based on the Tile class (below)
Industry landing presents new progress | 2022 OpenAtom Global Open Source Summit OpenAtom OpenHarmony sub-forum was successfully held
STM32HAL库修改Hal_Delay为us级延时
Open Source Database Innovation in the Digital Economy Era | 2022 Open Atom Global Open Source Summit Database Sub-Forum Successfully Held
VScode+ESP32快速安装ESP-IDF插件
VScode+ESP32 quickly install ESP-IDF plugin
log level and print log note
Notes on the establishment of the company's official website (6): The public security record of the domain name is carried out and the record number is displayed at the bottom of the web page