Hi, I might ask that is possible to add a reroute node like blender does to SG?
That would be extremely useful to organize messy graphs and avoid connecting a node’s output to multiple and further node’s.
Hi, I might ask that is possible to add a reroute node like blender does to SG?
That would be extremely useful to organize messy graphs and avoid connecting a node’s output to multiple and further node’s.
I know it’s not exactly the same but you could use a ‘preview’ node to help a bit with this
Yes I was using them since I wrote this post, they are not the same but works anyways
The documentation says the preview node generates code… Hopefully it gets optimized out though? I want to use it for the same purpose.
void Unity_Preview_float4(float4 In, out float4 Out)
{
Out = In;
}
Well, you have new rerouting ports now in shader graph:
How was this node created? I did not find this node in the 2022.3.13f1 version. I only knew that it was called Reroute node. When I copied it again, I got its information.
application/vnd.unity.graphview.elements {
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CopyPasteGraph",
"m_ObjectId": "88e5007f7eb8448b96f90b0512add4bb",
"m_Edges": [],
"m_Nodes": [
{
"m_Id": "8b00d760e13d40f98797beb847f05ede"
}
],
"m_Groups": [],
"m_StickyNotes": [],
"m_Inputs": [],
"m_Categories": [],
"m_MetaProperties": [],
"m_MetaPropertyIds": [],
"m_MetaKeywords": [],
"m_MetaKeywordIds": [],
"m_MetaDropdowns": [],
"m_MetaDropdownIds": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "6d23ac134338499388c740c5dbb93e42",
"m_Id": 1,
"m_DisplayName": "",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.RedirectNodeData",
"m_ObjectId": "8b00d760e13d40f98797beb847f05ede",
"m_Group": {
"m_Id": ""
},
"m_Name": "Redirect Node",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1899.0,
"y": -745.0000610351563,
"width": 56.0,
"height": 24.00006103515625
}
},
"m_Slots": [
{
"m_Id": "ae3179aed9424741a603ae052af4b1ac"
},
{
"m_Id": "6d23ac134338499388c740c5dbb93e42"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "ae3179aed9424741a603ae052af4b1ac",
"m_Id": 0,
"m_DisplayName": "",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
You can double-click on any wire in the graph to insert the reroute node.
Thanks My Friend!
I hate to be the guy that reopens a solved problem but I think it’d be nice if these reroute nodes were included in the list of nodes that appear in the Create Node Menu in case you didn’t know you could double click the wire to create them. I encountered them for the first time in one of the Unity Sample Projects and was trying to find it in the menu; I even right-clicked it and chose the Open Documentation Context Menu option and it took me to a blank page. It was a missed learning opportunity for me that I only recovered from asking around.