Масштабируемая и высокая производительность рендеринга
Universal Render Pipeline от Unity стал мощным решением, сочетающим красоту, скорость и производительность, а также поддержку всех целевых платформ Unity.
The Universal Rendering Pipeline is a scalable multiplatform render pipeline built on top of the Scriptable Render Pipeline (SRP) framework. Thanks to its scalability, customizability, and a rich feature set, URP offers you creative freedom in any type of project, from stylized visuals to physically based rendering.


Universal Render Pipeline
Упор на производительность
Однопроходный упреждающий рендеринг
Поддержка Shader Graph
Встроенный процесс рендеринга
Универсальность
Поддерживает как упреждающий, так и отложенный рендеринг

От 2D и 3D до AR/VR-проектов: Universal Render Pipeline позволяет не тратить время на доработку проекта для выпуска на новом устройстве.
- Mac и iOS
- Android
- Xbox One
- PlayStation 4
- Nintendo Switch
- Ведущие AR- и VR-платформы
- Windows и UWP

Возможность конфигурации рендеринга в Unity с помощью скриптов на C# позволяет вам:
- оптимизировать производительность для конкретных устройств;
- тонко настраивать процесс рендеринга в соответствии с конкретными требованиями;
- управлять потреблением вычислительных ресурсов.

Universal Render Pipeline проще, чем встроенный процесс рендеринга, но улучшает качество графики. Перевод проекта со встроенного процесса рендеринга на Universal Render Pipeline должен обеспечивать аналогичную или улучшенную производительность. Прочтите статью в нашем блоге, чтобы узнать о том, как Universal Render Pipeline повышает частоту кадров без снижения качества графики.
Вы можете воспользоваться преимуществами готовых технологий уже сегодня. Обновите проекты с помощью средств перехода или создайте новый проект на основе нашего шаблона Universal через Unity Hub.

To help with your transition from the Built-in Render Pipeline, URP offers numerous rendering capabilities, from Camera Stacking to Light Cookies and Point Light Shadows, as well as Renderer Features such as Decals and Screen Space Ambient Occlusion (SSAO).
In addition, URP supports the latest node-based tools offered by Unity. Shader Graph allows you to visually author shaders in real-time. With VFX Graph, you can leverage the power of your GPU to create extraordinary VFX.

Thanks to its large platform reach, the URP already powers numerous successful games, such as the relaxing puzzle platformer LEGO Builder’s Journey and action-adventure game Lost in Random.
To help you start creating inspiring experiences in URP, Unity offers learning sample content including the URP Package Samples and the Gigaya living game sample.
URP vs HDRP in Unity
Render pipeline can be a bit difficult to choose when starting out with your game. Unity has 3 render pipelines built-in, URP and HDRP. Switching from the built-in pipeline to URP or HDRP can boost a lot of features in your game. But whether you should go for URP or HDRP is a touch choice unless you understand the reason these pipelines exist in Unity. In this post, we will compare both URP and HDRP in detail.
What is URP and HDRP?
Both Universal render pipeline and High-definition render pipeline are types of graphics pipeline. Graphics pipelines are the steps a software needs to go through to display a 3D scene to a 2D screen.
Universal render pipeline is built to optimize graphics rendering across all platforms. Whereas HDRP is built to use the hardware capabilities to render high-definition graphics on capable platforms.
In general, URP is designed for publishing games to multiple hardware and HDRP for high end hardware with realistic graphics
You can import URP and HDRP from the package manager.
Performance Comparison
If you have the same scene in both URP and HDRP, you will find that URP gives better performance compared to HDRP. As per this post by G_trex in the Unity forum you get a 15% performance boost when you switch from built-in to URP and you lose the performance gain when switching to HDRP.
But this is just one side of the story. If you have capable new generation hardware you won’t feel the performance dip. You can match HDRPs performance with URP using better optimized batches and static draw calls.
It’s not right to compare HDRP and URP as they are designed for different hardware. Also, HDRP has lot of post processing effects compared to URP to make the scene look more photorealistic.
Hardware requirement for URP and HDRP
This is the major advantage of URP. It’s designed to perform well in all types of hardware. There is no specific hardware requirement for URP. If your PC can run Unity then you can choose URP as your render pipeline.
HDRP on the other hand needs specific hardware to run your game. Here are some basic requirements to run a HDRP game
- Windows and Windows Store, with DirectX 11 or DirectX 12 and Shader Model 5.0
- Modern consoles (Sony PS4 and Microsoft Xbox One)
- MacOS (minimum version 10.13) using Metal graphics
- Linux and Windows platforms with Vulkan
If you need Raytracing then HDRP has some more requirements. You need the following graphics card to run Ray tracing
- NVIDIA GeForce RTX 2060, RTX 2060 Super, RTX 2070, RTX 2070 Super, RTX 2080, RTX 2080 Super, RTX 2080 Ti, and NVIDIA TITAN RTX
- NVIDIA Quadro RTX 3000 (laptop only), RTX 4000, RTX 5000, RTX 6000, RTX 8000
- NVIDIA GeForce GTX
- Turing generation: GTX 1650, GTX 1660 Super, GTX 1660 Ti
- Pascal generation: GTX 1060, GTX 1070, GTX 1080, GTX 1080 Ti
URP does not support ray tracing.
Feature comparison
Camera
Feature URP HDRP HDR Yes Yes. MSAA Yes Yes. HDRP supports Physical Camera Yes Yes. HDRP uses physical camera properties Dynamic Resolution Yes Multi Display Yes Yes Stacking In research Not supported Flare Layer Not supported Not supported Depth Texture Yes Yes Depth + Normals Texture Not supported Yes Color Texture Yes Yes Motion vectors In research Yes Realtime Lights
Features URP HDRP Light Types Directional Yes Yes Spot Yes Yes. Supports the following shapes: Point Yes Yes Area Rectangle (Baked) Yes.(rectangle,tube and disk) Inner Spot Angle Yes Yes Shading Single Pass Tiled/Clustered Culling Per-Object Yes Yes Per-Layer Yes Yes Light Limits See Quality Settings Main Directional Light 1 Unlimited, but HDRP only supports shadowing for one Directional Light at a time. Per Object 8 (4 for GLES2). Can be point, spot, and directional Lights. Unlimited Per Camera 256 (32 on mobile platforms) Unlimited Attenuation InverseSquared InverseSquared Vertex LIghts Yes Not supported SH Lights In research Not supported Realtime Shadows
Features URP HDRP Light Types Directional Yes – only 1 Yes, but only one at a time. Spot Yes Yes Point In research Yes Area Not supported Yes, but only for the Rectangle shape. Shadow Projection Stable Fit Yes Yes Close Fit In research Yes Shadow Cascades 1 to 4 Number of Cascades 1, 2 or 4 Yes Control by Percentage Yes Yes Control by Distance In research Yes Shadow Resolve Type Lighting Pass Yes Yes Screen Space Pass Yes Yes Shadow Bias Offsets shadowmap texels in the light direction + normal bias Yes, Slope and normal Batching
Features URP HDRP Static Batching (By Shader) Yes Yes Static Batching (By Material) Yes Yes Dynamic Batching Yes Yes Dynamic Batching (Shadows) In research Yes GPU Instancing Yes Yes Color Space Linear Yes Yes Gamma Yes Not supported Global Illumination
Features URP HDRP Enlighten Not supported Not supported Enlighten Realtime Not supported Not supported Progressive CPU Yes Yes Progressive GPU Yes Yes Mixed Lighting Subtractive Yes Not supported Baked Indirect Yes Yes Shadow Mask In research Yes. This is a per-Light setting. Distance Shadow Mask In research Yes. This is a per-Light setting. Global Illumination (Light Probes) Blending Yes Yes Proxy Volume (LPPV) Not supported Yes Custom Provided Yes Yes Occlusion Probes Yes Yes Global Illumination (Reflection Probes) Realtime Yes Yes Baked Yes Sampling See Reflection Hierarchy. Simple Yes See Reflection Hierarchy. Blend Probes In research See Reflection Hierarchy. Blend Probes and Skybox In research Yes Box Projection In research HDRP supports the following other reflection methods:
Planar Reflection Probes.
Screen space reflection.
Ray-traced reflection.
Planar Reflection Probes.
Screen space reflection.
Ray-traced reflection.Other reflections Not supported Global Illumination (Lightmap Modes) Non-Directional Yes Yes Directional Yes Yes Global Illumination (Environmental) Source Uses a single sky to bake global illumination, otherwise uses sky settings per Volume. You can create own sky via script and Material. Skybox Yes Uses a single sky to bake global illumination, otherwise uses sky settings per Volume. You can create own sky via script and Material. Gradient Yes Uses a single sky to bake global illumination, otherwise uses sky settings per Volume. You can create own sky via script and Material. Color Yes Ambient Mode Yes Realtime In research Yes Baked Yes Skybox
Features URP HDRP Procedural Yes Yes. This sky type is deprecated, but you can still use if if you install the Procedural Sky Sample. 6 Sided Yes Yes. The HDRI Sky supports cubemaps, which the Unity importer can build from 6-sided maps. Cubemap Yes See HDRI Sky Panoramic Yes Yes. The HDRI Sky supports cubemaps, which the Unity importer can build from panoramic maps. Physical Yes Gradient Yes Features URP HDRP Linear Yes Not supported Exponential Yes Yes. The Fog Override uses exponential fog. Exponential Squared Yes Not supported Local volumetric Yes Visual Effects Components
Features URP HDRP Halo Not supported Not supported Lens Flare Not supported Not supported Trail Renderer Yes Yes. You can also use the VFX Graph to create a custom trail effect. Billboard Renderer Yes Yes, but only with the VFX Graph. Projector Not supported Not supported Shaders
Features URP HDRP Shader Graph Yes Yes Surface Shaders Not supported Not supported Camera-relative Rendering In research Yes. See Camera Relative Rendering. Built-in Lit Uber Shader Lit Shader Metallic Workflow Yes Yes Specular Workflow Yes Yes Surface Type and Blend Mode Opaque Yes Yes Faded (Alpha Blend) Yes Yes. HDRP also supports premultiplied alpha. Transparent Yes Yes Cutout Yes Yes Additive Yes Yes Multiply Yes Not supported Decals Yes. To create decals in HDRP, you can use a decal Mesh or a decal projector. Detail Maps Yes. HDRP uses the mask and detail maps to combine maps such ask albedo, normals, and smoothness Advanced Material Options HDRP supports the following advanced Materials:
Anisotropic
Subsurface Scattering
Iridescence
TranslucentSurface Inputs Albedo (Base Map) Yes Yes Specular Yes Yes Metallic Yes Yes. Uses the mask map. Smoothness Yes Yes. Uses the mask map. Ambient Occlusion Yes Yes. Uses the mask map. Normal Map Yes Yes Detail Map Not supported Yes Detail Normal Map Not supported Yes Heightmap Not supported Yes. Supports both pixel and vertex displacement. Light Cookies In research Yes. Supports RGB Textures. Parallax Mapping Not supported Yes. Uses vertex displacement. Light Distance Fade In research Yes Shadow Distance Fade In research Yes Shadow Cascade Blending In research Yes GPU Instancing Yes Yes GPU Tessellation Yes. Uses the LitTesselation Shader. Double Sided GI Yes Yes Two Sided Yes Yes Order In Layer Yes Not supported Advanced Materials ClearCoat Yes Hair Yes Fabric Yes Render Pipeline Hooks Camera.RenderWithShader Not supported Not supported Camera.AddCommandBuffer Not supported Not supported (Camera.Remove[All]CommandBuffer) Camera.Render Not supported Yes Light.AddCommandBuffer Not supported Not supported (LightRemove[All]CommandBuffer) OnPreCull Not supported Not supported OnPreRender Not supported Not supported OnPostRender Not supported Not supported OnRenderImage Not supported Not supported OnRenderObject Yes Not supported OnWillRenderObject Yes Not supported OnBecameVisible Yes Not supported OnBecameInvisible Yes Not supported Camera Replacement Material In research Not supported RenderPipeline.BeginFrameRendering Yes Yes RenderPipeline.EndFrameRendering Yes Yes RenderPipeline.BeginCameraRendering Yes Yes RenderPIpeline.EndCameraRendering Yes Yes UniversalRenderPipeline.RenderSingleCamera Yes Not supported ScriptableRenderPass Yes Not supported Custom Renderers Yes Not supported CustomPass Yes Custom Post Process Pass Yes Post-processing
Features URP HDRP Ambient Occlusion (MSVO) In research Yes. HDRP supports:
•Ground truth ambient occlusion.
•Ray-traced ambient occlusion.Auto Exposure Not supported Yes. HDRP supports:
•Fixed exposure.
•Automatic (Eye adaptation).
•Curve Mapping.
•Physical Camera settingsBloom Yes Yes Chromatic Aberration Yes Yes Color Grading Yes Yes Depth of Field Yes Yes. This includes Bokeh. Grain Yes Yes Lens Distortion Yes Yes Motion Blur Camera Yes Yes Object In research Yes Vignette Yes Yes Panini Projection Not supported Yes Particles and terrain
Features URP HDRP VFX Graph (GPU) Yes Yes Particles System (CPU) Yes Shaders Yes Physically Based Yes (Particles Lit) Yes Simple LIghting (Blinn Phong) Yes (Particles Simple Lit) Yes Unlit Yes (Particles Unlit) Yes Soft Particles Yes Yes Distortion Yes Yes Flipbook Blending Yes Yes Trail Yes Terrain Shaders Physically Based Yes Yes Simple Lighting (Blinn-Phong) In research Not supported Unlit In research Not supported Speed Tree Yes In research Vegetation Yes Yes Detail Yes Not supported Wind Zone Yes Not supported Number of Layers 8 8 GPU Patch Generation Yes Yes Surface Mask In research Yes 2D, UI, Ray tracing, VR and AR
Features URP HDRP Sprite Yes Yes Tilemap Yes Yes Sprite Shape Yes Yes Pixel-Perfect Yes Not supported 2D Lights Yes Not supported 2D Shadows Yes Not supported UI (Canvas Renderer) Screen Space – Overlay Yes Yes Screen Space – Camera In research Yes World Space Yes Yes Text Mesh Pro Yes Yes Ray Tracing Ray-traced Ambient Occlusion Not supported Yes Ray-traced Contact Shadows Not supported Yes Ray-traced Global Illumination Not supported Yes Ray-traced Reflections Not supported Yes Ray-traced Shadows Not supported Yes Ray-traced Recursive Rendering Not supported Yes Path Tracing Not supported Yes VR Mutipass In research Yes Single Pass Yes Not supported Single Pass Instanced Yes Windows and PSVR only Post-processing In research Oculus Rift Yes Oculus Quest Yes Yes Oculus Go Yes Not supported Gear VR Yes Not supported PSVR Yes Not supported HoloLens Yes Yes WMR Yes Not supported Magic Leap One Yes Yes Yes Not supported AR AR Foundation Yes No Debug Scene view modes In research Yes Conclusion
You need to decide which render pipeline to use before starting with your game. You should go with HDRP if you are looking to make a game with visually stunning graphics targeted at high-performance hardware. HDRP is the only render pipeline that supports ray tracing.
Основы настройки Universal Render Pipeline (URP) в Unity 2019.3
В этом статье вы узнаете, как начать работу с Universal Render Pipeline (далее «URP«) (для Unity 2019.3), который ранее известен как LWRP (Unity 2019.2 и ниже).
URP можно использовать практически на любой крупной платформе и обеспечивает красивую графику и высокую производительность.
Давайте попробуем преобразовать сцену из Unity в URP.
В первую очередь пойти в Windows — Package Manager и отсюда выберите Universal RP.

Нажмите установить, как вы видите этот пакет является проверенным пакетом, что означает, что он может быть использован.

Первое, что вам нужно сделать — щелкните правой кнопкой мыши в иерархии проекта, чтобы создать файл настройки «URP» – Create – Rendering – Universal Render Pipeline – Pipeline Assets (Forward Render), а затем перейти к редактированию настройка проекта ( Edit – Project Settings — Graphics). Автоматически создастся два файла «URP» и «URP_Renderer».


И в разделе Scriptable Render Pipeline Settings выбрать «URP» который мы только что создали, и, как вы уже догадались, он преобразует все на сцене в розовый, потому что шейдеры по умолчанию не поддерживается в URP, но не волнуйтесь, мы исправим за одну минуту.
Чтобы преобразовать материалы перейти «Edit – Render Pipeline – Universal Render Pipeline – Upgrade Project Materials to UniversalRP», нажмите продолжить и вуаля, как вы можете видеть это не преобразовало все материалы отлично. Давайте посмотрим, как мы можем преобразовать другие материалы вручную.

Например, сцена у нас есть в основном из деревьев и травы, которые нам нужно преобразовать, выберите эту траву и перейдите к ней в материалы, как вы можете видеть, что этот материал травы использует пользовательский шейдер, поэтому он не был преобразован.
Но не волнуйтесь, это просто прозрачная текстура травы, чтобы преобразовать этот материал надо изменить шейдер на «Universal Renderpipeline/Lit», далее «Render Face – Both», в Base Map выбрать текстуру для шейдера, включить Alpha Clipping, а Smoothness опустить на 0.
Ландшафт будет розовым, давайте исправим это.
Идем в папку материалов и создадим новый материал, щелкнуть правой кнопкой мыши Create — Material, который подпишу «Terrain», выберу тип шейдера «Universal Render Pipeline/Terrain/Lit» и после этого переместим его на место материала в terrain сцены.
Вы можете видеть, что наша местность снова отлично видна, но есть еще одна проблема, если вы заметили, наши ветви деревьев не отбрасывают тени, а ствол этих деревьев отбрасывает тень, чтобы решить эту проблему снова перейдите к материалу веток деревьев и из типа поверхности выбрать (surface type) прозрачный (transparent) и заменить на непрозрачный (opaque) и выставить Threshold на 0,5.
Если тени нету — перейдите в Directional light и измените Type — Directional, Mode — Mixed, Shadow Type — Hard Shadow, Dias — Use Pipeline Settings. Теперь они отлично отбрасывают тень.

Теперь давайте также добавим некоторые пост эффекты для дальнейшей импровизации сцены, чтобы добавить эффект пост-обработки правой кнопкой мыши Volume и выберите Global Volume, и вы можете увидеть по умолчанию режим.
Установка Mode — Global означает, что весь пост эффект будет применяться ко всей сцене, если вы хотите применить эффект к определенной области, то вы должны выбрать Local.
Далее добавим в Volume с помощью Add Override Bloom, White Balance, Depth Of Field, Shadows Midtones Highlights и Vignette добавляем при желании поиграть с цветами.И, наконец, перейти к камере для её настройки что бы отобразить в полной мере пост эффекты и URP в сцене и окне пред осмотра игры. Изменим следующие настройки:
- Render Type – Base,
- Field of View – 45,
- Render – Default Render (URP_Render),
- Post Processing – поставить галочку,
- Anti-aliasing – Fast Approximate Anti-aliasing (FXAA).
Также мы создадим три настройки графики для разных по силе устройств. Перейдем в ранее создан файл «UPR», изменим в Quality параметры по своему усмотрению, параметр Render Scale поможет существенно изменить производительность для слабых устройств, в Shadows измените дистанцию теней от 50 до 300 и добавьте каскады для теней что бы снизить нагрузку, остальные параметры можете оставить по умолчанию.