The Scriptable Render Pipeline (SRP) is an alternative to the Unity built-in render pipeline.
With the SRP, you can control and tailor renderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
See in Glossary via C# scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary. This way, you can either slightly modify or completely build and customize the render pipeline to your needs.
The SRP gives you more granularity and customization options than the built-in Unity render pipeline. And you can use one of the pre-built SRPs to target your specific needs.
Using an SRP is different from using the built-in Unity render pipeline. For example, the pre-built SRPs come with a new ShaderA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary library. This is because the Lit shaders from the built-in render pipeline, and custom Lit shaders, do not work with SRPs. You can upgrade the built-in Lit shaders to both LWRP and HDRP.
Note: This is a preview feature and is subject to change. Any scripts that use this feature may need updating in a future release. Do not rely on this feature for full-scale production until it is no longer in preview.
Unity has built two Scriptable Render Pipelines that use the SRP framework: the High Definition Render Pipeline (HDRP) and the Lightweight Render Pipeline (LWRP). Each render pipeline targets a specific set of use-case scenarios and hardware needs. The pre-built render pipelines are available as templates for new Projects.
Both of these render pipelines are delivered as packages via the Package Manager window in Unity. They both include the Shader Graph and Post-processing packages.
Note: LWRP and HDRP are not compatible with each other, and neither is compatible with the built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project.
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.
Use HDRP for AAA quality games, automotive demos, architectural applications and anything that favors high-fidelity graphics over performance. HDRP uses physically-based Lighting and Materials, and supports both Forward and Deferred rendering.
The High Definition Render Pipeline is provided in a single template.
For more information on HDRP, see the HDRP overview on the SRP GitHub Wiki.
You can use the LWRP across a wide range of hardware. The technology is scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality. LWRP uses simplified, physically based Lighting and Materials.
The LWRP uses single-pass forward renderingA rendering path that renders each object in one or more passes, depending on lights that affect the object. Lights themselves are also treated differently by Forward Rendering, depending on their settings and intensity. More info
See in Glossary. Use this pipeline to get optimized real-time performance on several platforms.
The Lightweight Render Pipeline is available via two templates: LWRP and LWRP-VR. The LWRP-VR comes with pre-enabled settings specifically for VR.
Note: Built-in and custom Lit Shaders do not work with the Lightweight Render Pipeline. Instead, LWRP has a new set of standard ShadersA built-in shader for rendering real-world objects such as stone, wood, glass, plastic and metal. Supports a wide range of shader types and combinations. More info
See in Glossary. If you upgrade a current Project to LWRP, you can upgrade built-in Shaders to the new ones.
To see the latest documentation for LWRP, go to Package Manager in Unity, navigate to the Lightweight Render Pipeline package, and click View Documentation.
There are several different ways to install SRP, HDRP and LWRP: If you want to use one of the pre-built SRPs in a new or current Project, continue reading this section. If you are an advanced user, and you want to modify the SRP scripts to directly, see Creating a custom SRP.
If you want to use the HDRP or the LWRP in a new Project, and you don’t need to customise the render pipeline, you can create a new Project using Templates.
To create a Project using Templates:
For more information on using Templates, see Project Templates.
You can download and install the latest version of HDRP, LWRP or SRP to your existing Project via the Package Manager system.
Switching to an SRP from an existing Project consumes a lot of time and resources. HDRP, LWRP and custom SRPs all use custom shaders. They are not compatible with the built-in Unity shaders. You will have to manually change or convert many elements. Instead, consider starting a new Project with your SRP of choice.
To install an SRP into an existing Project:
Before you can use either of the pre-built render pipelines, you must create a Render Pipeline AssetAny media or data that can be used in your game or Project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary and add it to your Project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your Project behave. More info
See in Glossary. The following sections explain how to create the SRP Asset and how to add it to an HDRP or LWRP.
To properly use your chosen SRP, you must create a Scriptable Render Pipeline Asset.
The Scriptable Render Pipeline Asset controls the global rendering quality settings of your Project and creates the rendering pipeline instance. The rendering pipeline instance contains intermediate resources and the render pipeline implementation.
You can create multiple Pipeline Assets to store settings for different platforms or for different testing environments.
To create a Render Pipeline Asset:
Note: HDRP and LWRP are not compatible with each other, because they use different lighting models. Your Project must use one or the other. You can, however, use different Assets with the same render pipeline. This means that you can test different settings using different Assets by swapping between them, instead of changing individual settings.
To use HDRP, you must edit your Project’s Player and Graphics settings as follows:
Tip: Always store your High Definition Render Pipeline Asset outside of the Scriptable Render Pipeline folder. This ensures that your HDRP settings are not lost when merging new changes from the SRP GitHub repository.
To use the LWRP, you must edit your Project’s Graphics settings as follows:
Tip: Always store your new Lightweight Render Pipeline Asset outside of the Scriptable Render Pipeline folder. This ensures that your Lightweight settings are not lost when merging new changes from the SRP GitHub repository.
The Scriptable Render Pipelines are available in an open Project on GitHub. You can clone an SRP and make modifications in your local version.
To configure local script files for a new or existing Unity Project:
Create a clone of the SRP repository. Place the clone in the root of the Project directory, next to the Assets folder. For information on cloning repositories, see the GitHub help on Cloning a repository.
Checkout a branch that is compatible with your version of Unity. Use the command git checkout
, and type the branch name.
Use the git submodule update --init
command to find and initialize all submodules related to the SRP.
In your Project manifest, update dependencies
to so that they point to the SRP packages. To read more about Project manifests, see the Package Manager documentation. Here is an example of what your script should look like:
{
"dependencies": {
"com.unity.postprocessing": "file:../ScriptableRenderPipeline/com.unity.postprocessing",
"com.unity.render-pipelines.core": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:../ScriptableRenderPipeline/com.unity.shadergraph",
"com.unity.render-pipelines.lightweight": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.lightweight"
}
}
Open your Project in Unity. Your packages are now installed locally. When you open the Project solution in an integrated development environment, you can debug and modify the script directly.
2018–12–12 Page amended with editorial review
Scriptable Render Pipline added in 2018.1 NewIn20181