天天看点

Universal Render Pipeline 概述

Universal Render Pipeline 概述

通用渲染管道(URP)是一个预先构建的脚本渲染管道,由Unity制作。URP提供了对艺术家友好的工作流,让您快速、轻松地跨一系列平台创建优化的图形,从移动设备到高端控制台和pc。

需求

有关需求和兼容性的信息,请参阅需求一节。

URP有什么新内容

有关URP最新版本中有什么新内容的信息,请参阅URP中的新内容一节。

开始使用URP

有关从头开始一个新的URP项目,或者在一个已有的Unity项目中安装URP的信息,请参见Getting started。

更新

有关从以前版本的URP升级到当前版本的信息,或有关从轻量级渲染管道(LWRP)升级到URP的信息,请参阅升级指南。

Unity编辑器兼容性

Package version Minimum Unity version Maximum Unity version
10.2.x 2020.2.0b8 2020.2.x
10.1.x 2020.2.0b8 2020.2.x
10.0.x 2020.2.0a20 2020.2.x
9.x.x 2020.1.0b6 2020.2.x
8.2.x 2020.1.0b6 2020.1.x
8.1.x 2020.1.0b6 2020.1.x
8.0.x 2020.1.0a23 2020.1.x
7.4.x 2019.3.2f1 2019.4.x
7.3.x 2019.3.2f1 2019.4.x
7.2.x 2019.3.0f6 2019.4.x
7.1.8 2019.3.0f3 2019.4.x

渲染管线的兼容性

使用URP制作的项目与高清渲染管道(HDRP)或内置的渲染管道不兼容。在开始开发之前,必须决定在项目中使用哪个渲染管道。有关选择渲染管道的信息,请参见Unity手册中的渲染管道部分。

Unity播放器系统要求

这个包没有添加任何额外的特定于平台的要求。一般的系统要求适用于Unity玩家。有关Unity系统需求的更多信息,请参见Unity的系统需求。

功能对比表

这个表格提供了通用渲染管道(URP)支持的当前特性的概述,并与Unity内置渲染管道进行了比较。

注意:如果一个特性被标记为 In research(研究中),URP团队仍然在研究如何以及何时实现该特性。如果一个特性被标记为Not supported(不支持),那是因为Unity不打算在任何版本中支持它。

ature

Built-in Render Pipeline

Unity 2018.x, 2019.x, 2020.x.

Universal Render Pipeline
Camera
HDR rendering Yes Yes
HDR output Yes In research
MSAA Yes Yes
Physical Camera Yes Yes
Dynamic Resolution Yes Yes
Multi Display Yes Yes
Stacking Yes Yes
Flare Layer Yes Not supported
Depth Texture Yes Yes
Depth + Normals Texture Yes Not supported
Color Texture Not supported Yes
Motion vectors Yes In research
Batching
Static Batching (By Shader) Not supported Yes
Static Batching (By Material) Yes Yes
Dynamic Batching Yes Yes
Dynamic Batching (Shadows) Yes Not supported
GPU Instancing Yes Yes
Color Space
Linear Yes Yes
Gamma Yes Yes
Realtime Lights

Light Types

Directional

Spot

Point

Area

Yes

Yes

Yes

Rectangle (Baked)

Yes

Yes

Yes

Rectangle (Baked)

Inner Spot Angle Not supported Yes
Shading Multiple Passes Single Pass

Culling

Per-Object

Per-Layer

Yes

Yes

Yes

Yes

Light Limits

Main Directional Light

Per Object

Per Camera

1

Unlimited

Unlimited

8 (4 for GLES2). Can be point, spot, and directional Lights.

256 (16 for GLES 3.0 or lower, 32 on other mobile platforms)

Attenuation Legacy InverseSquared
Vertex Lights Yes Yes
SH Lights Yes In research
Realtime Shadows

Light Types

Directional

Spot

Point

Area

Yes

Yes

Yes

Not supported

Yes - only 1

Yes

In research

Not supported

Shadow Projection

Stable Fit

Close Fit

Yes

Yes

Yes

In research

Shadow Cascades

Number of Cascades

Control by Percentage

Control by Distance

1, 2 or 4

Yes

Not supported

1–4

Yes

Yes

Shadow Resolve Type

Lighting Pass

Screen Space Pass

Yes

Yes

Yes

No

Shadow Bias Constant clip space offset + normal bias Offsets shadowmap texels in the light direction + normal bias
Lightmapping
Enlighten Yes Not supported
Progressive Lightmapper, CPU Yes Yes
Progressive Lightmapper, GPU Yes Yes
Realtime Global Illumination
Enlighten Yes Not supported
Mixed Lighting Mode
Subtractive Yes Yes
Baked Indirect Yes Yes
Shadowmask Yes Yes (Forward Rendering Path)
Distance Shadowmask Yes Yes (Forward Rendering Path)
Light Probes
Blending Yes Yes
Proxy Volume (LPPV) Yes Not supported
Custom Provided Yes Yes
Occlusion Probes Yes Yes
Reflection Probes
Realtime Yes Yes
Baked Yes Yes

Sampling

Simple

Blend Probes

Blend Probes and Skybox

Yes

Yes

Yes

Yes

In research

In research

Box Projection Yes In research
Lightmap Modes
Non-Directional Yes Yes
Directional Yes Yes
Environmental lighting

Source

Skybox

Gradient

Color

Yes

Yes

Yes

Yes

Yes

Yes

Ambient Mode

Realtime

Baked

Yes

Yes

In research

Yes

Skybox
Procedural Yes Yes
6 Sided Yes Yes
Cubemap Yes Yes
Panoramic Yes Yes
Fog
Linear Yes Yes
Exponential Yes Yes
Exponential Squared Yes Yes
Visual Effects Components
Halo Yes Not supported
Lens Flare Yes Not supported
Trail Renderer Yes Yes
Billboard Renderer Yes Yes
Projector Yes Not supported
Shaders (General)
Shader Graph Not supported Yes
Surface Shaders Yes Not supported
Camera-relative Rendering Not supported In research

Built-in Lit Uber Shader

Metallic Workflow

Specular Workflow

Standard Shader

Yes

Yes

Lit Shader

Yes

Yes

Surface Type and Blend Mode

Opaque

Faded (Alpha Blend)

Transparent

Cutout

Additive

Multiply

Yes

Yes

Yes

Yes

Not supported

Not supported

Yes

Yes

Yes

Yes

Yes

Yes

Surface Inputs

Albedo (Base Map)

Specular

Metallic

Smoothness

Ambient Occlusion

Normal Map

Detail Map

Detail Normal Map

Heightmap

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Light Cookies Yes In research
Parallax Mapping Yes Yes
Light Distance Fade Not supported In research
Shadow Distance Fade Yes In research
Shadow Cascade Blending Not supported In research
GPU Instancing Yes Yes
Double Sided GI Yes Yes
Two Sided Not supported Yes
Order In Layer Not supported Yes
Render Pipeline Hooks
Camera.RenderWithShader Yes Not supported

Camera.AddCommandBuffer

(Camera.Remove[All]CommandBuffer)

Yes Not supported
Camera.Render Yes Not supported

Light.AddCommandBuffer

(LightRemove[All]CommandBuffer)

Yes Not supported
OnPreCull Yes Not supported
OnPreRender Yes Not supported
OnPostRender Yes Not supported
OnRenderImage Yes Not supported
OnRenderObject Yes Yes
OnWillRenderObject Yes Yes
OnBecameVisible Yes Yes
OnBecameInvisible Yes Yes
Camera Replacement Material Not supported Yes, with a custom Pass
RenderPipeline.BeginFrameRendering Not supported Yes
RenderPipeline.EndFrameRendering Not supported Yes
RenderPipeline.BeginCameraRendering Not supported Yes
RenderPipeline.EndCameraRendering Not supported Yes
UniversalRenderPipeline.RenderSingleCamera Not supported Yes
ScriptableRenderPass Not supported Yes
Custom Renderers Not supported Yes
Post-processing Uses Post-Processing Version 2 package Uses integrated post-processing solution
Ambient Occlusion (MSVO) Yes In research
Auto Exposure Yes Not supported
Bloom Yes Yes
Chromatic Aberration Yes Yes
Color Grading Yes Yes
Depth of Field Yes Yes
Grain Yes Yes
Lens Distortion Yes Yes

Motion Blur

Camera

Object

Yes

Not supported

Yes

In research

Screen Space Reflections Yes Not supported
Vignette Yes Yes
Particles
VFX Graph (GPU) Not supported Yes
Particles System (CPU) Yes Yes

Shaders

Physically Based

Simple Lighting (Blinn Phong)

Unlit

Yes

Yes

Yes

Yes (Particles Lit)

Yes (Particles Simple Lit)

Yes (Particles Unlit)

Soft Particles Yes Yes
Distortion Yes Yes
Flipbook Blending Yes Yes
Terrain

Shaders

Physically Based

Simple Lighting (Blinn-Phong)

Unlit

Speed Tree

Vegetation

Detail

Yes

Yes

Not supported

Yes

Yes

Yes

Yes

In research

In research

Yes

Yes

Yes

Wind Zone Yes Yes
Number of Layers Unlimited 8
GPU Patch Generation Yes Yes
Surface Mask Not supported In research
2D
Sprite Yes Yes
Tilemap Yes Yes
Sprite Shape Yes Yes
Pixel-Perfect Yes - using the 2D Pixel Perfect Package Yes
2D Lights Not supported Yes
UI (Canvas Renderer)
Screen Space - Overlay Yes Yes
Screen Space - Camera Yes Yes
World Space Yes Yes
Text Mesh Pro Yes Yes
VR
Multipass Yes Yes
Single Pass Yes Yes
Single Pass Instanced Yes Yes

Post-processing

Oculus Rift

Oculus Quest

PSVR

HoloLens

WMR

Magic Leap One

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

AR
AR Foundation Yes Yes
Debug
Scene view modes Yes In research