转换着色器
为内置渲染管线编写的着色器与 URP 着色器不兼容。
有关内置着色器和 URP 着色器之间映射关系的概述,请参阅着色器映射。
使用渲染管线转换器 (Render Pipeline Converter) 可自动应用着色器映射。
注意:渲染管线转换器会对项目进行不可逆转的更改。在转换前,请备份项目。
提示:在转换后,如果 Project 视图中的预览缩略图未正确显示,请尝试右键单击 Project 视图中的任意位置,然后选择 Reimport All。
对于 SpeedTree 着色器,重新导入这些着色器时,除非单击 Generate Materials 或 Apply & Generate Materials 按钮,否则 Unity 不会重新生成材质。
着色器映射
下表显示了在使用渲染管线转换器时内置渲染管线着色器转换成的 URP 着色器。
Unity 内置着色器 | 通用渲染管线着色器 |
---|---|
Standard | Universal Render Pipeline/Lit |
Standard (Specular Setup) | Universal Render Pipeline/Lit |
Standard Terrain | Universal Render Pipeline/Terrain/Lit |
Particles/Standard Surface | Universal Render Pipeline/Particles/Lit |
Particles/Standard Unlit | Universal Render Pipeline/Particles/Unlit |
Mobile/Diffuse | Universal Render Pipeline/Simple Lit |
Mobile/Bumped Specular | Universal Render Pipeline/Simple Lit |
Mobile/Bumped Specular(1 Directional Light) | Universal Render Pipeline/Simple Lit |
Mobile/Unlit (Supports Lightmap) | Universal Render Pipeline/Simple Lit |
Mobile/VertexLit | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Bumped Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Bumped Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Self-Illumin/Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Self-Illumin/Bumped Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Self-Illumin/Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Self-Illumin/Bumped Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Bumped Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Bumped Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Cutout/Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Cutout/Specular | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Cutout/Bumped Diffuse | Universal Render Pipeline/Simple Lit |
Legacy Shaders/Transparent/Cutout/Bumped Specular | Universal Render Pipeline/Simple Lit |