浏览代码

Combine and Split node fixes

/main
Matt Dean 7 年前
当前提交
a6899bcf
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Channel/CombineNode.cs
  2. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Channel/SplitNode.cs

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Channel/CombineNode.cs


[Slot(1, Binding.None)] Vector1 G,
[Slot(2, Binding.None)] Vector1 B,
[Slot(3, Binding.None)] Vector1 A,
[Slot(4, Binding.None)] out Vector4 RGBA)
[Slot(4, Binding.None)] out Vector4 RGBA,
[Slot(5, Binding.None)] out Vector3 RGB,
[Slot(6, Binding.None)] out Vector2 RG)
RGB = Vector3.zero;
RG = Vector2.zero;
RGB = float3(R, G, B);
RG = float2(R, G);
}
";
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Channel/SplitNode.cs


[Title("Channel", "Split")]
public class SplitNode : AbstractMaterialNode, IGeneratesBodyCode
{
const string kInputSlotName = "Input";
const string kInputSlotName = "In";
const string kOutputSlotRName = "R";
const string kOutputSlotGName = "G";
const string kOutputSlotBName = "B";

正在加载...
取消
保存