Course contentsShow
← Unity Game Development
Lesson 607 of 8289. Rendering and VisualsFree lesson

Configuring Shader Graph Environments and Master Nodes

Learn to set up a new Shader Graph project and select the appropriate master node for different rendering pipelines.

In this lesson, you will learn how to initialize a new Shader Graph project and select the precise Master Node required to ensure your shaders are compatible with your specific Render Pipeline.

When you create a new Shader Graph asset in Unity, the first thing you must determine is the "Target" of your shader. Because Unity supports different rendering pipelines (URP and HDRP), the backend mathematics and rendering features change significantly. A shader built for the Universal Render Pipeline (URP) cannot simply be "dropped into" the High Definition Render Pipeline (HDRP) because the Master Nodes—the final output blocks of your graph—expect different data inputs to calculate lighting, shadows, and surface properties.

Choosing Your Master Node

When you open a new Shader Graph, you will see a Block representing your output. In URP, you typically use the Lit or Unlit Master Node. If your project uses Metallic/Roughness workflows, the Lit Master Node provides the necessary inputs for Base Color, Normal, Metallic, and Smoothness.

To configure your environment correctly:

  1. Ensure your Project Settings (Edit > Project Settings > Graphics) match your installed Render Pipeline Asset.
  2. When creating a graph via Create > Shader Graph, pick the template that matches your Pipeline (e.g., URP > Lit Shader Graph).
  3. If you ever need to change a node's capabilities, you can select the Graph Settings cog icon in the Blackboard. Here, you can toggle between Lit, Unlit, or Decal targets to adjust the input slots available on your Master Node.

For instance, if you are building a wall material, you would set your Master Node to Lit. This exposes the Normal and Metallic slots, allowing you to hook up the maps you learned about in previous lessons. If you only need a UI element or a simple glow, switching the Master Node to Unlit removes the expensive lighting calculations, optimizing performance immediately.

Always verify that your Master Node target matches your project's Render Pipeline Asset, or your shader will fail to compile and appear as a magenta error in the Scene View.

Key Takeaway: Matching your Master Node to your Render Pipeline ensures that your shaders receive the correct data inputs and compile successfully for your target platform.