docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Get started with the Custom Lighting sample

    Use the templates and sub graphs included in the Custom Lighting sample to get started with lighting model customization in Shader Graph.

    Note

    To use the Custom Lighting templates and sub graphs, you first need to import the sample in your project.

    Start from a shader graph template

    To use one of the available Custom Lighting templates as a starting point to customize lighting in a prebuilt shader graph asset, follow these steps:

    1. Create a shader graph asset from a template.

    2. In the template browser, select one of the templates from the URP Custom Lighting section.

    3. Select Create.

    4. Open the created shader graph asset in the Shader Graph window if the window doesn't open automatically.

    Start from an empty shader graph

    To use one of the available Lighting Model sub graphs as a starting point to customize lighting in an empty shader graph asset, follow these steps:

    1. Create a shader graph asset with a preset target and select URP > Unlit Shader Graph.

    2. Open the created shader graph asset in the Shader Graph window if the window doesn't open automatically.

    3. Go to the Create Node menu and add one of the sub graphs from the Custom Lighting > Lighting Models section.

    4. Connect the Lit output port of the added sub graph to the Base Color input port of the Master Stack.

    5. To allow the Unlit target to correctly support custom lighting models, set the Graph Settings as follows:

      • Enable Keep Lighting Variants.
      • Disable Default Decal Blending and Default SSAO.

    Additional resources

    • Create a shader graph asset
    • Add and connect nodes
    In This Article
    Back to top
    Copyright © 2026 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)