浏览代码

Merge pull request #232 from keijiro/step-args

Easy-to-understand slot names for Step node.
/main
GitHub 7 年前
当前提交
e6be5cc8
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/SmoothstepNode.cs
  2. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Round/StepNode.cs

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/SmoothstepNode.cs


}
static string Unity_Smoothstep(
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector T,
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector Edge1,
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge2,
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
Out = smoothstep(A, B, T);
Out = smoothstep(Edge1, Edge2, In);
}";
}
}

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Round/StepNode.cs


}
static string Unity_Step(
[Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector A,
[Slot(1, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector B,
[Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge,
[Slot(1, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
Out = step(A, B);
Out = step(Edge, In);
}
";
}
正在加载...
取消
保存