docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Sub Graphs

    A Sub Graph is a type of shader graph that you include in other shader graphs. Use a Sub Graph to perform the same operations multiple times within a single shader graph, or across multiple shader graphs. It's similar to a reusable function in programming.

    Topic Description
    Introduction to Sub Graphs Learn about how a Sub Graph differs from a regular shader graph, and refer to example Sub Graphs.
    Create a Sub Graph Create a Sub Graph from existing nodes, or create an empty Sub Graph.
    Add a Sub Graph to a shader graph Add a Sub Graph node to a shader graph.
    Add inputs and outputs to a Sub Graph To pass data in and out of a Sub Graph, create input and output ports.
    Set default inputs for a Sub Graph Add default values for the inputs of a Sub Graph.
    Change the behavior of a Sub Graph with a dropdown Add a Dropdown node to change the behavior of a Sub Graph using a dropdown menu.
    Sub Graph asset Learn about the Sub Graph asset.

    Additional resources

    • Blackboard
    • Custom Lighting samples
    In This Article
    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)