docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Introduction to Scriptable Render Passes

    Scriptable Render Passes are a way to alter how Unity renders a scene or the objects within a scene. They allow you to fine tune how Unity renders each scene in your project on a scene-by-scene basis.

    The following sections explain the fundamentals of Scriptable Render Passes:

    • What is a Scriptable Render Pass?
    • Scriptable Render Passes in Scenes

    You can use Scriptable Renderer Features to inject Scriptable Render Passes into a renderer. For more information, refer to Scriptable Render Passes in Scenes.

    What is a Scriptable Render Pass?

    You inject a Scriptable Render Pass into the render pipeline to achieve a custom visual effect. To do this, you add the Scriptable Render Pass via a MonoBehavior script with the EnqueuePass method and add this script as a component to a renderer, camera, or GameObject.

    A Scriptable Render Pass lets you to do the following:

    • Change the properties of materials in your scene.
    • Change the order that Unity renders GameObjects in.
    • Lets Unity read camera buffers and use them in shaders.

    For example, you can use a Scriptable Render Pass to blur a camera’s view when showing the in-game menu.

    Unity injects Scriptable Render Passes at certain points during the URP render loop. These points are called injection points. You can change the injection point Unity inserts your pass at to control how the Scriptable Render Pass affects the appearance of your scene. For more information on injection points, refer to Injection Points.

    Scriptable Render Passes in Scenes

    You can inject a Scriptable Render Pass into a scene via any GameObject present in the scene. This gives you more precise control over when the render pass is active. But this means you must have a GameObject inject the render pass at every point you want to use it. As a result, it's better to inject any common effects in your project via a Scriptable Renderer Feature instead.

    When you inject a Scriptable Render Pass into a scene via any GameObject, it's important to consider how URP uses this script. The first Camera to render the Scriptable Render Pass uses up the render pass, and is the only Camera the render pass applies to. Any Cameras that the Scriptable Render Pass would apply that render after the first Camera don't render the effect.

    For example, if you have two Cameras and you add the Scriptable Render Pass in the Update method, only the first Camera to render uses the Scriptable Render Pass effect. This is because the first camera uses up the instance of the effect. As the second Camera renders before the next call of the Update method, a second instance of the Scriptable Render Pass isn't available to use. As a result, the second Camera doesn't apply the effect from the Scriptable Render Pass to its output.

    Additional resources

    • Example of a complete Scriptable Renderer Feature
    • Scriptable Renderer Feature Reference
    • How to inject a Custom Render Pass via scripting

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • What is a Scriptable Render Pass?
    • Scriptable Render Passes in Scenes
    • Additional resources
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)