Exposing properties to the Inspector via Shader Graph
It is great to be able to create graphs and set up their properties using the graph editor, but sometimes it is nice to use the same shader with a simple tweak in the same manner that we've used with the previous shaders we've created. To do this, we can make use of the blackboard panel.
Getting ready
Ensure that you have created the SimpleGraph shader in the previous recipe. Afterward, complete the following steps:
- From the
Project
tab, select theSimpleGraph
shader and duplicate it by pressing Ctrl + D. Once duplicated, name the newly created shaderExposeProperty
. - Next, create a new material (
ExposePropertyMat
) and set the shader it uses to thegraphs/ExposeProperty
selection. - 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.
How to do it...
If you look at our shader from the Inspector
tab, you may notice the Texture...