A game about forced loneliness, made by TACStudios
at master 31 lines 733 B view raw
1using System.Reflection; 2 3namespace UnityEditor.ShaderGraph 4{ 5 [Title("Math", "Basic", "Power")] 6 class PowerNode : CodeFunctionNode 7 { 8 public PowerNode() 9 { 10 name = "Power"; 11 } 12 13 protected override MethodInfo GetFunctionToConvert() 14 { 15 return GetType().GetMethod("Unity_Power", BindingFlags.Static | BindingFlags.NonPublic); 16 } 17 18 static string Unity_Power( 19 [Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A, 20 [Slot(1, Binding.None, 2, 2, 2, 2)] DynamicDimensionVector B, 21 [Slot(2, Binding.None)] out DynamicDimensionVector Out) 22 { 23 return 24@" 25{ 26 Out = pow(A, B); 27} 28"; 29 } 30 } 31}