Steps to reproduce:
1. Open any URP-enabled Unity project
2. Create a new Shader Graph (Assets>Create>Shader Graph>Lit Shader Graph)
3. Create a Dither node
4. Drag out a connector from the Dither node’s out port and select any node from the node dropdown
5. Observe the console/try moving around in the Shader Graph window
Note: not tested with every node, but consistently reproduces with any tested node
Reproducible with: 2022.3.11f1 (14.0.9), 2023.3.0a10 (17.0.1)
Not reproducible with: 2021.3.31f1 (12.1.12), 2022.3.10f1 (14.0.8), 2023.1.16f1, 2023.2.0b14 (16.0.4), 2023.3.0a9 (17.0.1)
Expected result: a connected node is created
Actual result: an error is thrown and the Shader Graph window becomes unusable
Error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ShaderGraph.Drawing.GraphEditorView.AddEdge (UnityEditor.Graphing.IEdge edge, System.Boolean useVisualNodeMap, System.Boolean updateNodePorts, System.Collections.Generic.Dictionary`2[TKey,TValue] lookupTable) (at ./Library/PackageCache/com.unity.shadergraph@17.0.1/Editor/Drawing/Views/GraphEditorView.cs:1287)
UnityEditor.ShaderGraph.Drawing.GraphEditorView.HandleGraphChanges (System.Boolean wasUndoRedoPerformed) (at ./Library/PackageCache/com.unity.shadergraph@17.0.1/Editor/Drawing/Views/GraphEditorView.cs:854)
UnityEditor.ShaderGraph.Drawing.MaterialGraphEditWindow.Update () (at ./Library/PackageCache/com.unity.shadergraph@17.0.1/Editor/Drawing/MaterialGraphEditWindow.cs:372)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:363)