How to do it...

We will start off by creating a simple shader graph:

  1. From the Project window, create a new shader by going to Create Shader PBR Graph, and name it GlowGraph.
  2. Afterward, create a new material by going to Create | Material (I named mine GlowGraphMat). Next, assign the shader to the material by selecting the material, and then, from the Inspector tab, you should select the Shader dropdown at the top and select graphs/GlowGraph.
  3. Then, drag and drop the material onto our sphere object in the scene, so we can see our shader being used in action.
  4. Now that the setup is done, we can start creating the graph. If you select the shader, you should see that, from the Inspector tab, there will be a button that says Open Shader Graph. Click ...

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.