浏览代码

Merge branch 'master' into node-bugfixes

/main
GitHub 7 年前
当前提交
5546123e
共有 59 个文件被更改,包括 2053 次插入325 次删除
  1. 3
      .gitignore
  2. 168
      MaterialGraphProject/Assets/PartyPreview.ShaderGraph
  3. 41
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraph.cs
  4. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorMaterialSlot.cs
  5. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/ReplaceColorNode.cs
  6. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ColorMaskNode.cs
  7. 17
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs
  8. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/CameraNode.cs
  9. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Vector/TransformNode.cs
  10. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Procedural/CheckerboardNode.cs
  11. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/SubGraphNode.cs
  12. 73
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/GraphInspectorView.cs
  13. 14
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Draggable.cs
  14. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs
  15. 15
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs
  16. 215
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/SearchWindowProvider.cs
  17. 90
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs
  18. 79
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs
  19. 58
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
  20. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorSlotControlView.cs
  21. 212
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss
  22. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/SerializableGraph/Implementation/SerializableGraph.cs
  23. 2
      MaterialGraphProject/Assets/UnityShaderEditor/package.json
  24. 3
      MaterialGraphProject/UnityPackageManager/manifest.json
  25. 97
      LICENSE
  26. 35
      MaterialGraphProject/Assets/NewNodes/Editor/Sampler2DShaderProperty.cs
  27. 3
      MaterialGraphProject/Assets/NewNodes/Editor/Sampler2DShaderProperty.cs.meta
  28. 112
      MaterialGraphProject/Assets/NewNodes/Editor/SceneDepthNode.cs
  29. 8
      MaterialGraphProject/Assets/NewNodes/Editor/SceneDepthNode.cs.meta
  30. 114
      MaterialGraphProject/Assets/NewNodes/Editor/SceneNormalsNode.cs
  31. 8
      MaterialGraphProject/Assets/NewNodes/Editor/SceneNormalsNode.cs.meta
  32. 109
      MaterialGraphProject/Assets/NewNodes/Editor/SceneVelocityNode.cs
  33. 8
      MaterialGraphProject/Assets/NewNodes/Editor/SceneVelocityNode.cs.meta
  34. 176
      MaterialGraphProject/Assets/Oilish.ShaderGraph
  35. 7
      MaterialGraphProject/Assets/Oilish.ShaderGraph.meta
  36. 29
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorRGBMaterialSlot.cs
  37. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorRGBMaterialSlot.cs.meta
  38. 40
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableMesh.cs
  39. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableMesh.cs.meta
  40. 49
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/AmbientNode.cs
  41. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/AmbientNode.cs.meta
  42. 98
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs
  43. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs.meta
  44. 41
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs
  45. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs.meta
  46. 39
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs
  47. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs.meta
  48. 37
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/EdgeConnectorListener.cs
  49. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/EdgeConnectorListener.cs.meta
  50. 34
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Scrollable.cs
  51. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Scrollable.cs.meta
  52. 28
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/ShaderPort.cs
  53. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/ShaderPort.cs.meta
  54. 28
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs
  55. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs.meta
  56. 97
      MaterialGraphProject/Assets/UnityShaderEditor/LICENSE
  57. 7
      MaterialGraphProject/Assets/UnityShaderEditor/LICENSE.meta
  58. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/NodeCreator.cs.meta
  59. 40
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/NodeCreator.cs

3
.gitignore


MaterialGraphProject/Packages/*
MaterialGraphProject/GeneratedShader.shader
MaterialGraphProject/UberShader.shader
!MaterialGraphProject/Packages/manifest.json
!MaterialGraphProject/Packages/manifest.json
.npmrc

168
MaterialGraphProject/Assets/PartyPreview.ShaderGraph


"m_SerializableNodes": [
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"9e517333-68bd-4055-b03f-c63b8a7de8a2\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2887.60498046875,\n \"y\": 252.38739013671876,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Texture2DNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"c37a16b0-ba93-4a1c-810f-ab39d7f7f612\",\n \"m_Name\": \"Texture 2D\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2475.864013671875,\n \"y\": 449.8893737792969,\n \"width\": 208.0,\n \"height\": 407.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Tex\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Tex\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\n \\\\\\\"texture\\\\\\\": {\\\\n \\\\\\\"fileID\\\\\\\": 2800000,\\\\n \\\\\\\"guid\\\\\\\": \\\\\\\"7296f51323ae9485a9c834c4e3d722ed\\\\\\\",\\\\n \\\\\\\"type\\\\\\\": 3\\\\n }\\\\n}\\\"\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_TextureType\": 0\n}"

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Vector1Node"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d2b81281-8e5a-4118-8186-2ee44c4778eb\",\n \"m_Name\": \"Vector1\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2536.0244140625,\n \"y\": 1566.8602294921875,\n \"width\": 94.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": 0.5\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d2b81281-8e5a-4118-8186-2ee44c4778eb\",\n \"m_Name\": \"Vector1\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2536.0244140625,\n \"y\": 1566.8602294921875,\n \"width\": 94.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": 0.25\n}"
},
{
"typeInfo": {

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"2302da54-9843-4601-b961-3286e538c9dc\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3038.937744140625,\n \"y\": -174.68983459472657,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"2302da54-9843-4601-b961-3286e538c9dc\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3060.9296875,\n \"y\": -170.18785095214845,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.ReciprocalNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"1bf9c734-eec8-4678-84af-527274307b43\",\n \"m_Name\": \"Reciprocal\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1961.708984375,\n \"y\": 1638.5538330078125,\n \"width\": 208.0,\n \"height\": 311.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_ReciprocalMethod\": 0\n}"
},
{
"typeInfo": {

},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.DivideNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"78f42ff7-f712-4062-b644-4e9c6b6aebd2\",\n \"m_Name\": \"Divide\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1961.8671875,\n \"y\": 1320.587158203125,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.SplitNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d5176343-6330-4c20-a7a4-77502b34dd23\",\n \"m_Name\": \"Split\",\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1179.425537109375,\n \"y\": -285.2141418457031,\n \"width\": 146.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Input\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Input\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.PropertyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"bd5c60ce-9c1c-451b-b752-664a7a3f9a7f\",\n \"m_Name\": \"Property\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2227.7138671875,\n \"y\": 979.1190185546875,\n \"width\": 100.0,\n \"height\": 111.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_PropertyGuidSerialized\": \"cd76b423-d24c-43c8-8fe8-6719654b4483\"\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"bd5c60ce-9c1c-451b-b752-664a7a3f9a7f\",\n \"m_Name\": \"Property\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2237.7138671875,\n \"y\": 987.1190185546875,\n \"width\": 91.0,\n \"height\": 111.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_PropertyGuidSerialized\": \"cd76b423-d24c-43c8-8fe8-6719654b4483\"\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"9e517333-68bd-4055-b03f-c63b8a7de8a2\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2887.60498046875,\n \"y\": 252.38739013671876,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.RemapNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"e2d89727-90ef-44d6-b333-ea69897a4357\",\n \"m_Name\": \"Remap\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2699.42724609375,\n \"y\": 1794.71875,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"InMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"InMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": -1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"OutMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"e2d89727-90ef-44d6-b333-ea69897a4357\",\n \"m_Name\": \"Remap\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2699.42724609375,\n \"y\": 1794.71875,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"InMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"InMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": -1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"OutMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.20999999344348908,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.TimeNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"af97c503-5103-4bdd-a737-1e8b36d4174b\",\n \"m_Name\": \"Time\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2425.60693359375,\n \"y\": 1770.3524169921875,\n \"width\": 131.0,\n \"height\": 174.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Time\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"SinTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SinTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"CosTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CosTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"DeltaTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DeltaTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"SmoothDelta\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SmoothDelta\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"af97c503-5103-4bdd-a737-1e8b36d4174b\",\n \"m_Name\": \"Time\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2472.60693359375,\n \"y\": 1778.3524169921875,\n \"width\": 116.0,\n \"height\": 174.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Time\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"SinTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SinTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"CosTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CosTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"DeltaTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DeltaTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"SmoothDelta\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SmoothDelta\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Vector1Node"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d81607c0-cfed-48d4-9159-6fa65ffeb09c\",\n \"m_Name\": \"Vector1\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2625.90380859375,\n \"y\": -269.6318664550781,\n \"width\": 91.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": 1.0\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d81607c0-cfed-48d4-9159-6fa65ffeb09c\",\n \"m_Name\": \"Vector1\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2625.90380859375,\n \"y\": -269.6318664550781,\n \"width\": 91.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": 0.5\n}"
},
{
"typeInfo": {

"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"09b04858-e4af-4244-82f6-b43b8b9f3201\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 3377.7587890625,\n \"y\": 1097.483154296875,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Vector3Node"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d48c9b95-a43a-47dc-9566-e98ecf7b7cdc\",\n \"m_Name\": \"Vector3\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2309.94775390625,\n \"y\": 1463.9046630859375,\n \"width\": 149.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": {\n \"x\": 2.0,\n \"y\": 0.5,\n \"z\": 0.5\n }\n}"
},
{
"typeInfo": {

"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.PropertyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"db88f193-bb55-420d-baf6-9c644ddae245\",\n \"m_Name\": \"Property\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2770.07373046875,\n \"y\": 556.0489501953125,\n \"width\": 95.0,\n \"height\": 111.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_PropertyGuidSerialized\": \"cd76b423-d24c-43c8-8fe8-6719654b4483\"\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"db88f193-bb55-420d-baf6-9c644ddae245\",\n \"m_Name\": \"Property\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2775.07373046875,\n \"y\": 588.0489501953125,\n \"width\": 91.0,\n \"height\": 111.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_PropertyGuidSerialized\": \"cd76b423-d24c-43c8-8fe8-6719654b4483\"\n}"
"fullName": "UnityEditor.ShaderGraph.NormalizeNode"
"fullName": "UnityEditor.ShaderGraph.PowerNode"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"dd5b052d-ea79-4079-afd5-fadffc93c548\",\n \"m_Name\": \"Normalize\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2494.529296875,\n \"y\": 1463.8306884765625,\n \"width\": 139.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": false\n}"
"JSONnodeData": "{\n \"m_GuidSerialized\": \"c5444b75-ded8-41d1-9dce-15e0b41b3d1e\",\n \"m_Name\": \"Power\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1648.730224609375,\n \"y\": 1329.5562744140625,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.200000047683716,\\n \\\"y\\\": 2.200000047683716,\\n \\\"z\\\": 2.200000047683716,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {

"fullName": "UnityEditor.ShaderGraph.NormalCreateNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"305e6be3-3e66-4792-ac6c-d7df894da0b3\",\n \"m_Name\": \"Normal Create\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2954.62744140625,\n \"y\": 580.0418090820313,\n \"width\": 208.0,\n \"height\": 374.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\n \\\\\\\"texture\\\\\\\": {\\\\n \\\\\\\"instanceID\\\\\\\": 0\\\\n }\\\\n}\\\"\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Offset\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Offset\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Strength\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Strength\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 2.0,\\n \\\"m_DefaultValue\\\": 8.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.TimeNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"ef999cdf-fd56-4cc5-9250-a1f3102d01f6\",\n \"m_Name\": \"Time\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 922.1902465820313,\n \"y\": 1363.5108642578125,\n \"width\": 116.0,\n \"height\": 174.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Time\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"SinTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SinTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"CosTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CosTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"DeltaTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DeltaTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"SmoothDelta\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SmoothDelta\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"dff88a0a-bbc2-43f3-a865-d0f46c21d663\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1119.455322265625,\n \"y\": 1363.1400146484375,\n \"width\": 122.0,\n \"height\": 118.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.10000000149011612,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": false\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.HueNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"909f0b40-1685-421b-b7ee-5cb33c4c3415\",\n \"m_Name\": \"Hue\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1396.809814453125,\n \"y\": 1337.0982666015625,\n \"width\": 208.0,\n \"height\": 335.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Hue\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Hue\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_HueMode\": 1\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Vector1Node"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"23bfe1e1-3179-4d82-9b48-b368076a3657\",\n \"m_Name\": \"Vector 1\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1511.64111328125,\n \"y\": 1681.97705078125,\n \"width\": 89.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": 2.200000047683716\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.PowerNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"6c3f0674-ea3b-489a-81d5-4976d6d29771\",\n \"m_Name\": \"Power\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 2285.818359375,\n \"y\": 1470.0787353515625,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.200000047683716,\\n \\\"y\\\": 2.200000047683716,\\n \\\"z\\\": 2.200000047683716,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Vector3Node"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"41aa5eb4-9d29-435b-bb02-5aa61935690f\",\n \"m_Name\": \"Vector 3\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 1697.30810546875,\n \"y\": 1219.8255615234375,\n \"width\": 168.0,\n \"height\": 115.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Value\": {\n \"x\": 0.2125999927520752,\n \"y\": 0.7152000069618225,\n \"z\": 0.0722000002861023\n }\n}"
}
],
"m_SerializableEdges": [

"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"2302da54-9843-4601-b961-3286e538c9dc\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"85068ec1-6897-4ce3-a992-31c36d021883\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d48c9b95-a43a-47dc-9566-e98ecf7b7cdc\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dd5b052d-ea79-4079-afd5-fadffc93c548\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"dd5b052d-ea79-4079-afd5-fadffc93c548\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3d342ae3-2a22-4ccc-ac48-1a2159f9674c\"\n }\n}"
},
{
"typeInfo": {

"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"305e6be3-3e66-4792-ac6c-d7df894da0b3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"f860ec2e-0a50-4d83-a8b6-2529ee9f845c\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"ef999cdf-fd56-4cc5-9250-a1f3102d01f6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dff88a0a-bbc2-43f3-a865-d0f46c21d663\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"dff88a0a-bbc2-43f3-a865-d0f46c21d663\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"909f0b40-1685-421b-b7ee-5cb33c4c3415\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"909f0b40-1685-421b-b7ee-5cb33c4c3415\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c5444b75-ded8-41d1-9dce-15e0b41b3d1e\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"23bfe1e1-3179-4d82-9b48-b368076a3657\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c5444b75-ded8-41d1-9dce-15e0b41b3d1e\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"6c3f0674-ea3b-489a-81d5-4976d6d29771\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3d342ae3-2a22-4ccc-ac48-1a2159f9674c\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"23bfe1e1-3179-4d82-9b48-b368076a3657\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1bf9c734-eec8-4678-84af-527274307b43\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"1bf9c734-eec8-4678-84af-527274307b43\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"6c3f0674-ea3b-489a-81d5-4976d6d29771\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"2302da54-9843-4601-b961-3286e538c9dc\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"85068ec1-6897-4ce3-a992-31c36d021883\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"41aa5eb4-9d29-435b-bb02-5aa61935690f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"78f42ff7-f712-4062-b644-4e9c6b6aebd2\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"c5444b75-ded8-41d1-9dce-15e0b41b3d1e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"78f42ff7-f712-4062-b644-4e9c6b6aebd2\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"78f42ff7-f712-4062-b644-4e9c6b6aebd2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"6c3f0674-ea3b-489a-81d5-4976d6d29771\"\n }\n}"
}
],
"m_SerializedProperties": [

41
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/AbstractMaterialGraph.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.Graphing.Util;

[NonSerialized]
List<Guid> m_RemovedProperties = new List<Guid>();
[NonSerialized]
public InspectorPreviewData previewData = new InspectorPreviewData();
public Mesh previewMesh
{
get { return previewData.mesh; }
set { previewData.mesh = value; }
}
public IEnumerable<IShaderProperty> properties
{

if (m_Properties.Contains(property))
return;
property.displayName = property.displayName.Trim();
if (m_Properties.Any(p => p.displayName == property.displayName))
{
var regex = new Regex(@"^" + Regex.Escape(property.displayName) + @" \((\d+)\)$");
var existingDuplicateNumbers = m_Properties.Select(p => regex.Match(p.displayName)).Where(m => m.Success).Select(m => int.Parse(m.Groups[1].Value)).Where(n => n > 0).ToList();
var duplicateNumber = 1;
existingDuplicateNumbers.Sort();
if (existingDuplicateNumbers.Any() && existingDuplicateNumbers.First() == 1)
{
duplicateNumber = existingDuplicateNumbers.Last() + 1;
for (var i = 1; i < existingDuplicateNumbers.Count; i++)
{
if (existingDuplicateNumbers[i - 1] != existingDuplicateNumbers[i] - 1)
{
duplicateNumber = existingDuplicateNumbers[i - 1] + 1;
break;
}
}
}
property.displayName = string.Format("{0} ({1})", property.displayName, duplicateNumber);
}
m_Properties.Add(property);
m_AddedProperties.Add(property);

configuredTextures = shaderProperties.GetConfiguredTexutres();
return finalShader.GetShaderString(0);
}
}
public class InspectorPreviewData
{
public Mesh mesh;
public Quaternion rotation = Quaternion.identity;
public float scale = 1f;
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorMaterialSlot.cs


namespace UnityEditor.ShaderGraph
{
public class ColorMaterialSlot : Vector4MaterialSlot
public class ColorRGBAMaterialSlot : Vector4MaterialSlot
public ColorMaterialSlot() {}
public ColorRGBAMaterialSlot() {}
public ColorMaterialSlot(
public ColorRGBAMaterialSlot(
int slotId,
string displayName,
string shaderOutputName,

public override VisualElement InstantiateControl()
{
return new ColorSlotControlView(this);
return new ColorRGBASlotControlView(this);
}
}
}

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/ReplaceColorNode.cs


static string Unity_ReplaceColor(
[Slot(0, Binding.None)] Vector3 In,
[Slot(1, Binding.None)] Color From,
[Slot(2, Binding.None)] Color To,
[Slot(1, Binding.None)] ColorRGB From,
[Slot(2, Binding.None)] ColorRGB To,
[Slot(3, Binding.None)] Vector1 Range,
[Slot(4, Binding.None)] out Vector3 Out)
{

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ColorMaskNode.cs


static string Unity_ColorMask(
[Slot(0, Binding.None)] Vector3 In,
[Slot(1, Binding.None)] Color MaskColor,
[Slot(1, Binding.None)] ColorRGB MaskColor,
[Slot(2, Binding.None)] Vector1 Range,
[Slot(3, Binding.None)] out Vector3 Out)
{

17
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs


protected abstract MethodInfo GetFunctionToConvert();
public class ColorRGBA { };
public class ColorRGB { };
private static SlotValueType ConvertTypeToSlotValueType(ParameterInfo p)
{
Type t = p.ParameterType;

if (t == typeof(Color))
{
return SlotValueType.Vector4;
}
if (t == typeof(ColorRGBA))
{
return SlotValueType.Vector4;
}
if (t == typeof(ColorRGB))
{
return SlotValueType.Vector3;
}
if (t == typeof(Texture2D))
{

MaterialSlot s;
if (attribute.binding == Binding.None && !par.IsOut && par.ParameterType == typeof(Color))
s = new ColorMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
s = new ColorRGBAMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
else if (attribute.binding == Binding.None && !par.IsOut && par.ParameterType == typeof(ColorRGBA))
s = new ColorRGBAMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
else if (attribute.binding == Binding.None && !par.IsOut && par.ParameterType == typeof(ColorRGB))
s = new ColorRGBMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
else if (attribute.binding == Binding.None || par.IsOut)
s = MaterialSlot.CreateMaterialSlot(
ConvertTypeToSlotValueType(par),

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/CameraNode.cs


[Title("Input", "Scene", "Camera")]
public class CameraNode : AbstractMaterialNode
{
private const string kOutputSlotName = "Pos";
private const string kOutputSlot1Name = "Dir";
private const string kOutputSlot2Name = "Near";
private const string kOutputSlot3Name = "Far";
private const string kOutputSlot4Name = "Sign";
const string kOutputSlotName = "Position";
const string kOutputSlot1Name = "Direction";
const string kOutputSlot2Name = "Orthographic";
const string kOutputSlot3Name = "Near Plane";
const string kOutputSlot4Name = "Far Plane";
const string kOutputSlot5Name = "Sign";
const string kOutputSlot6Name = "Width";
const string kOutputSlot7Name = "Height";
public const int OutputSlotId = 0;
public const int OutputSlot1Id = 1;

public const int OutputSlot5Id = 5;
public const int OutputSlot6Id = 6;
public const int OutputSlot7Id = 7;
public CameraNode()
{

AddSlot(new Vector1MaterialSlot(OutputSlot2Id, kOutputSlot2Name, kOutputSlot2Name, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot3Id, kOutputSlot3Name, kOutputSlot3Name, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot4Id, kOutputSlot4Name, kOutputSlot4Name, SlotType.Output, 1));
RemoveSlotsNameNotMatching(validSlots);
}
protected int[] validSlots
{
get { return new[] { OutputSlotId, OutputSlot1Id, OutputSlot2Id, OutputSlot3Id, OutputSlot4Id }; }
AddSlot(new Vector1MaterialSlot(OutputSlot5Id, kOutputSlot5Name, kOutputSlot5Name, SlotType.Output, 1));
AddSlot(new Vector1MaterialSlot(OutputSlot6Id, kOutputSlot6Name, kOutputSlot6Name, SlotType.Output, 1));
AddSlot(new Vector1MaterialSlot(OutputSlot7Id, kOutputSlot7Name, kOutputSlot7Name, SlotType.Output, 1));
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id, OutputSlot2Id, OutputSlot3Id, OutputSlot4Id, OutputSlot5Id, OutputSlot6Id, OutputSlot7Id });
}
public override string GetVariableNameForSlot(int slotId)

case OutputSlot1Id:
return "mul(unity_ObjectToWorld, UNITY_MATRIX_IT_MV [2].xyz)";
return "-1 * mul(unity_ObjectToWorld, UNITY_MATRIX_IT_MV [2].xyz)";
return "unity_OrthoParams.w";
case OutputSlot3Id:
case OutputSlot3Id:
case OutputSlot4Id:
case OutputSlot4Id:
case OutputSlot5Id:
case OutputSlot6Id:
return "unity_OrthoParams.x";
case OutputSlot7Id:
return "unity_OrthoParams.y";
default:
return "_WorldSpaceCameraPos";
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Vector/TransformNode.cs


return conversion.from.ToNeededCoordinateSpace();
}
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Procedural/CheckerboardNode.cs


static string Unity_Checkerboard(
[Slot(0, Binding.MeshUV0)] Vector2 UV,
[Slot(1, Binding.None, 0.2f, 0.2f, 0.2f, 1f)] Color ColorA,
[Slot(2, Binding.None, 0.7f, 0.7f, 0.7f, 1f)] Color ColorB,
[Slot(1, Binding.None, 0.2f, 0.2f, 0.2f, 1f)] ColorRGB ColorA,
[Slot(2, Binding.None, 0.7f, 0.7f, 0.7f, 1f)] ColorRGB ColorB,
[Slot(4, Binding.None)] out Vector4 Out)
[Slot(4, Binding.None)] out Vector3 Out)
{
Out = Vector2.zero;
return

{precision}2 blend_out = saturate(scale / 3);
{precision}2 vector_alpha = clamp(distance3 * scale.xy * blend_out.xy, -1.0, 1.0);
{precision} alpha = saturate(vector_alpha.x * vector_alpha.y);
Out = lerp(ColorA, ColorB, alpha.xxxx);
Out = lerp(ColorA, ColorB, alpha.xxx);
}";
}
}

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/SubGraphNode.cs


}
#if UNITY_EDITOR
[ObjectControl("")]
public MaterialSubGraphAsset subGraphAsset
{
get

73
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/GraphInspectorView.cs


namespace UnityEditor.ShaderGraph.Drawing.Inspector
{
[Serializable]
class PersistentMesh
{
[SerializeField]
Mesh m_Mesh;
public Mesh mesh
{
get { return m_Mesh; }
set { m_Mesh = value; }
}
}
public class GraphInspectorView : VisualElement, IDisposable
{
int m_SelectionHash;

List<INode> m_SelectedNodes;
PersistentMesh m_PersistentMasterNodePreviewMesh;
Vector2 m_PreviewScrollPosition;
public Action onUpdateAssetClick { get; set; }
public Action onShowInProjectClick { get; set; }

persistenceKey = "GraphInspector";
m_Graph = graph;
m_SelectedNodes = new List<INode>();

}
bottomContainer.Add(propertiesContainer);
m_PreviewTextureView = new PreviewTextureView {name = "preview", image = Texture2D.blackTexture};
m_PreviewTextureView = new PreviewTextureView { name = "preview", image = Texture2D.blackTexture };
m_PreviewTextureView.AddManipulator(new Draggable(OnMouseDrag, true));
m_PreviewTextureView.AddManipulator(new Scrollable(OnMouseScroll));
m_PreviewScrollPosition = new Vector2(0f, 0f);
m_PreviewMeshPicker = new ObjectField() { objectType = typeof(Mesh) };
m_PreviewMeshPicker.OnValueChanged(OnPreviewMeshChanged);

m_PreviewRenderHandle = previewManager.masterRenderData;
m_PreviewRenderHandle.onPreviewChanged += OnPreviewChanged;
m_PreviewMeshPicker.SetValueAndNotify(m_Graph.previewMesh);
// Nodes missing custom editors:
// - PropertyNode
// - SubGraphInputNode

get { return m_PreviewRenderHandle.shaderData.node as MasterNode; }
}
void OnMouseDrag(Vector2 deltaMouse)
{
Vector2 previewSize = m_PreviewTextureView.contentRect.size;
m_PreviewScrollPosition -= deltaMouse * (Event.current.shift ? 3f : 1f) / Mathf.Min(previewSize.x, previewSize.y) * 140f;
m_PreviewScrollPosition.y = Mathf.Clamp(m_PreviewScrollPosition.y, -90f, 90f);
Quaternion previewRotation = Quaternion.Euler(m_PreviewScrollPosition.y, 0, 0) * Quaternion.Euler(0, m_PreviewScrollPosition.x, 0);
m_Graph.previewData.rotation = previewRotation;
}
void OnMouseScroll(float scrollDelta)
{
m_Graph.previewData.scale -= scrollDelta * .01f;
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale, .1f, 4f);
}
void OnAddProperty()
{
var gm = new GenericMenu();

void OnPreviewMeshChanged(ChangeEvent<UnityEngine.Object> changeEvent)
{
if (changeEvent.newValue == null)
{
m_PreviewRenderHandle.mesh = null;
m_PersistentMasterNodePreviewMesh.mesh = null;
}
if (changedMesh)
{
m_PreviewRenderHandle.mesh = changedMesh;
m_PersistentMasterNodePreviewMesh.mesh = changedMesh;
}
SavePersistentData();
}
public override void OnPersistentDataReady()
{
base.OnPersistentDataReady();
string key = GetFullHierarchicalPersistenceKey();
if (m_Graph.previewMesh != changedMesh)
{
m_Graph.previewData.rotation = Quaternion.identity;
m_Graph.previewData.scale = 1f;
}
m_PersistentMasterNodePreviewMesh = GetOrCreatePersistentData<PersistentMesh>(m_PersistentMasterNodePreviewMesh, key);
m_PreviewMeshPicker.SetValueAndNotify(m_PersistentMasterNodePreviewMesh.mesh);
m_Graph.previewMesh = changedMesh;
}
public void UpdateSelection(IEnumerable<INode> nodes)

14
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Draggable.cs


bool m_Active;
public Draggable(Action<Vector2> handler)
bool m_OutputDeltaMovement;
public Draggable(Action<Vector2> handler, bool outputDeltaMovement = false)
m_OutputDeltaMovement = outputDeltaMovement;
activators.Add(new ManipulatorActivationFilter()
{
button = MouseButton.LeftMouse

{
if (m_Active)
{
m_Handler(evt.localMousePosition);
if (m_OutputDeltaMovement)
{
m_Handler(evt.mouseDelta);
}
else
{
m_Handler(evt.localMousePosition);
}
}
}

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs


if (prop != null)
{
var materialGraph = (AbstractMaterialGraph)graphObject.graph;
var fromPropertyNode = fromNode as PropertyNode;
var fromProperty = fromPropertyNode != null ? materialGraph.properties.FirstOrDefault(p => p.guid == fromPropertyNode.propertyGuid) : null;
prop.displayName = fromProperty != null ? fromProperty.displayName : fromNode.name;
subGraph.AddShaderProperty(prop);
var propNode = new PropertyNode();
{

15
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs


if (masterRenderData.shaderData != null && m_DirtyPreviews.Contains(masterRenderData.shaderData.node.guid))
m_RenderList3D.Add(masterRenderData);
m_RenderList3D.Sort((data1, data2) => data1.shaderData.shader.GetInstanceID().CompareTo(data2.shaderData.shader.GetInstanceID()));
m_RenderList2D.Sort((data1, data2) => data1.shaderData.shader.GetInstanceID().CompareTo(data2.shaderData.shader.GetInstanceID()));
m_SceneResources.light0.enabled = true;
m_SceneResources.light0.intensity = 1.0f;
m_SceneResources.light0.transform.rotation = Quaternion.Euler(50f, 50f, 0);

m_SceneResources.camera.transform.rotation = Quaternion.identity;
m_SceneResources.camera.orthographicSize = 1;
m_SceneResources.camera.orthographic = true;
m_RenderList2D.Sort((data1, data2) => data1.shaderData.shader.GetInstanceID().CompareTo(data2.shaderData.shader.GetInstanceID()));
foreach (var renderData in m_RenderList2D)
{
int outputId;

m_SceneResources.camera.transform.position = -Vector3.forward * 5;
m_SceneResources.camera.transform.rotation = Quaternion.identity;
m_SceneResources.camera.orthographic = false;
m_RenderList3D.Sort((data1, data2) => data1.shaderData.shader.GetInstanceID().CompareTo(data2.shaderData.shader.GetInstanceID()));
foreach (var renderData in m_RenderList3D)
{
int outputId;

RenderTexture.active = renderData.renderTexture;
GL.Clear(true, true, Color.black);
Graphics.Blit(Texture2D.whiteTexture, renderData.renderTexture, m_SceneResources.checkerboardMaterial);
var mesh = renderData.mesh ?? m_SceneResources.sphere;
Graphics.DrawMesh(mesh, Matrix4x4.TRS(-mesh.bounds.center, Quaternion.identity, Vector3.one), m_PreviewMaterial, 1, m_SceneResources.camera, 0, m_PreviewPropertyBlock, ShadowCastingMode.Off, false, null, false);
var mesh = (renderData == masterRenderData && m_Graph.previewMesh) ? m_Graph.previewMesh : m_SceneResources.sphere;
Quaternion rotation = (renderData == masterRenderData) ? m_Graph.previewData.rotation : Quaternion.identity;
float scale = (renderData == masterRenderData) ? m_Graph.previewData.scale : 1f;
Graphics.DrawMesh(mesh, Matrix4x4.TRS(-mesh.bounds.center, rotation, Vector3.one * scale), m_PreviewMaterial, 1, m_SceneResources.camera, 0, m_PreviewPropertyBlock, ShadowCastingMode.Off, false, null, false);
var previousUseSRP = Unsupported.useScriptableRenderPipeline;
Unsupported.useScriptableRenderPipeline = renderData.shaderData.node is IMasterNode;
m_SceneResources.camera.Render();

public class PreviewRenderData
{
public PreviewShaderData shaderData { get; set; }
public Mesh mesh { get; set; }
public RenderTexture renderTexture { get; set; }
public Texture texture { get; set; }
public OnPreviewChanged onPreviewChanged;

215
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/SearchWindowProvider.cs


AbstractMaterialGraph m_Graph;
GraphView m_GraphView;
Texture2D m_Icon;
const string k_Actions = "Actions";
const string k_AddNode = "Add Node";
const string k_ConvertToProperty = "Convert To Property";
const string k_ConvertToInlineNode = "Convert To Inline Node";
const string k_ConvertToSubgraph = "Convert To Sub-graph";
const string k_CopyShader = "Copy Shader To Clipboard";
public Action onConvertToSubgraphClick { get; set; }
public Port connectedPort { get; set; }
public bool nodeNeedsRepositioning { get; set; }
public SlotReference targetSlotReference { get; private set; }
public Vector2 targetPosition { get; private set; }
public void Initialize(EditorWindow editorWindow, AbstractMaterialGraph graph, GraphView graphView)
{

}
}
struct NestedEntry
struct NodeEntry
public object userData;
public AbstractMaterialNode node;
public int compatibleSlotId;
List<ISlot> m_Slots = new List<ISlot>();
var nestedEntries = new List<NestedEntry>();
var nodeEntries = new List<NodeEntry>();
foreach (var type in Assembly.GetAssembly(typeof(AbstractMaterialNode)).GetTypes())
{
if (type.IsClass && !type.IsAbstract && (type.IsSubclassOf(typeof(AbstractMaterialNode))))

nestedEntries.Add(new NestedEntry { title = attrs[0].title, userData = type });
{
var node = (AbstractMaterialNode) Activator.CreateInstance(type);
var compatibleSlotId = -1;
if (connectedPort != null)
{
compatibleSlotId = GetFirstCompatibleSlotId(node);
if (compatibleSlotId == -1)
continue;
}
nodeEntries.Add(new NodeEntry { title = attrs[0].title, node = node, compatibleSlotId = compatibleSlotId});
}
}
}

nestedEntries.Add(new NestedEntry
var node = Activator.CreateInstance<SubGraphNode>();
node.subGraphAsset = asset;
var compatibleSlotId = -1;
if (connectedPort != null)
{
compatibleSlotId = GetFirstCompatibleSlotId(node);
if (compatibleSlotId == -1)
continue;
}
nodeEntries.Add(new NodeEntry
userData = asset
node = node,
compatibleSlotId = compatibleSlotId
});
}

// - Art/Adjustments/ColorBalance
// - Art/Adjustments/Contrast
nestedEntries.Sort((entry1, entry2) =>
nodeEntries.Sort((entry1, entry2) =>
{
for (var i = 0; i < entry1.title.Length; i++)
{

// First item in the tree is the title of the window.
var tree = new List<SearchTreeEntry>
{
new SearchTreeGroupEntry(new GUIContent(k_Actions), 0),
new SearchTreeGroupEntry(new GUIContent(k_AddNode)) { level = 1 },
new SearchTreeGroupEntry(new GUIContent("Create Node"), 0),
// Add in contextual node actions
var selection = m_GraphView.selection.OfType<MaterialNodeView>().Where(v => v.node != null).ToList();
if (selection.Any())
tree.Add(new SearchTreeEntry(new GUIContent(k_ConvertToSubgraph, m_Icon)) { level = 1 });
if (selection.Any(v => v.node is IPropertyFromNode))
tree.Add(new SearchTreeEntry(new GUIContent(k_ConvertToProperty, m_Icon)) { level = 1 });
if (selection.Any(v => v.node is PropertyNode))
tree.Add(new SearchTreeEntry(new GUIContent(k_ConvertToInlineNode, m_Icon)) { level = 1 });
if (selection.Count == 1 && selection.First().node.hasPreview)
tree.Add(new SearchTreeEntry(new GUIContent(k_CopyShader, m_Icon)) { level = 1 });
foreach (var nestedEntry in nestedEntries)
foreach (var nodeEntry in nodeEntries)
for (var i = 0; i < nestedEntry.title.Length - 1; i++)
for (var i = 0; i < nodeEntry.title.Length - 1; i++)
var group = nestedEntry.title[i];
var group = nodeEntry.title[i];
if (i >= groups.Count)
{
// The current group path matches a prefix of the current entry's group path, so we add the

// Create new group entries as needed.
// If we don't need to modify the group path, `createIndex` will be `int.MaxValue` and thus the loop won't run.
for (var i = createIndex; i < nestedEntry.title.Length - 1; i++)
for (var i = createIndex; i < nodeEntry.title.Length - 1; i++)
var group = nestedEntry.title[i];
var group = nodeEntry.title[i];
tree.Add(new SearchTreeGroupEntry(new GUIContent(group)) { level = i + 2 });
tree.Add(new SearchTreeGroupEntry(new GUIContent(group)) { level = i + 1 });
tree.Add(new SearchTreeEntry(new GUIContent(nestedEntry.title.Last(), m_Icon)) { level = nestedEntry.title.Length + 1, userData = nestedEntry.userData });
tree.Add(new SearchTreeEntry(new GUIContent(nodeEntry.title.Last(), m_Icon)) { level = nodeEntry.title.Length, userData = nodeEntry });
public bool OnSelectEntry(SearchTreeEntry entry, SearchWindowContext context)
{
if (entry.name == k_ConvertToProperty)
return OnConvertToProperty();
if (entry.name == k_ConvertToInlineNode)
return OnConvertToInlineNode();
if (entry.name == k_ConvertToSubgraph)
return OnConvertToSubgraph();
if (entry.name == k_CopyShader)
return OnCopyShader();
return OnAddNode(entry, context);
}
bool OnCopyShader()
int GetFirstCompatibleSlotId(AbstractMaterialNode node)
var copyFromNode = m_GraphView.selection.OfType<MaterialNodeView>().First().node;
List<PropertyCollector.TextureInfo> textureInfo;
var masterNode = copyFromNode as MasterNode;
if (masterNode != null)
var connectedSlot = (MaterialSlot)connectedPort.userData;
m_Slots.Clear();
node.GetSlots(m_Slots);
foreach (var slot in m_Slots)
var shader = masterNode.GetShader(GenerationMode.ForReals, masterNode.name, out textureInfo);
GUIUtility.systemCopyBuffer = shader;
var materialSlot = (MaterialSlot)slot;
if (materialSlot.IsCompatibleWith(connectedSlot))
{
return materialSlot.id;
}
else
{
PreviewMode previewMode;
FloatShaderProperty outputIdProperty;
var shader = m_Graph.GetShader(copyFromNode, GenerationMode.ForReals, copyFromNode.name, out textureInfo, out previewMode, out outputIdProperty);
GUIUtility.systemCopyBuffer = shader;
}
return true;
return -1;
bool OnConvertToSubgraph()
public bool OnSelectEntry(SearchTreeEntry entry, SearchWindowContext context)
if (onConvertToSubgraphClick != null) onConvertToSubgraphClick();
return true;
}
var nodeEntry = (NodeEntry)entry.userData;
var node = nodeEntry.node;
static List<IEdge> s_TempEdges = new List<IEdge>();
var drawState = node.drawState;
var windowMousePosition = m_EditorWindow.GetRootVisualContainer().ChangeCoordinatesTo(m_EditorWindow.GetRootVisualContainer().parent, context.screenMousePosition - m_EditorWindow.position.position);
var graphMousePosition = m_GraphView.contentViewContainer.WorldToLocal(windowMousePosition);
drawState.position = new Rect(graphMousePosition, Vector2.zero);
node.drawState = drawState;
bool OnConvertToProperty()
{
if (m_GraphView == null)
return false;
m_Graph.owner.RegisterCompleteObjectUndo("Add " + node.name);
m_Graph.AddNode(node);
var selectedNodeViews = m_GraphView.selection.OfType<MaterialNodeView>().Select(x => x.node).ToList();
foreach (var node in selectedNodeViews)
if (connectedPort != null)
if (!(node is IPropertyFromNode))
continue;
var connectedSlot = (MaterialSlot)connectedPort.userData;
var connectedSlotReference = connectedSlot.owner.GetSlotReference(connectedSlot.id);
var compatibleSlotReference = node.GetSlotReference(nodeEntry.compatibleSlotId);
var converter = node as IPropertyFromNode;
var prop = converter.AsShaderProperty();
m_Graph.AddShaderProperty(prop);
var fromReference = connectedSlot.isOutputSlot ? connectedSlotReference : compatibleSlotReference;
var toReference = connectedSlot.isOutputSlot ? compatibleSlotReference : connectedSlotReference;
m_Graph.Connect(fromReference, toReference);
var propNode = new PropertyNode();
propNode.drawState = node.drawState;
m_Graph.AddNode(propNode);
propNode.propertyGuid = prop.guid;
var oldSlot = node.FindSlot<MaterialSlot>(converter.outputSlotId);
var newSlot = propNode.FindSlot<MaterialSlot>(PropertyNode.OutputSlotId);
s_TempEdges.Clear();
m_Graph.GetEdges(oldSlot.slotReference, s_TempEdges);
foreach (var edge in s_TempEdges)
m_Graph.Connect(newSlot.slotReference, edge.inputSlot);
m_Graph.RemoveNode(node);
nodeNeedsRepositioning = true;
targetSlotReference = compatibleSlotReference;
targetPosition = graphMousePosition;
return true;
}
bool OnConvertToInlineNode()
{
if (m_GraphView == null)
return false;
var selectedNodeViews = m_GraphView.selection.OfType<MaterialNodeView>()
.Select(x => x.node)
.OfType<PropertyNode>();
foreach (var propNode in selectedNodeViews)
((AbstractMaterialGraph)propNode.owner).ReplacePropertyNodeWithConcreteNode(propNode);
return true;
}
bool OnAddNode(SearchTreeEntry entry, SearchWindowContext context)
{
Type type;
var asset = entry.userData as MaterialSubGraphAsset;
if (asset != null)
type = typeof(SubGraphNode);
else
type = (Type)entry.userData;
var node = Activator.CreateInstance(type) as INode;
if (node == null)
return false;
var drawState = node.drawState;
var windowMousePosition = context.screenMousePosition - m_EditorWindow.position.position;
var graphMousePosition = m_EditorWindow.GetRootVisualContainer().ChangeCoordinatesTo(m_GraphView.contentViewContainer, windowMousePosition);
drawState.position = new Rect(graphMousePosition, Vector2.zero);
node.drawState = drawState;
if (asset != null)
{
var subgraphNode = (SubGraphNode)node;
subgraphNode.subGraphAsset = asset;
}
m_Graph.owner.RegisterCompleteObjectUndo("Add " + node.name);
m_Graph.AddNode(node);
return true;
}

90
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs


AbstractMaterialGraph m_Graph;
PreviewManager m_PreviewManager;
SearchWindowProvider m_SearchWindowProvider;
EdgeConnectorListener m_EdgeConnectorListener;
public Action onUpdateAssetClick
{

public Action onConvertToSubgraphClick
{
get { return m_SearchWindowProvider.onConvertToSubgraphClick; }
set { m_SearchWindowProvider.onConvertToSubgraphClick = value; }
get { return m_GraphView.onConvertToSubgraphClick; }
set { m_GraphView.onConvertToSubgraphClick = value; }
}
public Action onShowInProjectClick

public GraphEditorView(EditorWindow editorWindow, AbstractMaterialGraph graph, string assetName)
{
m_Graph = graph;
m_SearchWindowProvider = ScriptableObject.CreateInstance<SearchWindowProvider>();
AddStyleSheetPath("Styles/MaterialGraph");
previewManager = new PreviewManager(graph);

m_GraphView = new MaterialGraphView(graph) { name = "GraphView", persistenceKey = "MaterialGraphView" };
m_GraphView.SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale);
m_GraphView.AddManipulator(new ContentDragger());
m_GraphView.AddManipulator(new RectangleSelector());
m_GraphView.AddManipulator(new RectangleSelector());
m_GraphView.AddManipulator(new ClickSelector());
m_GraphView.AddManipulator(new GraphDropTarget(graph));
content.Add(m_GraphView);

m_GraphView.graphViewChanged = GraphViewChanged;
}
m_SearchWindowProvider = ScriptableObject.CreateInstance<SearchWindowProvider>();
m_GraphView.nodeCreationRequest = (c) => SearchWindow.Open(new SearchWindowContext(c.screenMousePosition), m_SearchWindowProvider);
//m_GraphView.AddManipulator(new NodeCreator(m_SearchWindowProvider));
m_GraphView.nodeCreationRequest = (c) =>
{
m_SearchWindowProvider.connectedPort = null;
SearchWindow.Open(new SearchWindowContext(c.screenMousePosition), m_SearchWindowProvider);
};
m_EdgeConnectorListener = new EdgeConnectorListener(m_Graph, m_SearchWindowProvider);
foreach (var node in graph.GetNodes<INode>())
AddNode(node);

continue;
var drawState = node.drawState;
drawState.position = element.layout;
drawState.position = element.GetPosition();
var nodesToUpdate = m_NodeViewHashSet;
nodesToUpdate.Clear();
if (graphViewChange.elementsToRemove != null)
{
m_Graph.owner.RegisterCompleteObjectUndo("Remove Elements");
m_Graph.RemoveElements(graphViewChange.elementsToRemove.OfType<MaterialNodeView>().Select(v => (INode) v.node),
graphViewChange.elementsToRemove.OfType<Edge>().Select(e => (IEdge) e.userData));
foreach (var edge in graphViewChange.elementsToRemove.OfType<Edge>())
{
if (edge.input != null)
{
var materialNodeView = edge.input.node as MaterialNodeView;
if (materialNodeView != null)
nodesToUpdate.Add(materialNodeView);
}
if (edge.output != null)
{
var materialNodeView = edge.output.node as MaterialNodeView;
if (materialNodeView != null)
nodesToUpdate.Add(materialNodeView);
}
}
}
foreach (var node in nodesToUpdate)
node.UpdatePortInputVisibilities();
UpdateEdgeColors(nodesToUpdate);
return graphViewChange;
}

{
var nodeView = new MaterialNodeView { userData = node };
m_GraphView.AddElement(nodeView);
nodeView.Initialize(node as AbstractMaterialNode, m_PreviewManager);
nodeView.Initialize(node as AbstractMaterialNode, m_PreviewManager, m_EdgeConnectorListener);
nodeView.Dirty(ChangeType.Repaint);
if (m_SearchWindowProvider.nodeNeedsRepositioning && m_SearchWindowProvider.targetSlotReference.nodeGuid.Equals(node.guid))
{
m_SearchWindowProvider.nodeNeedsRepositioning = false;
foreach (var element in nodeView.inputContainer.Union(nodeView.outputContainer))
{
var port = element as ShaderPort;
if (port == null)
continue;
var slot = (MaterialSlot)port.userData;
if (slot.slotReference.Equals(m_SearchWindowProvider.targetSlotReference))
{
port.RegisterCallback<PostLayoutEvent>(RepositionNode);
return;
}
}
}
}
static void RepositionNode(PostLayoutEvent evt)
{
var port = evt.target as ShaderPort;
if (port == null)
return;
port.UnregisterCallback<PostLayoutEvent>(RepositionNode);
var nodeView = port.node as MaterialNodeView;
if (nodeView == null)
return;
var offset = nodeView.mainContainer.WorldToLocal(port.GetGlobalCenter() + new Vector3(3f, 3f, 0f));
var position = nodeView.GetPosition();
position.position -= offset;
nodeView.SetPosition(position);
var drawState = nodeView.node.drawState;
drawState.position = position;
nodeView.node.drawState = drawState;
nodeView.Dirty(ChangeType.Repaint);
port.Dirty(ChangeType.Repaint);
}
Edge AddEdge(IEdge edge)

79
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs


public sealed class MaterialGraphView : GraphView
{
public AbstractMaterialGraph graph { get; private set; }
public Action onConvertToSubgraphClick { get; set; }
public override List<Port> GetCompatiblePorts(Port startAnchor, NodeAdapter nodeAdapter)
{

compatibleAnchors.Add(candidateAnchor);
}
return compatibleAnchors;
}
public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
base.BuildContextualMenu(evt);
evt.menu.AppendAction("Convert To Sub-graph", ConvertToSubgraph, ConvertToSubgraphStatus);
evt.menu.AppendAction("Convert To Inline Node", ConvertToInlineNode, ConvertToInlineNodeStatus);
evt.menu.AppendAction("Convert To Property", ConvertToProperty, ConvertToPropertyStatus);
}
ContextualMenu.MenuAction.StatusFlags ConvertToPropertyStatus(EventBase eventBase)
{
if (selection.OfType<MaterialNodeView>().Any(v => v.node != null))
{
if (selection.OfType<MaterialNodeView>().Any(v => v.node is IPropertyFromNode))
return ContextualMenu.MenuAction.StatusFlags.Normal;
return ContextualMenu.MenuAction.StatusFlags.Disabled;
}
return ContextualMenu.MenuAction.StatusFlags.Hidden;
}
void ConvertToProperty(EventBase eventBase)
{
var selectedNodeViews = selection.OfType<MaterialNodeView>().Select(x => x.node).ToList();
foreach (var node in selectedNodeViews)
{
if (!(node is IPropertyFromNode))
continue;
var converter = node as IPropertyFromNode;
var prop = converter.AsShaderProperty();
graph.AddShaderProperty(prop);
var propNode = new PropertyNode();
propNode.drawState = node.drawState;
graph.AddNode(propNode);
propNode.propertyGuid = prop.guid;
var oldSlot = node.FindSlot<MaterialSlot>(converter.outputSlotId);
var newSlot = propNode.FindSlot<MaterialSlot>(PropertyNode.OutputSlotId);
foreach (var edge in graph.GetEdges(oldSlot.slotReference))
graph.Connect(newSlot.slotReference, edge.inputSlot);
graph.RemoveNode(node);
}
}
ContextualMenu.MenuAction.StatusFlags ConvertToInlineNodeStatus(EventBase eventBase)
{
if (selection.OfType<MaterialNodeView>().Any(v => v.node != null))
{
if (selection.OfType<MaterialNodeView>().Any(v => v.node is PropertyNode))
return ContextualMenu.MenuAction.StatusFlags.Normal;
return ContextualMenu.MenuAction.StatusFlags.Disabled;
}
return ContextualMenu.MenuAction.StatusFlags.Hidden;
}
void ConvertToInlineNode(EventBase eventBase)
{
var selectedNodeViews = selection.OfType<MaterialNodeView>()
.Select(x => x.node)
.OfType<PropertyNode>();
foreach (var propNode in selectedNodeViews)
((AbstractMaterialGraph)propNode.owner).ReplacePropertyNodeWithConcreteNode(propNode);
}
ContextualMenu.MenuAction.StatusFlags ConvertToSubgraphStatus(EventBase eventBase)
{
if (onConvertToSubgraphClick == null) return ContextualMenu.MenuAction.StatusFlags.Hidden;
return selection.OfType<MaterialNodeView>().Any(v => v.node != null) ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Hidden;
}
void ConvertToSubgraph(EventBase eventBase)
{
onConvertToSubgraphClick();
}
public delegate void OnSelectionChanged(IEnumerable<INode> nodes);

58
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


using UnityEngine.Experimental.UIElements;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
using Node = UnityEditor.Experimental.UIElements.GraphView.Node;
namespace UnityEditor.ShaderGraph.Drawing
{

VisualElement m_PreviewContainer;
List<Attacher> m_Attachers;
VisualElement m_ControlsDivider;
IEdgeConnectorListener m_ConnectorListener;
public void Initialize(AbstractMaterialNode inNode, PreviewManager previewManager)
public void Initialize(AbstractMaterialNode inNode, PreviewManager previewManager, IEdgeConnectorListener connectorListener)
{
AddToClassList("MaterialNode");

m_ConnectorListener = connectorListener;
node = inNode;
persistenceKey = node.guid.ToString();
UpdateTitle();

AddSlots(node.GetSlots<MaterialSlot>());
expanded = node.drawState.expanded;
RefreshExpandedState(); //This should not be needed. GraphView needs to improve the extension api here
UpdateSlotAttachers();
UpdatePortInputVisibilities();
SetPosition(new Rect(node.drawState.position.x, node.drawState.position.y, 0, 0));

}
}
public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
if (evt.target is Node)
evt.menu.AppendAction("Copy shader", ConvertToShader, ConvertToShaderStatus);
base.BuildContextualMenu(evt);
}
ContextualMenu.MenuAction.StatusFlags ConvertToShaderStatus(EventBase eventBase)
{
return node.hasPreview ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Hidden;
}
void ConvertToShader(EventBase eventBase)
{
List<PropertyCollector.TextureInfo> textureInfo;
var masterNode = node as MasterNode;
if (masterNode != null)
{
var shader = masterNode.GetShader(GenerationMode.ForReals, masterNode.name, out textureInfo);
GUIUtility.systemCopyBuffer = shader;
}
else
{
PreviewMode previewMode;
FloatShaderProperty outputIdProperty;
var graph = (AbstractMaterialGraph)node.owner;
var shader = graph.GetShader(node, GenerationMode.ForReals, node.name, out textureInfo, out previewMode, out outputIdProperty);
GUIUtility.systemCopyBuffer = shader;
}
}
void UpdatePreviewExpandedState(bool expanded)
{
node.previewExpanded = expanded;

UpdateTitle();
if (node.hasPreview)
UpdatePreviewExpandedState(node.previewExpanded);
expanded = node.drawState.expanded;
base.expanded = node.drawState.expanded;
// Update slots to match node modification
if (scope == ModificationScope.Topological)
{

outputContainer.Sort((x, y) => slots.IndexOf(x.userData as MaterialSlot) - slots.IndexOf(y.userData as MaterialSlot));
}
UpdateControls();
RefreshExpandedState(); //This should not be needed. GraphView needs to improve the extension api here
UpdateSlotAttachers();
UpdatePortInputVisibilities();
foreach (var control in m_ControlViews)

if (slot.hidden)
continue;
var port = InstantiatePort(Orientation.Horizontal, slot.isInputSlot ? Direction.Input : Direction.Output, null);
var port = ShaderPort.Create(Orientation.Horizontal, slot.isInputSlot ? Direction.Input : Direction.Output, null, m_ConnectorListener);
{
}
{
var portInputView = new PortInputView(slot);
}
}
void UpdateSlotAttachers()
{
foreach (var port in inputContainer.OfType<Port>())
{
if (!m_Attachers.Any(a => a.target == port))
{
var portInputView = new PortInputView((MaterialSlot)port.userData);
Add(portInputView);
mainContainer.BringToFront();
m_Attachers.Add(new Attacher(portInputView, port, SpriteAlignment.LeftCenter) { distance = -8f });

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorSlotControlView.cs


namespace UnityEditor.ShaderGraph.Drawing.Slots
{
public class ColorSlotControlView : VisualElement
public class ColorRGBASlotControlView : VisualElement
ColorMaterialSlot m_Slot;
ColorRGBAMaterialSlot m_Slot;
public ColorSlotControlView(ColorMaterialSlot slot)
public ColorRGBASlotControlView(ColorRGBAMaterialSlot slot)
{
m_Slot = slot;
var colorField = new ColorField { value = slot.value };

212
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss


background-color: rgb(20, 21, 21);
}
MaterialNodeView.graphElement.node.MaterialNode {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
}
MaterialNodeView #previewContainer,
MaterialNodeView #controls {
background-color: rgba(63, 63, 63, 0.8);

width: 40;
}
ColorSlotControlView {
ColorRGBASlotControlView {
flex-direction: row;
align-items: center;
}
ColorRGBASlotControlView > ColorField {
width: 50;
}
ColorRGBSlotControlView {
ColorSlotControlView > ColorField {
ColorRGBSlotControlView > ColorField {
width: 50;
}

padding-bottom: 0;
}
/* TEMP STUFF THAT SHOULD ACTUALLY STAY IN GRAPHVIEW */
FloatField {
min-height: 15;
margin-left: 4;

FloatField:focus {
background-image: resource("Builtin Skins/DarkSkin/Images/TextField focused.png");
}
ShaderPort {
height: 24;
align-items: center;
padding-left: 4;
padding-right: 4;
port-color: rgb(200, 200, 200);
disabled-port-color: rgb(70, 70, 70);
}
ShaderPort.input {
flex-direction: row;
}
ShaderPort.output {
flex-direction: row-reverse;
}
ShaderPort > #connector {
border-color: rgb(70, 70, 70);
background-color: #212121;
width: 8;
height: 8;
border-radius: 8;
align-items: center;
justify-content: center;
margin-left: 4;
margin-right: 4;
border-left-width:1;
border-top-width:1;
border-right-width:1;
border-bottom-width:1;
}
ShaderPort > #connector:hover {
border-color: #f0f0f0
}
ShaderPort > #connector > #cap
{
background-color: #212121;
width: 4;
height: 4;
border-radius: 4;
}
ShaderPort > #connector > #cap:hover
{
background-color: #f0f0f0;
}
ShaderPort > #connector.portHighlight {
border-color: #f0f0f0;
}
ShaderPort > #type {
text-color: #c1c1c1;
font-size:11;
height:16;
padding-left: 0;
padding-right: 0;
margin-left: 4;
margin-right: 4;
}
ShaderPort.input > #type {
text-alignment: middle-left;
}
ShaderPort.output > #type {
text-alignment:middle-right;
}
/*******************************/
/* ShaderPorts colors by types */
/*******************************/
ShaderPort.typeTexture {
port-color:#FF8B8B;
}
ShaderPort.typeTexture2D {
/* Same as typeTexture */
port-color:#FF8B8B;
}
ShaderPort.typeGraphScript {
/* Todo: there is no such type in Unity atm */
port-color:#E681BA;
}
ShaderPort.typeFloat4 {
port-color:#FBCBF4;
}
ShaderPort.typeVector4 {
/* Same as typeFloat4 */
port-color:#FBCBF4;
}
ShaderPort.typeQuaternion {
/* Same as typeFloat4 */
port-color:#FBCBF4;
}
ShaderPort.typeColor {
/* Same as typeFloat4 */
port-color:#FBCBF4;
}
ShaderPort.typeInt {
port-color:#9481E6;
}
ShaderPort.typeInt32 {
/* Same as typeInt */
port-color:#9481E6;
}
ShaderPort.typeInt64 {
/* Same as typeInt */
/* todo we might want to differentiate that from int32 */
port-color:#9481E6;
}
ShaderPort.typeBool {
port-color:#9481E6;
}
ShaderPort.typeMatrix {
port-color:#8FC1DF;
}
ShaderPort.typeMatrix4x4 {
/* Same as typeMatrix */
port-color:#8FC1DF;
}
ShaderPort.typeGameObject {
port-color:#8FC1DF;
}
ShaderPort.typeFloat {
port-color:#84E4E7;
}
ShaderPort.typeFloat1 {
/* Same as typeFloat */
port-color:#84E4E7;
}
ShaderPort.typeSingle {
/* Same as typeFloat */
port-color:#84E4E7;
}
ShaderPort.typeDouble {
/* Same as typeFloat */
/* todo we might want to differentiate that from float */
port-color:#84E4E7;
}
ShaderPort.typeFloat2 {
port-color:#9AEF92;
}
ShaderPort.typeVector2 {
/* Same as typeFloat2 */
port-color:#9AEF92;
}
ShaderPort.typeComponent {
port-color:#C9F774;
}
ShaderPort.typeFloat3 {
port-color:#F6FF9A;
}
ShaderPort.typeVector3 {
/* Same as typeFloat3 */
port-color:#F6FF9A;
}
ShaderPort.typeString {
port-color:#FCD76E;
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/SerializableGraph/Implementation/SerializableGraph.cs


{
if (!ContainsNodeGuid(edge.outputSlot.nodeGuid) || !ContainsNodeGuid(edge.inputSlot.nodeGuid))
{
Debug.LogWarningFormat("Added edge is invalid: {0} -> {1}", edge.outputSlot.nodeGuid, edge.inputSlot.nodeGuid);
Debug.LogWarningFormat("Added edge is invalid: {0} -> {1}\n{2}", edge.outputSlot.nodeGuid, edge.inputSlot.nodeGuid, Environment.StackTrace);
m_AddedEdges.Remove(edge);
}
}

2
MaterialGraphProject/Assets/UnityShaderEditor/package.json


{
"name": "com.unity.shadergraph",
"description": "Shader Graph",
"version": "0.1.6",
"version": "0.1.7",
"unity": "2018.1",
"dependencies": {
}

3
MaterialGraphProject/UnityPackageManager/manifest.json


{
"registry": "https://staging-packages.unity.com",
"dependencies": {
"com.unity.render-pipelines.core" : "0.1.11",
"com.unity.render-pipelines.lightweight" : "0.1.11"
"com.unity.render-pipelines.lightweight" : "0.1.20"
}
}

97
LICENSE


Unity Companion License (“License”)
Software Copyright © 2017 Unity Technologies ApS
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive,
no-charge, and royalty-free copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, and distribute the
software that is made available under this License (“Software”), subject to the
following terms and conditions:
1. Unity Companion Use Only. Exercise of the license granted herein is limited
to exercise for the creation, use, and/or distribution of applications,
software, or other content pursuant to a valid Unity content authoring and
rendering engine software license (“Engine License”). That means while use of
the Software is not limited to use in the software licensed under the Engine
License, the Software may not be used for any purpose other than the creation,
use, and/or distribution of Engine License-dependent applications, software, or
other content. No other exercise of the license granted herein is permitted,
and in no event may the Software be used for competitive analysis or to develop
a competing product or service.
2. No Modification of Engine License. Neither this License nor any exercise of
the license granted herein modifies the Engine License in any way.
3. Ownership & Grant Back to You.
3.1 You own your content. In this License, “derivative works” means derivatives
of the Software itself--works derived only from the Software by you under this
License (for example, modifying the code of the Software itself to improve its
efficacy); “derivative works” of the Software do not include, for example,
games, apps, or content that you create using the Software. You keep all right,
title, and interest to your own content.
3.2 Unity owns its content. While you keep all right, title, and interest to
your own content per the above, as between Unity and you, Unity will own all
right, title, and interest to all intellectual property rights (including
patent, trademark, and copyright) in the Software and derivative works of the
Software, and you hereby assign and agree to assign all such rights in those
derivative works to Unity.
3.3 You have a license to those derivative works. Subject to this License,
Unity grants to you the same worldwide, non-exclusive, no-charge, and
royalty-free copyright license to derivative works of the Software you create
as is granted to you for the Software under this License.
4. Trademarks. You are not granted any right or license under this License to
use any trademarks, service marks, trade names, products names, or branding of
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are
permitted; see, for example, Unity’s Branding Usage Guidelines at
https://unity3d.com/public-relations/brand.
5. Notices & Third-Party Rights. This License, including the copyright notice
associated with the Software, must be provided in all substantial portions of
the Software and derivative works thereof (or, if that is impracticable, in any
other location where such notices are customarily placed). Further, if the
Software is accompanied by a Unity “third-party notices” or similar file, you
acknowledge and agree that software identified in that file is governed by
those separate license terms.
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL,
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software
constitutes your acceptance of this License and its terms and conditions.
Software released by Unity under this License may be modified or updated and
the License with it; upon any such modification or update, you will comply with
the terms of the updated License for any use of any of the Software under the
updated License.
8. Use in Compliance with Law and Termination. Your exercise of the license
granted herein will at all times be in compliance with applicable law and will
not infringe any proprietary rights (including intellectual property rights);
this License will terminate immediately on any breach by you of this License.
9. Severability. If any provision of this License is held to be unenforceable
or invalid, that provision will be enforced to the maximum extent possible and
the other provisions will remain in full force and effect.
10. Governing Law and Venue. This License is governed by and construed in
accordance with the laws of Denmark, except for its conflict of laws rules; the
United Nations Convention on Contracts for the International Sale of Goods will
not apply. If you reside (or your principal place of business is) within the
United States, you and Unity agree to submit to the personal and exclusive
jurisdiction of and venue in the state and federal courts located in San
Francisco County, California concerning any dispute arising out of this License
(“Dispute”). If you reside (or your principal place of business is) outside the
United States, you and Unity agree to submit to the personal and exclusive
jurisdiction of and venue in the courts located in Copenhagen, Denmark
concerning any Dispute.

35
MaterialGraphProject/Assets/NewNodes/Editor/Sampler2DShaderProperty.cs


using System;
using System.Text;
using UnityEngine;
/*namespace UnityEditor.ShaderGraph
{
[Serializable]
public class Sampler2DShaderProperty : AbstractShaderProperty<object>
{
public override PropertyType propertyType
{
get { return PropertyType.SamplerState; }
}
public override Vector4 defaultValue
{
get { return new Vector4(); }
}
public override string GetPropertyBlockString()
{
return string.Empty;
}
public override string GetPropertyDeclarationString()
{
return "sampler2D " + referenceName + ";";
}
public override PreviewProperty GetPreviewMaterialProperty()
{
return default(PreviewProperty);
}
}
}*/

3
MaterialGraphProject/Assets/NewNodes/Editor/Sampler2DShaderProperty.cs.meta


fileFormatVersion: 2
guid: 165606e7f31c5df4ebb94765e37694c2
timeCreated: 1505346922

112
MaterialGraphProject/Assets/NewNodes/Editor/SceneDepthNode.cs


using UnityEditor.Graphing;
using UnityEngine;
using UnityEditor.ShaderGraph.Drawing.Controls;
using System.Collections.Generic;
/*namespace UnityEditor.ShaderGraph
{
public enum SceneDepthMode
{
Default,
Normalized
};
[Title("Input", "Scene", "Scene Depth")]
public sealed class SceneDepthNode : AbstractMaterialNode, IGenerateProperties, IGeneratesBodyCode, IMayRequireScreenPosition
{
const string kUVSlotName = "UV";
const string kOutputSlotName = "Out";
public const int UVSlotId = 0;
public const int OutputSlotId = 1;
public SceneDepthNode()
{
name = "Scene Depth";
UpdateNodeAfterDeserialization();
}
public override bool hasPreview
{
get { return true; }
}
[SerializeField]
private SceneDepthMode m_SceneDepthMode = SceneDepthMode.Default;
[EnumControl("Mode")]
public SceneDepthMode sceneDepthMode
{
get { return m_SceneDepthMode; }
set
{
if (m_SceneDepthMode == value)
return;
m_SceneDepthMode = value;
if (onModified != null)
{
onModified(this, ModificationScope.Graph);
}
}
}
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new ScreenPositionMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName));
AddSlot(new Vector1MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, 0));
RemoveSlotsNameNotMatching(new[] { UVSlotId, OutputSlotId });
}
public override void CollectPreviewMaterialProperties(List<PreviewProperty> properties)
{
properties.Add(new PreviewProperty()
{
name = "_CameraDepthTexture",
propType = PropertyType.Float,
vector4Value = new Vector4(1, 1, 1, 1),
floatValue = 1,
colorValue = new Vector4(1, 1, 1, 1),
});
}
public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode)
{
properties.AddShaderProperty(new Sampler2DShaderProperty
{
overrideReferenceName = "_CameraDepthTexture",
generatePropertyBlock = false
});
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
string uvValue = GetSlotValue(UVSlotId, generationMode);
string outputValue = GetSlotValue(OutputSlotId, generationMode);
string methodName = "";
switch (sceneDepthMode)
{
case SceneDepthMode.Normalized:
methodName = "Linear01Depth";
break;
default:
methodName = "LinearEyeDepth";
break;
}
visitor.AddShaderChunk(string.Format("{0} _DepthTexture = {1}(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD({2})).r);", precision, methodName, uvValue), true);
visitor.AddShaderChunk(string.Format("{0} {1} = _DepthTexture;", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
}
public bool RequiresScreenPosition()
{
var uvSlot = FindInputSlot<MaterialSlot>(UVSlotId) as ScreenPositionMaterialSlot;
if (uvSlot == null)
return false;
if (uvSlot.isConnected)
return false;
return uvSlot.RequiresScreenPosition();
}
}
}*/

8
MaterialGraphProject/Assets/NewNodes/Editor/SceneDepthNode.cs.meta


fileFormatVersion: 2
guid: 93d2a1d512bd9114a8d1a21ade3d6ea6
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

114
MaterialGraphProject/Assets/NewNodes/Editor/SceneNormalsNode.cs


using UnityEditor.Graphing;
using UnityEngine;
using UnityEditor.ShaderGraph.Drawing.Controls;
using System.Collections.Generic;
/*namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Scene Normals")]
public class SceneNormalsNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IGenerateProperties, IMayRequireScreenPosition
{
const string kUVSlotName = "UV";
const string kOutputSlotName = "Out";
public const int UVSlotId = 0;
public const int OutputSlotId = 1;
public SceneNormalsNode()
{
name = "Scene Normals";
UpdateNodeAfterDeserialization();
}
public override bool hasPreview
{
get { return true; }
}
string GetFunctionName()
{
return "Unity_DecodeViewNormalStereo";
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new ScreenPositionMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName));
AddSlot(new Vector3MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector3.zero));
RemoveSlotsNameNotMatching(new[] { UVSlotId, OutputSlotId });
}
public override void CollectPreviewMaterialProperties(List<PreviewProperty> properties)
{
properties.Add(new PreviewProperty()
{
name = "_CameraDepthNormalsTexture",
propType = PropertyType.Float,
vector4Value = new Vector4(1, 1, 1, 1),
floatValue = 1,
colorValue = new Vector4(1, 1, 1, 1),
});
}
public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode)
{
properties.AddShaderProperty(new Sampler2DShaderProperty
{
overrideReferenceName = "_CameraDepthNormalsTexture",
generatePropertyBlock = false
});
}
string GetFunctionPrototype(string argIn, string argOut)
{
return string.Format("void {0} ({1}4 {2}, out {3} {4})", GetFunctionName(),
precision, argIn,
ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), argOut);
}
string GetFunctionCallBody(string inputValue, string outputValue)
{
return GetFunctionName() + " (" + inputValue + ", " + outputValue + ");";
}
public void GenerateNodeFunction(ShaderGenerator visitor, GenerationMode generationMode)
{
var outputString = new ShaderGenerator();
outputString.AddShaderChunk(GetFunctionPrototype("Tex", "Out"), false);
outputString.AddShaderChunk("{", false);
outputString.Indent();
outputString.AddShaderChunk(string.Format("{0}3 nn = Tex.xyz * {0}3(2.0 * 1.7777, 2.0 * 1.7777, 0) + {0}3(-1.7777, -1.7777, 1);", precision), true);
outputString.AddShaderChunk(string.Format("{0} g = 2.0 / dot(nn.xyz, nn.xyz);", precision), true);
outputString.AddShaderChunk(string.Format("{0}3 n;", precision), true);
outputString.AddShaderChunk("n.xy = g * nn.xy;", true);
outputString.AddShaderChunk("n.z = g - 1.0;", true);
outputString.AddShaderChunk(string.Format("Out = n;", precision), true);
outputString.Deindent();
outputString.AddShaderChunk("}", false);
visitor.AddShaderChunk(outputString.GetShaderString(0), true);
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
string uvValue = GetSlotValue(UVSlotId, generationMode);
string outputValue = GetSlotValue(OutputSlotId, generationMode);
visitor.AddShaderChunk(string.Format("{0}4 _DepthNormalsTexture = tex2D(_CameraDepthNormalsTexture, {1});", precision, uvValue), true);
visitor.AddShaderChunk(string.Format("{0} {1};", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
visitor.AddShaderChunk(GetFunctionCallBody("_DepthNormalsTexture", outputValue), true);
visitor.AddShaderChunk(string.Format("{1} = {1} * {0}3(1.0, 1.0, -1.0);", precision, GetVariableNameForSlot(OutputSlotId)), true);
}
public bool RequiresScreenPosition()
{
var uvSlot = FindInputSlot<MaterialSlot>(UVSlotId) as ScreenPositionMaterialSlot;
if (uvSlot == null)
return false;
if (uvSlot.isConnected)
return false;
return uvSlot.RequiresScreenPosition();
}
}
}*/

8
MaterialGraphProject/Assets/NewNodes/Editor/SceneNormalsNode.cs.meta


fileFormatVersion: 2
guid: e54cf83dd14c5ea4cbecc38ad40a3a4b
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

109
MaterialGraphProject/Assets/NewNodes/Editor/SceneVelocityNode.cs


using UnityEditor.Graphing;
using UnityEngine;
using UnityEditor.ShaderGraph.Drawing.Controls;
using System.Collections.Generic;
/*namespace UnityEditor.ShaderGraph
{
public enum SceneVelocityMode
{
Default,
Hue
};
[Title("Input", "Scene", "Scene Velocity")]
public class SceneVelocityNode : AbstractMaterialNode, IGenerateProperties, IGeneratesBodyCode, IMayRequireScreenPosition
{
const string kUVSlotName = "UV";
const string kOutputSlotName = "Out";
public const int UVSlotId = 0;
public const int OutputSlotId = 1;
public SceneVelocityNode()
{
name = "Scene Velocity";
UpdateNodeAfterDeserialization();
}
public override bool hasPreview
{
get { return true; }
}
[SerializeField]
private SceneVelocityMode m_SceneVelocityMode = SceneVelocityMode.Default;
[EnumControl("Mode")]
public SceneVelocityMode sceneVelocityMode
{
get { return m_SceneVelocityMode; }
set
{
if (m_SceneVelocityMode == value)
return;
m_SceneVelocityMode = value;
if (onModified != null)
{
onModified(this, ModificationScope.Graph);
}
}
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new ScreenPositionMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName));
AddSlot(new Vector3MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector3.zero));
RemoveSlotsNameNotMatching(new[] { UVSlotId, OutputSlotId });
}
public override void CollectPreviewMaterialProperties(List<PreviewProperty> properties)
{
properties.Add(new PreviewProperty()
{
name = "_CameraMotionVectorTexture",
propType = PropertyType.Float,
vector4Value = new Vector4(1, 1, 1, 1),
floatValue = 1,
colorValue = new Vector4(1, 1, 1, 1),
});
}
public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode)
{
properties.AddShaderProperty(new Sampler2DShaderProperty
{
overrideReferenceName = "_CameraMotionVectorTexture",
generatePropertyBlock = false
});
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
string uvValue = GetSlotValue(UVSlotId, generationMode);
string outputValue = GetSlotValue(OutputSlotId, generationMode);
visitor.AddShaderChunk(string.Format("{0}3 _MotionVectorTexture = {0}3(tex2D(_CameraMotionVectorTexture, {1}).rg, 0);", precision, uvValue), true);
if (sceneVelocityMode == SceneVelocityMode.Hue)
{
visitor.AddShaderChunk(string.Format("{0} hue = (atan2(_MotionVectorTexture.x, _MotionVectorTexture.y) / 3.14159265359 + 1.0) * 0.5;", precision), true);
visitor.AddShaderChunk(string.Format("_MotionVectorTexture = saturate({0}3(abs(hue * 6.0 - 3.0) - 1.0, 2.0 - abs(hue * 6.0 - 2.0), 2.0 - abs(hue * 6.0 - 4.0)));", precision), true);
}
visitor.AddShaderChunk(string.Format("{0} {1} = _MotionVectorTexture;", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
}
public bool RequiresScreenPosition()
{
var uvSlot = FindInputSlot<MaterialSlot>(UVSlotId) as ScreenPositionMaterialSlot;
if (uvSlot == null)
return false;
if (uvSlot.isConnected)
return false;
return uvSlot.RequiresScreenPosition();
}
}
}*/

8
MaterialGraphProject/Assets/NewNodes/Editor/SceneVelocityNode.cs.meta


fileFormatVersion: 2
guid: 8e751ddf46d42b349a993a7438152f82
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

176
MaterialGraphProject/Assets/Oilish.ShaderGraph


{
"m_SerializableNodes": [
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.NormalVectorNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"80cde611-bdd4-479d-b7e8-3da1fb4d930e\",\n \"m_Name\": \"Normal Vector\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -3014.054443359375,\n \"y\": -197.20204162597657,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Space\": 3\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"d164c25c-4357-4d16-b75b-77042fc67615\",\n \"m_Name\": \"PBR Master\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -205.63648986816407,\n \"y\": -19.612878799438478,\n \"width\": 208.0,\n \"height\": 479.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0\\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\\\": \\\"Alpha\\\",\\n \\\"m_ShaderStage\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_MaterialOptions\": {\n \"m_SrcBlend\": 0,\n \"m_DstBlend\": 1,\n \"m_CullMode\": 0,\n \"m_ZTest\": 2,\n \"m_ZWrite\": 0,\n \"m_RenderQueue\": 1,\n \"m_RenderType\": 0,\n \"m_LOD\": 200\n },\n \"m_Model\": 1,\n \"m_AlphaMode\": 0\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.CombineNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"86b1a350-b6f8-4180-a6b9-3cc488e83ba2\",\n \"m_Name\": \"Combine\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1090.2236328125,\n \"y\": -183.0252685546875,\n \"width\": 208.0,\n \"height\": 350.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.ColorspaceConversionNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"a17a80b0-945e-4cb3-b1df-e3c70a020b17\",\n \"m_Name\": \"Colorspace Conversion\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -697.2236328125,\n \"y\": -24.0252685546875,\n \"width\": 208.0,\n \"height\": 311.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Conversion\": {\n \"from\": 2,\n \"to\": 0\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.RemapNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"3c707dba-5af6-4267-ad61-cb8a45d9b534\",\n \"m_Name\": \"Remap\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1512.8310546875,\n \"y\": -209.6436767578125,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"InMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"InMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"OutMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 3.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.NormalCreateNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"dc069af2-a425-42f3-b6fa-ed41ab0667f9\",\n \"m_Name\": \"Normal Create\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2815.603515625,\n \"y\": -570.7398681640625,\n \"width\": 208.0,\n \"height\": 374.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\n \\\\\\\"texture\\\\\\\": {\\\\n \\\\\\\"fileID\\\\\\\": 2800000,\\\\n \\\\\\\"guid\\\\\\\": \\\\\\\"a653bbc25cc7e4794829cf7b1184abcb\\\\\\\",\\\\n \\\\\\\"type\\\\\\\": 3\\\\n }\\\\n}\\\"\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Offset\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Offset\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Strength\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Strength\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 2.0,\\n \\\"m_DefaultValue\\\": 8.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.ViewDirectionNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"9a52285a-7b93-4568-b4ca-919c13be8147\",\n \"m_Name\": \"View Direction\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2772.0322265625,\n \"y\": -95.214111328125,\n \"width\": 208.0,\n \"height\": 311.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_Space\": 3\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.DotProductNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"b2f14bab-82ba-4b34-9dd5-1d2c72e7d3a7\",\n \"m_Name\": \"Dot Product\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2376.129150390625,\n \"y\": -149.5313720703125,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"e1d36bdd-8db6-4d15-8eb4-0a8ff3fd5a50\",\n \"m_Name\": \"Multiply\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1851.76806640625,\n \"y\": -236.397705078125,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.Texture2DNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"bd17c047-1f68-41d6-998b-1a9a1a0d5f5a\",\n \"m_Name\": \"Texture 2D\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2184.43017578125,\n \"y\": -597.7528076171875,\n \"width\": 208.0,\n \"height\": 407.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Tex\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Tex\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\n \\\\\\\"texture\\\\\\\": {\\\\n \\\\\\\"instanceID\\\\\\\": 0\\\\n }\\\\n}\\\"\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_TextureType\": 0\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.PropertyNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"8861b67d-80e1-4e8c-8af8-d3fb1804712d\",\n \"m_Name\": \"Property\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -3009.407958984375,\n \"y\": -751.980712890625,\n \"width\": 91.0,\n \"height\": 111.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true,\n \"m_PropertyGuidSerialized\": \"a960b762-7524-4b60-adca-86c44d6e41d6\"\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.TimeNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"851cb503-7480-4ded-a192-05705e509f75\",\n \"m_Name\": \"Time\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2346.93701171875,\n \"y\": 190.9771728515625,\n \"width\": 116.0,\n \"height\": 174.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Time\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Time\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"SinTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SinTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"CosTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CosTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"DeltaTime\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DeltaTime\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"SmoothDelta\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SmoothDelta\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.RemapNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"cdcf6f53-e87d-477f-9839-1ecff5536a8e\",\n \"m_Name\": \"Remap\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -2104.919677734375,\n \"y\": 140.7222900390625,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"InMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"InMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": -1.0,\\n \\\"y\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"OutMinMax\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"OutMinMax\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 2.0,\\n \\\"y\\\": 4.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.CombineNode"
},
"JSONnodeData": "{\n \"m_GuidSerialized\": \"35879f31-fc6e-4b22-9689-2dc18e95c843\",\n \"m_Name\": \"Combine\",\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1779.584716796875,\n \"y\": 205.5247802734375,\n \"width\": 208.0,\n \"height\": 350.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_ShaderStage\\\": 0,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_PreviewExpanded\": true\n}"
}
],
"m_SerializableEdges": [
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"3c707dba-5af6-4267-ad61-cb8a45d9b534\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"86b1a350-b6f8-4180-a6b9-3cc488e83ba2\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"86b1a350-b6f8-4180-a6b9-3cc488e83ba2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"a17a80b0-945e-4cb3-b1df-e3c70a020b17\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e1d36bdd-8db6-4d15-8eb4-0a8ff3fd5a50\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3c707dba-5af6-4267-ad61-cb8a45d9b534\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"35879f31-fc6e-4b22-9689-2dc18e95c843\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"3c707dba-5af6-4267-ad61-cb8a45d9b534\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9a52285a-7b93-4568-b4ca-919c13be8147\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"b2f14bab-82ba-4b34-9dd5-1d2c72e7d3a7\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"b2f14bab-82ba-4b34-9dd5-1d2c72e7d3a7\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e1d36bdd-8db6-4d15-8eb4-0a8ff3fd5a50\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"bd17c047-1f68-41d6-998b-1a9a1a0d5f5a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e1d36bdd-8db6-4d15-8eb4-0a8ff3fd5a50\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8861b67d-80e1-4e8c-8af8-d3fb1804712d\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"bd17c047-1f68-41d6-998b-1a9a1a0d5f5a\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"851cb503-7480-4ded-a192-05705e509f75\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"cdcf6f53-e87d-477f-9839-1ecff5536a8e\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"cdcf6f53-e87d-477f-9839-1ecff5536a8e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"35879f31-fc6e-4b22-9689-2dc18e95c843\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a17a80b0-945e-4cb3-b1df-e3c70a020b17\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"d164c25c-4357-4d16-b75b-77042fc67615\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"8861b67d-80e1-4e8c-8af8-d3fb1804712d\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dc069af2-a425-42f3-b6fa-ed41ab0667f9\"\n }\n}"
},
{
"typeInfo": {
"fullName": "UnityEditor.Graphing.Edge"
},
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"80cde611-bdd4-479d-b7e8-3da1fb4d930e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"b2f14bab-82ba-4b34-9dd5-1d2c72e7d3a7\"\n }\n}"
}
],
"m_SerializedProperties": [
{
"typeInfo": {
"fullName": "UnityEditor.ShaderGraph.TextureShaderProperty"
},
"JSONnodeData": "{\n \"m_Value\": {\n \"m_SerializedTexture\": \"{\\n \\\"texture\\\": {\\n \\\"fileID\\\": 2800000,\\n \\\"guid\\\": \\\"a653bbc25cc7e4794829cf7b1184abcb\\\",\\n \\\"type\\\": 3\\n }\\n}\"\n },\n \"m_Name\": \"Heightmap\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Guid\": {\n \"m_GuidSerialized\": \"a960b762-7524-4b60-adca-86c44d6e41d6\"\n },\n \"m_Modifiable\": true\n}"
}
]
}

7
MaterialGraphProject/Assets/Oilish.ShaderGraph.meta


fileFormatVersion: 2
guid: abcabb4945a2d6c4aa605f870d393d02
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

29
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorRGBMaterialSlot.cs


using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph
{
public class ColorRGBMaterialSlot : Vector3MaterialSlot
{
public ColorRGBMaterialSlot() {}
public ColorRGBMaterialSlot(
int slotId,
string displayName,
string shaderOutputName,
SlotType slotType,
Vector4 value,
ShaderStage shaderStage = ShaderStage.Dynamic,
bool hidden = false)
: base(slotId, displayName, shaderOutputName, slotType, value, shaderStage, hidden)
{
}
public override VisualElement InstantiateControl()
{
return new ColorRGBSlotControlView(this);
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ColorRGBMaterialSlot.cs.meta


fileFormatVersion: 2
guid: a29c1f6321a430d439c5623e2a44f397
timeCreated: 1510659340

40
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableMesh.cs


using System;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Serializable]
public class SerializableMesh
{
[SerializeField]
private string m_SerializedMesh;
[Serializable]
private class MeshHelper
{
public Mesh mesh;
}
public Mesh mesh
{
get
{
if (string.IsNullOrEmpty(m_SerializedMesh))
return null;
var meshHelper = new MeshHelper();
EditorJsonUtility.FromJsonOverwrite(m_SerializedMesh, meshHelper);
return meshHelper.mesh;
}
set
{
if (mesh == value)
return;
var meshHelper = new MeshHelper();
meshHelper.mesh = value;
m_SerializedMesh = EditorJsonUtility.ToJson(meshHelper, true);
}
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/SerializableMesh.cs.meta


fileFormatVersion: 2
guid: 944c4fc9d004e7845adb3f86843ab742
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

49
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/AmbientNode.cs


using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Ambient")]
public class AmbientNode : AbstractMaterialNode
{
const string kOutputSlotName = "Color";
const string kOutputSlot1Name = "Sky";
const string kOutputSlot2Name = "Equator";
const string kOutputSlot3Name = "Ground";
public const int OutputSlotId = 0;
public const int OutputSlot1Id = 1;
public const int OutputSlot2Id = 2;
public const int OutputSlot3Id = 3;
public AmbientNode()
{
name = "Ambient";
UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector4MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector4.zero));
AddSlot(new Vector4MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, Vector4.zero));
AddSlot(new Vector4MaterialSlot(OutputSlot2Id, kOutputSlot2Name, kOutputSlot2Name, SlotType.Output, Vector4.zero));
AddSlot(new Vector4MaterialSlot(OutputSlot3Id, kOutputSlot3Name, kOutputSlot3Name, SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id, OutputSlot2Id, OutputSlot3Id });
}
public override string GetVariableNameForSlot(int slotId)
{
switch (slotId)
{
case OutputSlot1Id:
return "unity_AmbientSky";
case OutputSlot2Id:
return "unity_AmbientEquator";
case OutputSlot3Id:
return "unity_AmbientGround";
default:
return "UNITY_LIGHTMODEL_AMBIENT";
}
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/AmbientNode.cs.meta


fileFormatVersion: 2
guid: 0f9e9a126b4ecf24d81258763ac4a64d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

98
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs


using UnityEngine;
using UnityEditor.Graphing;
namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Fog")]
public class FogNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IMayRequirePosition
{
public FogNode()
{
name = "Fog";
UpdateNodeAfterDeserialization();
}
const int OutputSlotId = 0;
const int OutputSlot1Id = 1;
const string kOutputSlotName = "Color";
const string kOutputSlot1Name = "Density";
public override bool hasPreview
{
get { return false; }
}
string GetFunctionName()
{
return string.Format("Unity_Fog_{0}", precision);
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector4MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector4.zero));
AddSlot(new Vector1MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, 0));
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id });
}
string GetFunctionPrototype(string argIn, string argOut, string argOut2)
{
return string.Format("void {0} ({1}3 {2}, out {3} {4}, out {5} {6})", GetFunctionName(), precision, argIn,
ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), argOut,
ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlot1Id).concreteValueType), argOut2);
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
string colorValue = GetSlotValue(OutputSlotId, generationMode);
string densityValue = GetSlotValue(OutputSlot1Id, generationMode);
visitor.AddShaderChunk(string.Format("{0} {1};", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlotId).concreteValueType), GetVariableNameForSlot(OutputSlotId)), true);
visitor.AddShaderChunk(string.Format("{0} {1};", ConvertConcreteSlotValueTypeToString(precision, FindOutputSlot<MaterialSlot>(OutputSlot1Id).concreteValueType), GetVariableNameForSlot(OutputSlot1Id)), true);
string objectSpacePosition = string.Format("IN.{0}", CoordinateSpace.Object.ToVariableName(InterpolatorType.Position));
visitor.AddShaderChunk(GetFunctionCallBody(objectSpacePosition, colorValue, densityValue), true);
}
string GetFunctionCallBody(string objectSpaceValue, string outputValue, string output1Value)
{
return GetFunctionName() + " (" + objectSpaceValue + ", " + outputValue + ", " + output1Value + ");";
}
public void GenerateNodeFunction(ShaderGenerator visitor, GenerationMode generationMode)
{
visitor.AddShaderChunk(GetFunctionPrototype("ObjectSpacePosition", "Color", "Density"), false);
visitor.AddShaderChunk("{", false);
visitor.Indent();
visitor.AddShaderChunk("Color = unity_FogColor;", true);
visitor.AddShaderChunk(string.Format("{0} clipZ_01 = UNITY_Z_0_FAR_FROM_CLIPSPACE(UnityObjectToClipPos(ObjectSpacePosition).z);", precision), true);
visitor.AddShaderChunk("#if defined(FOG_LINEAR)", true);
visitor.Indent();
visitor.AddShaderChunk(string.Format("{0} fogFactor = saturate(clipZ_01 * unity_FogParams.z + unity_FogParams.w);", precision), true);
visitor.AddShaderChunk("Density = fogFactor;", true);
visitor.Deindent();
visitor.AddShaderChunk("#elif defined(FOG_EXP)", true);
visitor.Indent();
visitor.AddShaderChunk(string.Format("{0} fogFactor = unity_FogParams.y * clipZ_01;", precision), true);
visitor.AddShaderChunk("Density = {2}(saturate(exp2(-fogFactor)));", true);
visitor.Deindent();
visitor.AddShaderChunk("#elif defined(FOG_EXP2)", true);
visitor.Indent();
visitor.AddShaderChunk(string.Format("{0} fogFactor = unity_FogParams.x * clipZ_01;", precision), true);
visitor.AddShaderChunk("Density = {2}(saturate(exp2(-fogFactor*fogFactor)));", true);
visitor.Deindent();
visitor.AddShaderChunk("#else", true);
visitor.Indent();
visitor.AddShaderChunk("Density = 0.0h;", true);
visitor.Deindent();
visitor.AddShaderChunk("#endif", true);
visitor.Deindent();
visitor.AddShaderChunk("}", false);
}
public NeededCoordinateSpace RequiresPosition()
{
return CoordinateSpace.Object.ToNeededCoordinateSpace();
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs.meta


fileFormatVersion: 2
guid: f934acb3f675022448ac439d87d84a80
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

41
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs


using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Object")]
public sealed class ObjectNode : AbstractMaterialNode
{
const string kOutputSlotName = "Position";
const string kOutputSlot1Name = "Scale";
public const int OutputSlotId = 0;
public const int OutputSlot1Id = 1;
public ObjectNode()
{
name = "Object";
UpdateNodeAfterDeserialization();
}
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector3MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector3.zero));
AddSlot(new Vector3MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, Vector3.zero));
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id });
}
public override string GetVariableNameForSlot(int slotId)
{
switch (slotId)
{
case OutputSlot1Id:
return @"float3(length(float3(unity_ObjectToWorld[0].x, unity_ObjectToWorld[1].x, unity_ObjectToWorld[2].x)),
length(float3(unity_ObjectToWorld[0].y, unity_ObjectToWorld[1].y, unity_ObjectToWorld[2].y)),
length(float3(unity_ObjectToWorld[0].z, unity_ObjectToWorld[1].z, unity_ObjectToWorld[2].z)))";
default:
return "unity_ObjectToWorld._m03_m13_m23";
}
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs.meta


fileFormatVersion: 2
guid: 081b8aed5e33ba1418a6a80f7693b9b4
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

39
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs


using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Screen")]
public sealed class ScreenNode : AbstractMaterialNode
{
const string kOutputSlotName = "Width";
const string kOutputSlot1Name = "Height";
public const int OutputSlotId = 0;
public const int OutputSlot1Id = 1;
public ScreenNode()
{
name = "Screen";
UpdateNodeAfterDeserialization();
}
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector1MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, 0));
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id });
}
public override string GetVariableNameForSlot(int slotId)
{
switch (slotId)
{
case OutputSlot1Id:
return "_ScreenParams.y";
default:
return "_ScreenParams.x";
}
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs.meta


fileFormatVersion: 2
guid: 94b2801c66359164e93dc371fc6762e2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

37
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/EdgeConnectorListener.cs


using UnityEditor.Experimental.UIElements.GraphView;
using UnityEditor.Graphing;
using UnityEngine;
using Edge = UnityEditor.Experimental.UIElements.GraphView.Edge;
namespace UnityEditor.ShaderGraph.Drawing
{
public class EdgeConnectorListener : IEdgeConnectorListener
{
readonly AbstractMaterialGraph m_Graph;
readonly SearchWindowProvider m_SearchWindowProvider;
public EdgeConnectorListener(AbstractMaterialGraph graph, SearchWindowProvider searchWindowProvider)
{
m_Graph = graph;
m_SearchWindowProvider = searchWindowProvider;
}
public void OnDropOutsidePort(Edge edge, Vector2 position)
{
var draggedPort = (edge.output != null ? edge.output.edgeConnector.edgeDragHelper.draggedPort : null) ?? (edge.input != null ? edge.input.edgeConnector.edgeDragHelper.draggedPort : null);
m_SearchWindowProvider.connectedPort = draggedPort;
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), m_SearchWindowProvider);
}
public void OnDrop(GraphView graphView, Edge edge)
{
var leftSlot = edge.output.userData as ISlot;
var rightSlot = edge.input.userData as ISlot;
if (leftSlot != null && rightSlot != null)
{
m_Graph.owner.RegisterCompleteObjectUndo("Connect Edge");
m_Graph.Connect(leftSlot.slotReference, rightSlot.slotReference);
}
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/EdgeConnectorListener.cs.meta


fileFormatVersion: 2
guid: 36c61698900b42c9a6b5e28c3651249a
timeCreated: 1512740035

34
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Scrollable.cs


using System;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing
{
public class Scrollable : MouseManipulator
{
Action<float> m_Handler;
public Scrollable(Action<float> handler)
{
m_Handler = handler;
activators.Add(new ManipulatorActivationFilter()
{
button = MouseButton.LeftMouse
});
}
protected override void RegisterCallbacksOnTarget()
{
target.RegisterCallback(new EventCallback<WheelEvent>(OnMouseWheel), Capture.NoCapture);
}
protected override void UnregisterCallbacksFromTarget()
{
target.UnregisterCallback(new EventCallback<WheelEvent>(OnMouseWheel), Capture.NoCapture);
}
void OnMouseWheel(WheelEvent evt)
{
m_Handler(evt.delta.y);
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/Scrollable.cs.meta


fileFormatVersion: 2
guid: 1fde0872f0455304bb082dbee731fabf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/ShaderPort.cs


using System;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing
{
sealed class ShaderPort : Port
{
ShaderPort(Orientation portOrientation, Direction portDirection, Type type)
: base(portOrientation, portDirection, type) { }
public static Port Create(Orientation orientation, Direction direction, Type type, IEdgeConnectorListener connectorListener)
{
var port = new ShaderPort(orientation, direction, type)
{
m_EdgeConnector = new EdgeConnector<Edge>(connectorListener),
};
port.AddManipulator(port.m_EdgeConnector);
return port;
}
public VisualElement connectorBox
{
get { return m_ConnectorBox; }
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/ShaderPort.cs.meta


fileFormatVersion: 2
guid: 96f5a3d0303d4d9395a450dcce906110
timeCreated: 1512739794

28
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs


using UnityEditor.Experimental.UIElements;
using UnityEditor.Graphing;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing.Slots
{
public class ColorRGBSlotControlView : VisualElement
{
ColorRGBMaterialSlot m_Slot;
public ColorRGBSlotControlView(ColorRGBMaterialSlot slot)
{
m_Slot = slot;
var colorField = new ColorField { value = new Color(slot.value.x, slot.value.y, slot.value.z, 0), showAlpha = false };
colorField.OnValueChanged(OnValueChanged);
Add(colorField);
}
void OnValueChanged(ChangeEvent<Color> evt)
{
m_Slot.owner.owner.owner.RegisterCompleteObjectUndo("Color Change");
m_Slot.value = new Vector3(evt.newValue.r, evt.newValue.g, evt.newValue.b);
if (m_Slot.owner.onModified != null)
m_Slot.owner.onModified(m_Slot.owner, ModificationScope.Node);
}
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs.meta


fileFormatVersion: 2
guid: a184620cc50fd2e40a845d6ebb39529e
timeCreated: 1510659384

97
MaterialGraphProject/Assets/UnityShaderEditor/LICENSE


Unity Companion License (“License”)
Software Copyright © 2017 Unity Technologies ApS
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive,
no-charge, and royalty-free copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, and distribute the
software that is made available under this License (“Software”), subject to the
following terms and conditions:
1. Unity Companion Use Only. Exercise of the license granted herein is limited
to exercise for the creation, use, and/or distribution of applications,
software, or other content pursuant to a valid Unity content authoring and
rendering engine software license (“Engine License”). That means while use of
the Software is not limited to use in the software licensed under the Engine
License, the Software may not be used for any purpose other than the creation,
use, and/or distribution of Engine License-dependent applications, software, or
other content. No other exercise of the license granted herein is permitted,
and in no event may the Software be used for competitive analysis or to develop
a competing product or service.
2. No Modification of Engine License. Neither this License nor any exercise of
the license granted herein modifies the Engine License in any way.
3. Ownership & Grant Back to You.
3.1 You own your content. In this License, “derivative works” means derivatives
of the Software itself--works derived only from the Software by you under this
License (for example, modifying the code of the Software itself to improve its
efficacy); “derivative works” of the Software do not include, for example,
games, apps, or content that you create using the Software. You keep all right,
title, and interest to your own content.
3.2 Unity owns its content. While you keep all right, title, and interest to
your own content per the above, as between Unity and you, Unity will own all
right, title, and interest to all intellectual property rights (including
patent, trademark, and copyright) in the Software and derivative works of the
Software, and you hereby assign and agree to assign all such rights in those
derivative works to Unity.
3.3 You have a license to those derivative works. Subject to this License,
Unity grants to you the same worldwide, non-exclusive, no-charge, and
royalty-free copyright license to derivative works of the Software you create
as is granted to you for the Software under this License.
4. Trademarks. You are not granted any right or license under this License to
use any trademarks, service marks, trade names, products names, or branding of
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are
permitted; see, for example, Unity’s Branding Usage Guidelines at
https://unity3d.com/public-relations/brand.
5. Notices & Third-Party Rights. This License, including the copyright notice
associated with the Software, must be provided in all substantial portions of
the Software and derivative works thereof (or, if that is impracticable, in any
other location where such notices are customarily placed). Further, if the
Software is accompanied by a Unity “third-party notices” or similar file, you
acknowledge and agree that software identified in that file is governed by
those separate license terms.
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL,
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software
constitutes your acceptance of this License and its terms and conditions.
Software released by Unity under this License may be modified or updated and
the License with it; upon any such modification or update, you will comply with
the terms of the updated License for any use of any of the Software under the
updated License.
8. Use in Compliance with Law and Termination. Your exercise of the license
granted herein will at all times be in compliance with applicable law and will
not infringe any proprietary rights (including intellectual property rights);
this License will terminate immediately on any breach by you of this License.
9. Severability. If any provision of this License is held to be unenforceable
or invalid, that provision will be enforced to the maximum extent possible and
the other provisions will remain in full force and effect.
10. Governing Law and Venue. This License is governed by and construed in
accordance with the laws of Denmark, except for its conflict of laws rules; the
United Nations Convention on Contracts for the International Sale of Goods will
not apply. If you reside (or your principal place of business is) within the
United States, you and Unity agree to submit to the personal and exclusive
jurisdiction of and venue in the state and federal courts located in San
Francisco County, California concerning any dispute arising out of this License
(“Dispute”). If you reside (or your principal place of business is) outside the
United States, you and Unity agree to submit to the personal and exclusive
jurisdiction of and venue in the courts located in Copenhagen, Denmark
concerning any Dispute.

7
MaterialGraphProject/Assets/UnityShaderEditor/LICENSE.meta


fileFormatVersion: 2
guid: b8b14fd0b0ee0354f8be961cca3b4615
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/NodeCreator.cs.meta


fileFormatVersion: 2
guid: 48d2349cc7ed41d9bf77231b69efbc05
timeCreated: 1508752297

40
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/NodeCreator.cs


using System;
using System.Linq;
using System.Reflection;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph.Drawing
{
public class NodeCreator : MouseManipulator
{
SearchWindowProvider m_SearchWindowProvider;
public NodeCreator(SearchWindowProvider searchWindowProvider)
{
m_SearchWindowProvider = searchWindowProvider;
activators.Add(new ManipulatorActivationFilter { button = MouseButton.RightMouse });
}
protected override void RegisterCallbacksOnTarget()
{
target.RegisterCallback<MouseUpEvent>(OnMouseUp);
}
void OnMouseUp(MouseUpEvent evt)
{
if (CanStartManipulation(evt))
{
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(evt.mousePosition)), m_SearchWindowProvider);
evt.StopPropagation();
}
}
protected override void UnregisterCallbacksFromTarget()
{
target.UnregisterCallback<MouseUpEvent>(OnMouseUp);
}
}
}
正在加载...
取消
保存