High-end graphics in Unity: best practices & tipsLast updated: January 2019
What you will get from this page: An efficient overview of in-depth resources for the Scriptable Render Pipelines in Unity.
The Scriptable Render Pipeline (SRP), which consists of the High-Definition Render Pipeline (HDRP) and the Lightweight Render Pipeline (LWRP), is one of the most important systems you will use in Unity. The SRP lets you control and tailor rendering via C# scripts. This way, you can either slightly modify or completely build and customize the render pipeline to create gorgeous interactive content for any platform.
Read, learn, and make it beautiful.
Before you read further, please note that both rendering pipelines are currently in preview mode. Any scripts that use them may need updating in a future release and it’s recommended to not rely on this feature for full-scale production until it’s out of preview mode and fully released.
Where to start: the overview and how to install
The High-Definition Render Pipeline
The HDRP targets high-end hardware like consoles and PCs. With the HDRP, you’re able to achieve realistic graphics in demanding scenarios. The HDRP uses Compute Shader technology and therefore requires compatible GPU hardware.
The HDRP was developed to be used in mainly automotive demos, architectural applications, AAA games–anything that favors high-fidelity graphics over performance. It uses physically-based Lighting and Materials, and supports both Forward and Deferred rendering.
Sebastien Lagarde, a lead graphics developer at Unity provides an excellent introduction to the HDRP in this blog post
Whether you are an artist or a graphics programmer, you’ll learn a lot in this thorough post on how to author high-end content with the HDRP.
The Lightweight Render Pipeline
The LWRP can be used across a range of hardware, and was primarily developed to scale to mobile although you can also use it for content running on high-end PCs or consoles. The LWRP enables quick rendering at a high quality. It uses simplified, physically based Lighting and Materials, and single-pass forward rendering.
Tim Cooper, Graphics Foundation Lead at Unity, wrote this great overview of the LWRP when it was released in preview mode.
Recently, Felipe Lira, a graphics programmer and André McGrail, a graphics test engineer, presented in-depth about the LWRP. Around 15 minutes into their presentation, Felipe goes over a number of key topics, including:
- Pipeline configuration
- How camera data is handled
- The standard shaders provided with the LWRP
- How to use the new Material Upgrader
- Shader stripping (you can read more about shader stripping in this blog post)
- A comparison of performance between the LWRP and built-in pipeline
- How the LWRP addresses bottlenecks, such as drawcalls, fill-rate and bandwidth, with new optimizations: the Batcher, a new shading framework and the renderer itself.
To round off the presentation, the engineers explain in detail how they made the demo that showcases the LWRP capabilities.