Unity 2018.1 (well-suited to create a 3D configurator) sets new standards for control and flexibility. One of the coolest features in 2018.1 is Shader Graph. Whether you`re a beginner or a pro, it helps you create a range of shaders: flowing lava, sticky slime, beautiful lakes, flashing LEDs and more.
The Shader Graph allows you to create your shaders visually. Instead of writing code by hand, you can create and connect nodes in a graph network. The following things can be done with Shader Graph:
The graph framework provides instant feedback on changes, and it`s easy to get new users involved in shader creation.
The graph framework is now available in beta. Download the sample project, open it with Unity 2018.1 beta, and start exploring. You can also get Shader Graph from the Package Manager.
Shader Graph is designed to work with another Unity 2018.1 feature: Scriptable Render Pipeline (SRP). Therefore, you cannot use it with the Built-In Unity Renderer. It is provides with support for:
You will also be able to extend the system to export shaders for each custom SRP that they write.
In the following Video you will find a tutorial on the Shader Graph:
How to create shader graphs?#
In Unity 2018.1, a shader graph appears as a normal shader. To create a shader graph, click the Create menu and select “Shader Graph” from the drop-down list. This will create a shader graph asset in the project. You can double-click the asset or select the Open Graph button to open the Shader Graph Edit window.
When you open the Shader Graph, start with the Master Node. You connect nodes to the master node to create the appearance of their surface. For more information on the underlying material models, refer to the Unity Standard Shader documentation.
You can quickly edit your surface by changing the default values. Even more exciting is adding textures and other complex interactions. To add a node, simply right-click and select Create Nodes.
Each included Shader Graph Node has a number of inputs and default values have been added that you can customize as you wish.
Adding a texture (or other assets) is also very easy, just create a node of this asset type and connect it.
Your Shader Graph shader is like a normal shader in Unity. Right-click any object in the Inspector and select Create Material. You can create multiple materials from the same shader.
You can easily share parameters in your shader so that they can be overwritten in any material you create with your shader. In the shader graph, right-click on any variable node and select “Convert to Property”. These exposed parameters appear in the Material Inspector for each material you create with your shader.
Thank you for reading.