docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Default Gradient node

    Note

    Use this node only in shaders with Material set to UI for UI Toolkit. Using it elsewhere can lead to unexpected behavior or errors. For information on how to create shaders for UI Toolkit, refer to UI Shader Graph.

    Outputs the gradient specified for your UI elements. For example, if you set the background image of a button to use a vector graphic with a linear gradient from top red to bottom green, the Default Gradient node outputs that gradient for the button.

    You can use the Default Gradient node combined with other nodes to create custom effects for the gradient render type. For example, you can multiply the output of this node with a Color node to filter unwanted colors from the gradient.

    Ports

    Name Direction Type Description
    Gradient Output Gradient The gradient specified for the UI element.

    Additional resources

    • Default Solid node
    • Default Texture node
    • Default SDF Text node
    • Default Bitmap Text node
    • Render Type Branch node
    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)