shown in other instead.
Custom Subgraphs Sample
This sample demonstrates how to create Subgraphs and use them in your Material Graphs. There are two Subgraphs included:
1) A simple Subgraph demonstrating all available inputs (all_types_of_data_subgraph).
2) A simple Subgraph implementing contrast correction for the albedo color (my_contrast).
The image below demonstrates how the Subgraphs described above are used in a complex Material Graph.
- Using the xyz port adapter the my_contrast node (Subgraph) takes the first thee color components sampled by the Sample 2D node from the data of the Texture node and performs color adjustment with the contrast value provided by the Float Slider node (enabling you to adjust a float value via the Parameters panel in the UnigineEditor). Finally, the data output from the master material node is passed to the Final Material node.
- Nodes providing all available input types (float, int, texture) are connected to the corresponding input ports of the all_types_of_data_subgraph Subgraph node.