浏览代码

[mat graph]Fix up previews a bit more.

/main
Tim Cooper 8 年前
当前提交
3a45f192
共有 8 个文件被更改,包括 1777 次插入35 次删除
  1. 257
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss.imported.asset
  2. 604
      MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/NodalView.uss.imported.asset
  3. 246
      MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/SimpleContentView.uss.imported.asset
  4. 74
      MaterialGraphProject/Assets/NewUI/Editor/Views/GraphView.uss.imported.asset
  5. 619
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Styles/MaterialGraph.uss.imported.asset
  6. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/AbstractSurfaceMasterNode.cs
  7. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/ViewDirectionNode.cs
  8. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Util/ShaderGenerator.cs

257
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss.imported.asset


m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 11997, guid: 0000000000000000e000000000000000, type: 0}
m_Name: SerializableGraph.uss.imported
m_Name:
matchers: []
rules: []
floats: []
ints:
matchers:
- specificity: 2
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 0
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 102
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 1
depth: 2147483647
previousIndex: -1
nextIndex: 2
- specificity: 102
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 1
depth: 2147483647
previousIndex: 1
nextIndex: -1
- specificity: 202
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 2
depth: 2147483647
previousIndex: -1
nextIndex: 4
- specificity: 202
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 2
depth: 2147483647
previousIndex: 3
nextIndex: 5
- specificity: 202
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 2
depth: 2147483647
previousIndex: 4
nextIndex: -1
- specificity: 202
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 3
depth: 2147483647
previousIndex: -1
nextIndex: 7
- specificity: 202
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 3
depth: 2147483647
previousIndex: 6
nextIndex: 8
- specificity: 202
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 3
depth: 2147483647
previousIndex: 7
nextIndex: -1
- specificity: 102
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 4
depth: 2147483647
previousIndex: -1
nextIndex: 10
- specificity: 102
selectorValues:
- controls
selectorTypes: 06000000
ruleIndex: 4
depth: 2147483647
previousIndex: 9
nextIndex: -1
- specificity: 202
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 5
depth: 2147483647
previousIndex: -1
nextIndex: 12
- specificity: 202
selectorValues:
- controls
selectorTypes: 06000000
ruleIndex: 5
depth: 2147483647
previousIndex: 11
nextIndex: 13
- specificity: 202
selectorValues:
- element
selectorTypes: 06000000
ruleIndex: 5
depth: 2147483647
previousIndex: 12
nextIndex: -1
- specificity: 2
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 6
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 102
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 7
depth: 2147483647
previousIndex: -1
nextIndex: 16
- specificity: 102
selectorValues:
- preview
selectorTypes: 06000000
ruleIndex: 7
depth: 2147483647
previousIndex: 15
nextIndex: -1
- specificity: 202
selectorValues:
- NodeDrawer
selectorTypes: 02000000
ruleIndex: 8
depth: 2147483647
previousIndex: -1
nextIndex: 18
- specificity: 202
selectorValues:
- preview
selectorTypes: 06000000
ruleIndex: 8
depth: 2147483647
previousIndex: 17
nextIndex: 19
- specificity: 202
selectorValues:
- image
selectorTypes: 06000000
ruleIndex: 8
depth: 2147483647
previousIndex: 18
nextIndex: -1
- specificity: 2
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 9
depth: 2147483647
previousIndex: -1
nextIndex: -1
rules:
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 0
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 1
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 0
- type: 1
propertyID: 26
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 1
- type: 1
propertyID: 26
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 4
- type: 0
propertyID: 7
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 5
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 18
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 18
valueIndex: 4
- type: 0
propertyID: 17
valueIndex: 5
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 18
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
floats:
- 1
- 1
- 2
- 26
- 200
- 200
- 26
ints: 00000000020000000000000000000000000000000000000000000000
bools:
colors: []
strings: []

604
MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/NodalView.uss.imported.asset


m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 11997, guid: 0000000000000000e000000000000000, type: 0}
m_Name: NodalView.uss.imported
m_Name:
matchers: []
rules: []
floats: []
ints:
matchers:
- specificity: 102
selectorValues:
- Node
selectorTypes: 02000000
ruleIndex: 0
depth: 2147483647
previousIndex: -1
nextIndex: 1
- specificity: 102
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 0
depth: 2147483647
previousIndex: 0
nextIndex: -1
- specificity: 102
selectorValues:
- Node
selectorTypes: 02000000
ruleIndex: 1
depth: 2147483647
previousIndex: -1
nextIndex: 3
- specificity: 102
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 1
depth: 2147483647
previousIndex: 2
nextIndex: -1
- specificity: 2
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 2
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 102
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 3
depth: 2147483647
previousIndex: -1
nextIndex: 6
- specificity: 102
selectorValues:
- connector
selectorTypes: 06000000
ruleIndex: 3
depth: 2147483647
previousIndex: 5
nextIndex: -1
- specificity: 112
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 4
depth: 2147483647
previousIndex: -1
nextIndex: 8
- specificity: 112
selectorValues:
- connector
- anchorHighlight
selectorTypes: 0600000003000000
ruleIndex: 4
depth: 2147483647
previousIndex: 7
nextIndex: -1
- specificity: 102
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 5
depth: 2147483647
previousIndex: -1
nextIndex: 10
- specificity: 102
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 5
depth: 2147483647
previousIndex: 9
nextIndex: -1
- specificity: 213
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 6
depth: 2147483647
previousIndex: -1
nextIndex: 12
- specificity: 213
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 6
depth: 2147483647
previousIndex: 11
nextIndex: 13
- specificity: 213
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 6
depth: 2147483647
previousIndex: 12
nextIndex: 14
- specificity: 213
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 6
depth: 2147483647
previousIndex: 13
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 7
depth: 2147483647
previousIndex: -1
nextIndex: 16
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 7
depth: 2147483647
previousIndex: 15
nextIndex: 17
- specificity: 113
selectorValues:
- connector
selectorTypes: 06000000
ruleIndex: 7
depth: 2147483647
previousIndex: 16
nextIndex: -1
- specificity: 12
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 8
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 112
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 9
depth: 2147483647
previousIndex: -1
nextIndex: 20
- specificity: 112
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 9
depth: 2147483647
previousIndex: 19
nextIndex: -1
- specificity: 112
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 10
depth: 2147483647
previousIndex: -1
nextIndex: 22
- specificity: 112
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 10
depth: 2147483647
previousIndex: 21
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 11
depth: 2147483647
previousIndex: -1
nextIndex: 24
- specificity: 113
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 11
depth: 2147483647
previousIndex: 23
nextIndex: 25
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 11
depth: 2147483647
previousIndex: 24
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- horizontal
selectorTypes: 0200000003000000
ruleIndex: 12
depth: 2147483647
previousIndex: -1
nextIndex: 27
- specificity: 113
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 12
depth: 2147483647
previousIndex: 26
nextIndex: 28
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 12
depth: 2147483647
previousIndex: 27
nextIndex: -1
- specificity: 112
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 13
depth: 2147483647
previousIndex: -1
nextIndex: 30
- specificity: 112
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 13
depth: 2147483647
previousIndex: 29
nextIndex: -1
- specificity: 112
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 14
depth: 2147483647
previousIndex: -1
nextIndex: 32
- specificity: 112
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 14
depth: 2147483647
previousIndex: 31
nextIndex: -1
- specificity: 13
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 15
depth: 2147483647
previousIndex: -1
nextIndex: 34
- specificity: 13
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 15
depth: 2147483647
previousIndex: 33
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 16
depth: 2147483647
previousIndex: -1
nextIndex: 36
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 16
depth: 2147483647
previousIndex: 35
nextIndex: 37
- specificity: 113
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 16
depth: 2147483647
previousIndex: 36
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 17
depth: 2147483647
previousIndex: -1
nextIndex: 39
- specificity: 113
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 17
depth: 2147483647
previousIndex: 38
nextIndex: 40
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 17
depth: 2147483647
previousIndex: 39
nextIndex: -1
- specificity: 113
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 18
depth: 2147483647
previousIndex: -1
nextIndex: 42
- specificity: 113
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 18
depth: 2147483647
previousIndex: 41
nextIndex: 43
- specificity: 113
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 18
depth: 2147483647
previousIndex: 42
nextIndex: -1
- specificity: 12
selectorValues:
- Node
- vertical
selectorTypes: 0200000003000000
ruleIndex: 19
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 2
selectorValues:
- NodesContentView
selectorTypes: 02000000
ruleIndex: 20
depth: 2147483647
previousIndex: -1
nextIndex: -1
rules:
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 0
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 1
- type: 1
propertyID: 28
valueIndex: 0
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 1
valueIndex: 2
- type: 0
propertyID: 3
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 41
valueIndex: 0
- type: 3
propertyID: 42
valueIndex: 1
- type: 0
propertyID: 24
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 41
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 40
valueIndex: 3
- type: 0
propertyID: 23
valueIndex: 5
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 32
valueIndex: 1
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 0
valueIndex: 6
- type: 0
propertyID: 2
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 1
valueIndex: 8
- type: 3
propertyID: 41
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 1
valueIndex: 9
- type: 3
propertyID: 41
valueIndex: 5
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 10
- type: 1
propertyID: 26
valueIndex: 5
- type: 1
propertyID: 28
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 11
- type: 1
propertyID: 26
valueIndex: 7
- type: 1
propertyID: 28
valueIndex: 8
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 31
valueIndex: 9
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 32
valueIndex: 10
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 11
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 12
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 24
valueIndex: 12
- type: 3
propertyID: 42
valueIndex: 6
- type: 3
propertyID: 41
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles: []
customPropertyNames:
- grid-background-color
- line-color
- thick-line-color
- spacing
- thick-lines
customPropertyHandles:
- type: 3
propertyID: 43
valueIndex: 8
- type: 3
propertyID: 43
valueIndex: 9
- type: 3
propertyID: 43
valueIndex: 10
- type: 1
propertyID: 43
valueIndex: 13
- type: 1
propertyID: 43
valueIndex: 14
floats:
- 1
- 1
- 5
- 5
- 4
- 1
- 5
- 5
- 15
- 15
- 1
- 1
- 1
ints: 020000000500000002000000020000000300000002000000010000000200000001000000020000000400000000000000010000004b0000000a000000
colors: []
colors:
- {r: 1, g: 1, b: 0, a: 1}
- {r: 1, g: 1, b: 0, a: 1}
- {r: 0, g: 0, b: 1, a: 1}
- {r: 1, g: 1, b: 1, a: 1}
- {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
- {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
- {r: 0.8, g: 0.8, b: 0.8, a: 1}
- {r: 0.39215687, g: 0.39215687, b: 0.39215687, a: 0.5019608}
- {r: 0.2509804, g: 0.2784314, b: 0.28627452, a: 1}
- {r: 0.1254902, g: 0.16078432, b: 0.24705882, a: 1}
- {r: 0.011764706, g: 0.047058824, b: 0.13333334, a: 1}
strings: []
assets: []

246
MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/SimpleContentView.uss.imported.asset


m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 11997, guid: 0000000000000000e000000000000000, type: 0}
m_Name: SimpleContentView.uss.imported
m_Name:
matchers: []
rules: []
floats: []
ints:
matchers:
- specificity: 2
selectorValues:
- WWWImage
selectorTypes: 02000000
ruleIndex: 0
depth: 2147483647
previousIndex: -1
nextIndex: 1
- specificity: 2
selectorValues:
- '*'
selectorTypes: 01000000
ruleIndex: 0
depth: 1
previousIndex: 0
nextIndex: -1
- specificity: 3
selectorValues:
- MiniMap
selectorTypes: 02000000
ruleIndex: 1
depth: 2147483647
previousIndex: -1
nextIndex: 3
- specificity: 3
selectorValues:
- Label
selectorTypes: 02000000
ruleIndex: 1
depth: 2147483647
previousIndex: 2
nextIndex: -1
- specificity: 12
selectorValues:
- MiniMap
- graphElement
selectorTypes: 0200000003000000
ruleIndex: 2
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 3
selectorValues:
- MiniMap
selectorTypes: 02000000
ruleIndex: 3
depth: 2147483647
previousIndex: -1
nextIndex: 6
- specificity: 3
selectorValues:
- Label
selectorTypes: 02000000
ruleIndex: 3
depth: 2147483647
previousIndex: 5
nextIndex: -1
- specificity: 12
selectorValues:
- MiniMap
- anchored
selectorTypes: 0200000003000000
ruleIndex: 4
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 13
selectorValues:
- MiniMap
- anchored
selectorTypes: 0200000003000000
ruleIndex: 5
depth: 2147483647
previousIndex: -1
nextIndex: 9
- specificity: 13
selectorValues:
- Label
selectorTypes: 02000000
ruleIndex: 5
depth: 2147483647
previousIndex: 8
nextIndex: -1
- specificity: 12
selectorValues:
- InvisibleBorderContainer
- graphElement
selectorTypes: 0200000003000000
ruleIndex: 6
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 22
selectorValues:
- InvisibleBorderContainer
- graphElement
- selected
selectorTypes: 020000000300000003000000
ruleIndex: 7
depth: 2147483647
previousIndex: -1
nextIndex: -1
rules:
- builtinPropertyHandles:
- type: 0
propertyID: 1
valueIndex: 0
- type: 0
propertyID: 17
valueIndex: 1
- type: 0
propertyID: 18
valueIndex: 2
- type: 3
propertyID: 41
valueIndex: 0
- type: 0
propertyID: 25
valueIndex: 3
- type: 1
propertyID: 32
valueIndex: 0
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 12
valueIndex: 1
- type: 0
propertyID: 14
valueIndex: 4
- type: 0
propertyID: 13
valueIndex: 5
- type: 0
propertyID: 15
valueIndex: 6
- type: 0
propertyID: 18
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 42
valueIndex: 1
- type: 3
propertyID: 41
valueIndex: 2
- type: 1
propertyID: 12
valueIndex: 2
- type: 0
propertyID: 5
valueIndex: 8
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 33
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 13
valueIndex: 9
- type: 0
propertyID: 16
valueIndex: 10
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 40
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 41
valueIndex: 4
- type: 3
propertyID: 42
valueIndex: 5
- type: 0
propertyID: 8
valueIndex: 11
- type: 0
propertyID: 9
valueIndex: 12
- type: 0
propertyID: 10
valueIndex: 13
- type: 0
propertyID: 11
valueIndex: 14
- type: 0
propertyID: 24
valueIndex: 15
- type: 0
propertyID: 25
valueIndex: 16
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 42
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
floats:
- 15
- 200
- 200
- 25
- 0
- 0
- 0
- 16
- 20
- 20
- 20
- 20
- 20
- 20
- 20
- 20
- 0
ints: 04000000010000000100000000000000
colors: []
colors:
- {r: 0.8, g: 0.8, b: 0.8, a: 1}
- {r: 0.8, g: 0.8, b: 0.8, a: 1}
- {r: 0.39215687, g: 0.39215687, b: 0.39215687, a: 0.5019608}
- {r: 0.6666667, g: 0.6666667, b: 0, a: 1}
- {r: 0, g: 1, b: 0, a: 1}
- {r: 0, g: 0, b: 0, a: 1}
- {r: 0, g: 0, b: 1, a: 1}
strings: []
assets: []

74
MaterialGraphProject/Assets/NewUI/Editor/Views/GraphView.uss.imported.asset


m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 11997, guid: 0000000000000000e000000000000000, type: 0}
m_Name: GraphView.uss.imported
m_Name:
matchers: []
rules: []
floats: []
ints:
matchers:
- specificity: 11
selectorValues:
- graphElement
selectorTypes: 03000000
ruleIndex: 0
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 21
selectorValues:
- graphElement
- selected
selectorTypes: 0300000003000000
ruleIndex: 1
depth: 2147483647
previousIndex: -1
nextIndex: -1
rules:
- builtinPropertyHandles:
- type: 1
propertyID: 32
valueIndex: 0
- type: 3
propertyID: 40
valueIndex: 0
- type: 0
propertyID: 8
valueIndex: 0
- type: 0
propertyID: 9
valueIndex: 1
- type: 0
propertyID: 10
valueIndex: 2
- type: 0
propertyID: 11
valueIndex: 3
- type: 0
propertyID: 24
valueIndex: 4
- type: 0
propertyID: 25
valueIndex: 5
- type: 3
propertyID: 41
valueIndex: 1
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 42
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
floats:
- 2
- 2
- 2
- 2
- 2
- 5
ints: 01000000
colors: []
colors:
- {r: 1, g: 1, b: 1, a: 1}
- {r: 0.2, g: 0.2, b: 0.2, a: 1}
- {r: 1, g: 1, b: 0, a: 1}
strings: []
assets: []

619
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Styles/MaterialGraph.uss.imported.asset


m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 11997, guid: 0000000000000000e000000000000000, type: 0}
m_Name: MaterialGraph.uss.imported
m_Name:
matchers: []
rules: []
floats: []
ints:
matchers:
- specificity: 2
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 0
depth: 2147483647
previousIndex: -1
nextIndex: -1
- specificity: 202
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 1
depth: 2147483647
previousIndex: -1
nextIndex: 2
- specificity: 202
selectorValues:
- header
selectorTypes: 06000000
ruleIndex: 1
depth: 2147483647
previousIndex: 1
nextIndex: 3
- specificity: 202
selectorValues:
- title
selectorTypes: 06000000
ruleIndex: 1
depth: 2147483647
previousIndex: 2
nextIndex: -1
- specificity: 102
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 2
depth: 2147483647
previousIndex: -1
nextIndex: 5
- specificity: 102
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 2
depth: 2147483647
previousIndex: 4
nextIndex: -1
- specificity: 202
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 3
depth: 2147483647
previousIndex: -1
nextIndex: 7
- specificity: 202
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 3
depth: 2147483647
previousIndex: 6
nextIndex: 8
- specificity: 202
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 3
depth: 2147483647
previousIndex: 7
nextIndex: -1
- specificity: 202
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 4
depth: 2147483647
previousIndex: -1
nextIndex: 10
- specificity: 202
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 4
depth: 2147483647
previousIndex: 9
nextIndex: 11
- specificity: 202
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 4
depth: 2147483647
previousIndex: 10
nextIndex: -1
- specificity: 103
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 5
depth: 2147483647
previousIndex: -1
nextIndex: 13
- specificity: 103
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 5
depth: 2147483647
previousIndex: 12
nextIndex: 14
- specificity: 103
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 5
depth: 2147483647
previousIndex: 13
nextIndex: -1
- specificity: 203
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 6
depth: 2147483647
previousIndex: -1
nextIndex: 16
- specificity: 203
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 6
depth: 2147483647
previousIndex: 15
nextIndex: 17
- specificity: 203
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 6
depth: 2147483647
previousIndex: 16
nextIndex: 18
- specificity: 203
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 6
depth: 2147483647
previousIndex: 17
nextIndex: -1
- specificity: 203
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 7
depth: 2147483647
previousIndex: -1
nextIndex: 20
- specificity: 203
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 7
depth: 2147483647
previousIndex: 19
nextIndex: 21
- specificity: 203
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 7
depth: 2147483647
previousIndex: 20
nextIndex: 22
- specificity: 203
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 7
depth: 2147483647
previousIndex: 21
nextIndex: -1
- specificity: 102
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 8
depth: 2147483647
previousIndex: -1
nextIndex: 24
- specificity: 102
selectorValues:
- connector
selectorTypes: 06000000
ruleIndex: 8
depth: 2147483647
previousIndex: 23
nextIndex: -1
- specificity: 112
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 9
depth: 2147483647
previousIndex: -1
nextIndex: 26
- specificity: 112
selectorValues:
- connector
- anchorHighlight
selectorTypes: 0600000003000000
ruleIndex: 9
depth: 2147483647
previousIndex: 25
nextIndex: -1
- specificity: 203
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 10
depth: 2147483647
previousIndex: -1
nextIndex: 28
- specificity: 203
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 10
depth: 2147483647
previousIndex: 27
nextIndex: 29
- specificity: 203
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 10
depth: 2147483647
previousIndex: 28
nextIndex: 30
- specificity: 203
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 10
depth: 2147483647
previousIndex: 29
nextIndex: -1
- specificity: 303
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 11
depth: 2147483647
previousIndex: -1
nextIndex: 32
- specificity: 303
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 11
depth: 2147483647
previousIndex: 31
nextIndex: 33
- specificity: 303
selectorValues:
- input
selectorTypes: 06000000
ruleIndex: 11
depth: 2147483647
previousIndex: 32
nextIndex: 34
- specificity: 303
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 11
depth: 2147483647
previousIndex: 33
nextIndex: 35
- specificity: 303
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 11
depth: 2147483647
previousIndex: 34
nextIndex: -1
- specificity: 303
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 12
depth: 2147483647
previousIndex: -1
nextIndex: 37
- specificity: 303
selectorValues:
- slots
selectorTypes: 06000000
ruleIndex: 12
depth: 2147483647
previousIndex: 36
nextIndex: 38
- specificity: 303
selectorValues:
- output
selectorTypes: 06000000
ruleIndex: 12
depth: 2147483647
previousIndex: 37
nextIndex: 39
- specificity: 303
selectorValues:
- NodeAnchor
selectorTypes: 02000000
ruleIndex: 12
depth: 2147483647
previousIndex: 38
nextIndex: 40
- specificity: 303
selectorValues:
- type
selectorTypes: 06000000
ruleIndex: 12
depth: 2147483647
previousIndex: 39
nextIndex: -1
- specificity: 102
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 13
depth: 2147483647
previousIndex: -1
nextIndex: 42
- specificity: 102
selectorValues:
- controls
selectorTypes: 06000000
ruleIndex: 13
depth: 2147483647
previousIndex: 41
nextIndex: -1
- specificity: 202
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 14
depth: 2147483647
previousIndex: -1
nextIndex: 44
- specificity: 202
selectorValues:
- controls
selectorTypes: 06000000
ruleIndex: 14
depth: 2147483647
previousIndex: 43
nextIndex: 45
- specificity: 202
selectorValues:
- element
selectorTypes: 06000000
ruleIndex: 14
depth: 2147483647
previousIndex: 44
nextIndex: -1
- specificity: 102
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 15
depth: 2147483647
previousIndex: -1
nextIndex: 47
- specificity: 102
selectorValues:
- preview
selectorTypes: 06000000
ruleIndex: 15
depth: 2147483647
previousIndex: 46
nextIndex: -1
- specificity: 202
selectorValues:
- MaterialNodeDrawer
selectorTypes: 02000000
ruleIndex: 16
depth: 2147483647
previousIndex: -1
nextIndex: 49
- specificity: 202
selectorValues:
- preview
selectorTypes: 06000000
ruleIndex: 16
depth: 2147483647
previousIndex: 48
nextIndex: 50
- specificity: 202
selectorValues:
- image
selectorTypes: 06000000
ruleIndex: 16
depth: 2147483647
previousIndex: 49
nextIndex: -1
- specificity: 2
selectorValues:
- MaterialGraphView
selectorTypes: 02000000
ruleIndex: 17
depth: 2147483647
previousIndex: -1
nextIndex: -1
rules:
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 0
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 40
valueIndex: 0
- type: 0
propertyID: 17
valueIndex: 0
- type: 1
propertyID: 32
valueIndex: 1
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 1
valueIndex: 1
- type: 1
propertyID: 26
valueIndex: 2
- type: 3
propertyID: 41
valueIndex: 1
- type: 0
propertyID: 17
valueIndex: 2
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 23
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 31
valueIndex: 3
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 5
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 41
valueIndex: 2
- type: 3
propertyID: 42
valueIndex: 3
- type: 0
propertyID: 24
valueIndex: 5
- type: 0
propertyID: 0
valueIndex: 6
- type: 0
propertyID: 2
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 41
valueIndex: 4
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 3
propertyID: 40
valueIndex: 5
- type: 0
propertyID: 23
valueIndex: 8
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 32
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 32
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 8
- type: 0
propertyID: 7
valueIndex: 9
- type: 3
propertyID: 41
valueIndex: 6
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 9
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 1
propertyID: 26
valueIndex: 10
- type: 3
propertyID: 41
valueIndex: 7
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles:
- type: 0
propertyID: 18
valueIndex: 10
- type: 0
propertyID: 17
valueIndex: 11
customPropertyNames: []
customPropertyHandles: []
- builtinPropertyHandles: []
customPropertyNames:
- grid-background-color
- line-color
- thick-line-color
- spacing
- thick-lines
customPropertyHandles:
- type: 3
propertyID: 43
valueIndex: 8
- type: 3
propertyID: 43
valueIndex: 9
- type: 3
propertyID: 43
valueIndex: 10
- type: 1
propertyID: 43
valueIndex: 11
- type: 1
propertyID: 43
valueIndex: 12
floats:
- 200
- 15
- 200
- 1
- 1
- 4
- 5
- 5
- 1
- 2
- 200
- 200
ints: 00000000040000000200000002000000020000000300000003000000050000000000000000000000000000004b0000000a000000
colors: []
colors:
- {r: 1, g: 1, b: 1, a: 1}
- {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
- {r: 1, g: 1, b: 0, a: 1}
- {r: 1, g: 1, b: 0, a: 1}
- {r: 0, g: 0, b: 1, a: 1}
- {r: 1, g: 1, b: 1, a: 1}
- {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
- {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
- {r: 0.2509804, g: 0.2784314, b: 0.28627452, a: 1}
- {r: 0.1254902, g: 0.16078432, b: 0.24705882, a: 1}
- {r: 0.011764706, g: 0.047058824, b: 0.13333334, a: 1}
strings: []
assets: []

3
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/AbstractSurfaceMasterNode.cs


if (activeNodeList.Any(x => x is IRequiresViewDirection))
{
shaderInputVisitor.AddShaderChunk("float3 viewDir;", true);
shaderBody.AddShaderChunk("fixed3 worldViewDir = IN.viewDir;", true);
if (activeNodeList.Any(x => x is IRequiresWorldPosition))
{
shaderInputVisitor.AddShaderChunk("float3 worldPos;", true);

4
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/ViewDirectionNode.cs


namespace UnityEngine.MaterialGraph
{
interface IRequiresViewDirection
interface IRequiresViewDirection : IRequiresWorldPosition
{}
[Title("Input/View Direction Node")]

public override string GetVariableNameForSlot(int slotId)
{
return "IN.viewDir";
return "worldViewDir";
}
}
}

5
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Util/ShaderGenerator.cs


vertexShaderBlock.AddShaderChunk("float4 screenPos = ComputeScreenPos(UnityObjectToClipPos(v.vertex));", true);
vertexShaderBlock.AddShaderChunk("float3 worldNormal = UnityObjectToWorldNormal(v.normal);", true);
if (activeNodeList.Any(x => x is IRequiresWorldPosition))
{
shaderInputVisitor.AddShaderChunk("float3 worldPos : TEXCOORD2;", true);

if (activeNodeList.Any(x => x is IRequiresViewDirection))
{
shaderInputVisitor.AddShaderChunk("float3 viewDir : TEXCOORD1;", true);
vertexShaderBlock.AddShaderChunk("o.viewDir = viewDir;", true);
shaderBodyVisitor.AddShaderChunk("fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(IN.worldPos));", true);
}
if (activeNodeList.Any(x => x is IRequiresScreenPosition))

正在加载...
取消
保存