浏览代码

Fixes for subgraph, preview and property nodes

/main
Matt Dean 7 年前
当前提交
3f34639b
共有 3 个文件被更改,包括 7 次插入7 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Basic/PropertyNode.cs
  2. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/PreviewNode.cs
  3. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/SubGraphNode.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Basic/PropertyNode.cs


namespace UnityEditor.ShaderGraph
{
[Title("Property Node")]
[Title("Input", "Property")]
public class PropertyNode : AbstractMaterialNode, IGeneratesBodyCode, IOnAssetEnabled
{
private Guid m_PropertyGuid;

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/PreviewNode.cs


namespace UnityEditor.ShaderGraph
{
[Title("Preview Node")]
[Title("Utility", "Preview")]
public class PreviewNode : CodeFunctionNode
{
public override bool hasPreview { get { return true; } }

}
static string Unity_Preview(
[Slot(0, Binding.None)] DynamicDimensionVector input,
[Slot(1, Binding.None)] out DynamicDimensionVector output)
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
output = input;
Out = In;
}
";
}

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


namespace UnityEditor.ShaderGraph
{
[Title("Sub-graph", "Sub-graph Node")]
[Title("Utility", "Sub-graph")]
public class SubGraphNode : AbstractSubGraphNode
, IGeneratesBodyCode
, IOnAssetEnabled

public SubGraphNode()
{
name = "SubGraph";
name = "Sub-graph";
}
public void GenerateNodeCode(ShaderGenerator shaderBodyVisitor, GenerationMode generationMode)

正在加载...
取消
保存