Unity3D Shader

本文深入探讨了Unity中支持的不同渲染路径及其特点,包括延时光照、正向渲染和顶点光照,详细介绍了它们的功能、性能和适用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.RenderType

Opaque: 用于大多数着色器(法线着色器、自发光着色器、反射着色器以及地形的着色器)。
Transparent:用于半透明着色器(透明着色器、粒子着色器、字体着色器、地形额外通道的着色器)。
TransparentCutout: 蒙皮透明着色器(Transparent Cutout,两个通道的植被着色器)。
Background: Skybox shaders. 天空盒着色器。
Overlay: GUITexture, Halo, Flare shaders. 光晕着色器、闪光着色器。
TreeOpaque: terrain engine tree bark. 地形引擎中的树皮。
TreeTransparentCutout: terrain engine tree leaves. 地形引擎中的树叶。
TreeBillboard: terrain engine billboarded trees. 地形引擎中的广告牌树。
Grass: terrain engine grass. 地形引擎中的草。
GrassBillboard: terrain engine billboarded grass. 地形引擎何中的广告牌草。

2.Rendering Paths

Unity supports different Rendering Paths. You should choose which one you use depending on your game content and target platform / hardware. Different rendering paths have different features and performance characteristics that mostly affect Lights and Shadows.

Unity支持不同的渲染路径。您应具体取决于你的游戏内容和目标平台/硬件来选择使用哪一个。不同的渲染路径有不同的特点和性能特点,主要影响灯光和阴影。

The rendering Path used by your project is chosen in Player Settings. Additionally, you can override it for each Camera.

您的项目所使用的渲染路径在Player Settings选择。此外,您可以为每个摄像机重写(不同摄像机可以是不同的设置)。

If the graphics card can't handle a selected rendering path, Unity will automatically use a lower fidelity one. So on a GPU that can't handle Deferred Lighting, Forward Rendering will be used. If Forward Rendering is not supported, Vertex Lit will be used.

如果图形卡不能处理选定的渲染路径,Unity将自动使用一个较低保真度的设置。因此,在GPU上不能处理延迟照明(Deferred Lighting),将使用正向渲染(Forward Rendering )。如果不支持正向渲染(Forward Rendering ),将使用顶点光照(Vertex Lit)。

Deferred Lighting 延时光照

Deferred Lighting is the rendering path with the most lighting and shadow fidelity. It is best used if you have many realtime lights. It requires a certain level of hardware support, is for Unity Pro only and is not supported on Mobile Devices.

延时光照是有着最高保真度的光照和阴影的渲染路径。如果你有很多实时灯光,最好是使用延时光照。它需要一定水平的硬件支持,仅在 Unity Pro可用,移动设备上不支持。

For more details see the Deferred Lighting page.

更多细节见延时光照页面

Forward Rendering 正向渲染

Forward is a shader-based rendering path. It supports per-pixel lighting (including normal maps & light Cookies) and realtime shadows from one directional light. In the default settings, a small number of the brightest lights are rendered in per-pixel lighting mode. The rest of the lights are calculated at object vertices.

正向渲染一个基于着色器的渲染路径。它支持逐像素计算光照(包括法线贴图和灯光Cookies)和来自一个平行光的实时阴影。在默认设置中,少数最亮的灯光在逐像素计算光照模式下渲染。其余的灯光计算对象顶点的光照。

For more details see the Forward Rendering page.

更多细节见正向渲染页面

Vertex Lit 顶点光照

Vertex Lit is the rendering path with the lowest lighting fidelity and no support for realtime shadows. It is best used on old machines or limited mobile platforms.

顶点光照(Vertex Lit) 是最低保真度的光照、不支持实时阴影的渲染路径。最好是用于旧机器或受限制的移动平台上。

For more details see the Vertex Lit page.

更多细节见顶点光照页面

Rendering Paths Comparison 渲染路径比较

 

Deferred Lighting 延时光照

Forward Rendering 正向渲染

Vertex Lit 顶点光照

Features 功能

 

 

 

Per-pixel lighting (normal maps, light cookies)
每像素计算光照(法线贴图、灯光cookies)

Yes

Yes

-

Realtime shadows 实时阴影

Yes

1 Directional Light(一盏平行光)

-

Dual Lightmaps 双光照贴图

Yes

-

-

Depth&Normals Buffers 深度与法线缓冲区

Yes

Additional render passes 额外渲染通道

-

Soft Particles 软粒子

Yes

-

-

Semitransparent objects 半透明的物体

-

Yes

Yes

Anti-Aliasing 抗锯齿

-

Yes

Yes

Light Culling Masks 灯光剔除蒙板

Limited

Yes

Yes

Lighting Fidelity 光照保真度

All per-pixel 全部像素

Some per-pixel 某些像素

All per-vertex 所有顶点

Performance 性能

 

 

 

Cost of a per-pixel Light 每像素光照的花费

Number of pixels it illuminates
照亮的像素数

Number of pixels * Number of objects it illuminates
像素数*照亮的像素数

-

Platform Support 支持平台

 

 

 

PC (Windows/Mac) 台式机

Shader Model 3.0+

Shader Model 2.0+

Anything

Mobile (iOS/Android) 移动设备

-

OpenGL ES 2.0

OpenGL ES 2.0 & 1.1

Consoles  (游戏)平台

360, PS3

360, PS3

-


内容概要:本文针对国内加密货币市场预测研究较少的现状,采用BP神经网络构建了CCi30指数预测模型。研究选取2018年3月1日至2019年3月26日共391天的数据作为样本,通过“试凑法”确定最优隐结点数目,建立三层BP神经网络模型对CCi30指数收盘价进行预测。论文详细介绍了数据预处理、模型构建、训练及评估过程,包括数据归一化、特征工程、模型架构设计(如输入层、隐藏层、输出层)、模型编译与训练、模型评估(如RMSE、MAE计算)以及结果可视化。研究表明,该模型在短期内能较准确地预测指数变化趋势。此外,文章还讨论了隐层节点数的优化方法及其对预测性能的影响,并提出了若干改进建议,如引入更多技术指标、优化模型架构、尝试其他时序模型等。 适合人群:对加密货币市场预测感兴趣的研究人员、投资者及具备一定编程基础的数据分析师。 使用场景及目标:①为加密货币市场投资者提供一种新的预测工具和方法;②帮助研究人员理解BP神经网络在时间序列预测中的应用;③为后续研究提供改进方向,如数据增强、模型优化、特征工程等。 其他说明:尽管该模型在短期内表现出良好的预测性能,但仍存在一定局限性,如样本量较小、未考虑外部因素影响等。因此,在实际应用中需谨慎对待模型预测结果,并结合其他分析工具共同决策。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值