Working with Integer and Comment nodes
In this recipe, we use the IntConstant, IntFunc, and IntOp nodes to input values that will connect to a VectorCompose node, which will connect to the Albedo material of the MeshInstance3D PlaneMesh. We also use the Comment node to group all of the Integer nodes together and type a comment about the nodes.
Getting ready
For this recipe, we will stay in VSContextMenu
from the last recipe. In the Material section in the Inspector, to the right of Shader, click on the counterclockwise circle to the left of the VSContextMenu.tres
file to make the field empty. Click on <empty> and select New Shader from the drop-down list. In the Type section, select Visual Shader and then name it IntComNodes
.
How to do it…
To see how the Integer nodes work, we are going to create more than you would normally use and also use the new Comment node:
- Click on the Distraction Free Mode (Ctrl + Shift + F11) button located just to the left...