What is the Universal Render Pipeline (URP)?
The Universal Render Pipeline (URP) is a prebuilt Scriptable Render Pipeline in Unity that provides optimized, scalable graphics across a wide range of platforms, from mobile devices and XR headsets to PCs, consoles, and the web.
URP replaced the Lightweight Render Pipeline (LWRP) in Unity 2019.3 and provides an alternative to Unity’s Built-in Render Pipeline.
What is a render pipeline?
A render pipeline is the sequence of steps a game engine uses to turn a 3D scene into an image on screen, including determining what the camera can see, rendering objects with their materials and lights, and applying post-processing effects. The graphics pipeline on the GPU handles the lowest-level stages of this process.
Unity provides three render pipelines: the Universal Render Pipeline (URP), the High Definition Render Pipeline (HDRP), and the Built-in Render Pipeline. Each Unity project uses one render pipeline.
How does URP work?
URP is configured through several core components:
- URP Asset: A settings asset that controls rendering and quality for a project. Projects can use different URP Assets for different platforms or quality levels.
- Renderers: The Universal Renderer handles 3D rendering, while the 2D Renderer provides features such as 2D lighting and shadows for 2D projects.
- Rendering paths: Forward, Forward+, Deferred, and Deferred+ offer different approaches to rendering lights and can affect performance and memory usage.
- Renderer Features: Add custom rendering passes for effects such as outlines or custom lighting without modifying the URP source code.
- Volumes: Control post-processing and other environmental effects, such as bloom, color adjustments, and depth of field, across an entire scene or within specific areas.
What is URP used for?
URP is designed for projects that need scalable, optimized graphics across a wide range of platforms. Common uses include:
- Mobile games: Deliver high-quality 2D and 3D graphics within the performance, power, and memory constraints of mobile devices.
- XR: Deliver the high and consistent frame rates required for VR and AR applications, including experiences running on standalone headsets.
- 2D games: Add real-time 2D lighting and shadows to sprite-based games using the 2D Renderer.
- PC and console games: Create stylized or realistic 3D experiences that can be deployed across multiple platforms.
- Web: Create interactive 2D and 3D experiences for browsers using WebGL and WebGPU.
What are the benefits of URP?
- Cross-platform rendering: URP supports a wide range of platforms, from mobile devices and XR to PCs, consoles, and the web.
- Built for performance: Features such as the SRP Batcher and GPU Resident Drawer can help reduce rendering overhead and improve performance.
- Customizable: Renderer Features and C# scripting let developers extend URP and create custom rendering effects.
- Scalable graphics: URP provides configurable rendering features that let developers balance visual quality and performance for different target platforms.