Complete the code to create a new Shader Graph asset.
var shaderGraph = new ShaderGraph.[1]();The ShaderGraph class is used to create a new Shader Graph asset in Unity.
Complete the code to add a Color node to the Shader Graph.
var colorNode = new [1]Node();The ColorNode represents a color input in Shader Graph.
Fix the error in the code to connect the Color node output to the Base Color input of the Master node.
masterNode.[1]("BaseColor", colorNode.output);
The Connect method links the output of one node to the input of another in Shader Graph.
Fill both blanks to create a Vector1 property and add it to the graph's properties.
var [1] = new Vector1Property(); graph.[2]([1]);
We create a Vector1Property named myFloat and add it to the graph using AddProperty.
Fill all three blanks to create a simple shader graph that multiplies a color by a float and outputs it.
var color = new [1]Node(); var multiplier = new [2]Node(); masterNode.[3]("BaseColor", color.output * multiplier.output);
We create a ColorNode and a Vector1Node, then Connect their multiplied output to the master node's BaseColor.