A game about forced loneliness, made by TACStudios
at master 1.1 kB view raw
1using System.Reflection; 2using UnityEngine; 3 4namespace UnityEditor.ShaderGraph 5{ 6 [Title("Input", "Lighting", "Reflection Probe")] 7 class ReflectionProbeNode : CodeFunctionNode 8 { 9 public ReflectionProbeNode() 10 { 11 name = "Reflection Probe"; 12 synonyms = new string[] { "light probe", "cube map", "environment" }; 13 } 14 15 public override bool hasPreview { get { return false; } } 16 17 protected override MethodInfo GetFunctionToConvert() 18 { 19 return GetType().GetMethod("Unity_ReflectionProbe", BindingFlags.Static | BindingFlags.NonPublic); 20 } 21 22 static string Unity_ReflectionProbe( 23 [Slot(0, Binding.ObjectSpaceViewDirection)] Vector3 ViewDir, 24 [Slot(1, Binding.ObjectSpaceNormal)] Vector3 Normal, 25 [Slot(2, Binding.None)] Vector1 LOD, 26 [Slot(3, Binding.None)] out Vector3 Out) 27 { 28 Out = Vector3.one; 29 return 30@" 31{ 32 Out = SHADERGRAPH_REFLECTION_PROBE(ViewDir, Normal, LOD); 33} 34"; 35 } 36 } 37}