I’d like to propose a forum feature that could be expanded to other web content (blogs, tutorial pages, Unity connect … ) that would allow a graphical representation of the shader graph ‘code’.
If you select and copy any part of the graph in shader graph you already get a formated piece of ‘code’
something like:
_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\":
But this isn’t readable obviously, so posting this when asking for help, or sharing tips with others wouldn’t make sense. On the other hand a screen shot of your graph clear to read, but recreating it inside Unity takes a lot of time and is prone to errors. If we could have the option to paste a special snippet of the 'shader graph ’ code that would get ‘rendered’ into the visual representation of the shader graph, but at the same time retain the code and allow to copy it, that would make sharing of resources and knowledge much easier.
‘code’ → graph image → ‘code’
This could be expanded to other graphs, like visual effects graph and visual scripting which I understand is on the road map as well.