Getting ready

Ensure that you have created the SimpleGraph shader in the previous recipe. Afterward, complete the following steps:

  1. From the Project tab, select the SimpleGraph shader and duplicate it by pressing Ctrl + D. Once duplicated, name the newly created shader ExposeProperty.
  2. Next, create a new material (ExposePropertyMat) and set the shader it uses to the graphs/ExposeProperty selection.
  3. Assign the material to the sphere in our scene:

The project should look the same as what we had in the previous recipe since we are using a duplicate of the previous shader.

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.