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