This page explains how the Scriptable Render Pipeline (SRP) works, and introduces some key concepts and terminology.
SRP is a thin API layer that lets you schedule and configure 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 commands using 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. SRP passes these commands to Unity’s low-level graphics architecture, which then sends instructions to the graphics API.
When you write C# rendering code in SRP, you must create and customise two key elements:
Rendering.RenderPipelineAsset
, and then you create and configure instances of the Render Pipeline Asset in your Project.Render()
method that is the entry point to SRP. To define a Render Pipeline Instance, you create a script that inherits from RenderPipeline
.For information about creating these elements, see Creating a Render Pipeline Asset and a Render Pipeline Instance.
The Scriptable Render Context is a class that acts as an interface between your C# SRP code and Unity’s low-level graphics code. You schedule and execute rendering commands using the ScriptableRenderContext API.
For information about using the Scriptable Render Context, see Scheduling and executing rendering commands in the Scriptable Render Pipeline.
In SRP, you can write C# rendering code that Unity calls at specific times.
Render()
method of the Render Pipeline Instance is the entry point to the SRP. Unity calls this method once per frame for each CameraType that is currently rendering. Customize this method to customize your SRP.