O'Reilly logo

Unity 2018 Shaders and Effects Cookbook by Alan Zucconi, John P. Doran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 Graphand 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required