Version: 2019.4
Scriptable Render Pipeline introduction
Creating a Render Pipeline Asset and Render Pipeline Instance

Creating a custom Scriptable Render Pipeline

Unity provides two prebuilt Scriptable Render Pipelines (SRPs): the High Definition Render Pipeline (HDRP), and the Universal Render Pipeline (URP). HDRP and URP offer extensive customization options. However, if you want even more control over your rendering pipeline, you can create your own custom SRP.

Creating a new Project and installing the packages needed for a custom SRP

These instructions show you how to create a custom SRP using the SRP Core package. SRP Core is a package made by Unity that contains a reusable code to help you make your own SRP, including boilerplate code for working with platform-specific graphics APIs, utility functions for common rendering operations, and the shader library that URP and HDRP use. For more information on SRP Core, see the SRP Core package documentation.

  1. Create a new Unity Project.
  2. Use Git to create a clone of the SRP source code repository. You can place the SRP source code in any location on your disk, as long as it is not in one of the reserved Project sub-folders.
  3. Use Git to update your copy of the SRP source code to a branch that is compatible with your version of the Unity Editor. Read Using the latest version in the SRP repository documentation for information on branches and versions.
  4. Open your Project in Unity, and install the following packages from the SRP source code folder on your disk, in the following order. For information on installing packages from disk, see Installing a local package.
    • com.unity.render-pipelines.core.
    • Optional: com.unity.render-pipelines.shadergraph. Install this package if you intend to use Shader Graph or modify the Shader Graph source code as part of your custom SRP.
    • Optional: com.unity.render-pipelines.visualeffectgraph. Install this package if you intend to use Visual Effect Graph or modify the Visual Effect Graph source code as part of your custom SRP.

You can now debug and modify the scripts in your copy of the SRP source code, and see the results of your changes in your Unity Project.

Creating a custom version of URP or HDRP

The Universal Render Pipeline (URP) and the High Definition Render Pipeline (HDRP) offer extensive customization options to help you achieve the graphics and performance you need. However, if you want even more control, you can create a custom version of one of these render pipelines, and modify the source code.

Follow steps 1–3 in the section above, Creating a new Project and installing the packages needed for a custom SRP. When you reach step 4, install the following packages in the following order:

URP:

  • com.unity.render-pipelines.core
  • com.unity.render-pipelines.shadergraph
  • com.unity.render-pipelines.universal

HDRP:

  • com.unity.render-pipelines.core
  • com.unity.render-pipelines.shadergraph
  • com.unity.render-pipelines.high-defintion
Scriptable Render Pipeline introduction
Creating a Render Pipeline Asset and Render Pipeline Instance
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961