A game about forced loneliness, made by TACStudios
1using System.Reflection;
2
3namespace UnityEditor.ShaderGraph
4{
5 [Title("Math", "Interpolation", "Smoothstep")]
6 class SmoothstepNode : CodeFunctionNode
7 {
8 public SmoothstepNode()
9 {
10 name = "Smoothstep";
11 synonyms = new string[] { "curve" };
12 }
13
14 protected override MethodInfo GetFunctionToConvert()
15 {
16 return GetType().GetMethod("Unity_Smoothstep", BindingFlags.Static | BindingFlags.NonPublic);
17 }
18
19 static string Unity_Smoothstep(
20 [Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector Edge1,
21 [Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge2,
22 [Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
23 [Slot(3, Binding.None)] out DynamicDimensionVector Out)
24 {
25 return
26@"
27{
28 Out = smoothstep(Edge1, Edge2, In);
29}";
30 }
31 }
32}