IMPORTANT
Are you on unity 2017.3 beta and want to use SRP? Good new we maintain an active branch now located on git.
How to use the latest version
The repository no longer consists of a complete Unity project, but rather assumes to be put inside a sub-folder of the Assets\ folder of an existing Unity project. Make sure that your project uses linear color space (Edit > Project Settings > Player).
Perform the following instructions to get a working copy of SRP:
> cd <Path to your Unity project>/Assets
> git clone https://github.com/Unity-Technologies/ScriptableRenderLoop
> cd ScriptableRenderLoop
> git submodule update --init --recursive --remote
After you launch the project go to graphics settings and select a render pipeline to work with. Currently I recommend staring with the light weight as itâs a little simpler and more mature.
Scriptable Render Pipelines
The SRP project aims to redefine how Unity does rendering at all levels, up until now rendering in has been very strictly defined by Unity. There was of course hook points into the engine to modify behaviour, but it was quite limited. SRP is how we are opening up the rendering engine inside Unity to you!
Low End Pipeline Test scene
What is it?
The Scriptable Render Pipeline (previously known as âscriptable render loopsâ), is a new way of configuring and performing rendering in Unity! Itâs a massive conceptual shift away from how we currently to do things and is designed to completely redefine what Unity is capable of when it comes to rendering!
Currently in Unity we provide a number of rendering configurations (for example: forward rendering and deferred rendering). These pipelines are fixed and created by us; what this means is that we are dictating to you how rendering should happen. This has a number of downsides:
- You canât fix or workaround rendering issues.
- The pipelines are large and complex, as they have to handle all use cases.
- Itâs very difficult to add state-of-the-art effects due to legacy and complexity.
Really, we are trying to do everything for everyone and that doesnât scale. We remove complexity and allow massive flexibility. This is where the pipelines come in!
How does it work?
Last year we released Graphics Command Buffers; this feature allowed you to inject custom rendering code into parts of the render pipeline. The SRP project is the next step. Complete rendering control is pushed from our internals into user-land C# scripting.
Instead of providing a monolithic rendering pipeline, what we provide with the SRP is a set of Lego-like blocks that you can plug together. Each block is well defined with a single function that is easy to test, improve, and maintain. Itâs also easy for us to add new blocks to the engine as rendering technology advances and new techniques become available
From a user point of view what happens is that there is a rendering entry point in a C# class, from there the you can do whatever they want! The long term goal here is to decouple the concepts of cameras and lights and similar from Unity internal rendering concepts. They will become data containers that the SRP can use to configure rendering.
Improving Unity
As we are developing all the above, we are also discovering various other pieces of âlow level graphicsâ in Unity that need improving or are simply missing. Because of this we are doing a lot of improvements to compute shaders, shader compiliaton and variant handling, bug fixing shader translators, adding more flexibility to graphics buffer management, MS texture support improvements and so on. All that is not directly related to SRP, but are needed to do interesting things with it.
Low End Pipeline Test scene
What is it not?
SRP is a BIG project for us. The SRP allows for very fast iteration times and experiment with cutting edge techniques. Internally we are already writing a lot of cool new test frameworks and experimental renderers using the SRP. The iteration time is amazing!
That being said, at the core, the foundational SRP is NOT an artist tool. The pipelines that we provide and that you create will facilitate the creation of amazing content, but generally they will be written by a rendering programmer.
The specific pipelines that are created are where the artist friendly amazingness comes in. In these we can add specific shaders and tooling to create an amazing and artist friendly tool pipeline.
Awesome, how do I play with this?
Clone the project from github. The current head should work with the current 2017 beta. This is our in development location for render pipelines that will become part of the public release as they mature. Currently the most mature pipeline is the Low End pipeline. This is targeted towards mobile devices and is a good place to start investigation how to write a pipeline.
Is there a tutorial I can use?
Earlier this year I did a presentation at GDC about the render pipelines. The demo project is here. This runs on the current 2017 beta The project builds a render pipeline up step by step and shows how to use many of the various features described in the slides