A game about forced loneliness, made by TACStudios
1using System; 2namespace UnityEditor.ShaderGraph 3{ 4 internal class BlockFieldDescriptor : FieldDescriptor 5 { 6 public string displayName { get; } 7 public IControl control { get; } 8 public ShaderStage shaderStage { get; } 9 public bool isHidden { get; } 10 public bool isUnknown { get; } 11 public bool isCustom { get; } 12 13 internal string path { get; set; } 14 15 public BlockFieldDescriptor(string tag, string referenceName, string define, IControl control, ShaderStage shaderStage, bool isHidden = false, bool isUnknown = false, bool isCustom = false) 16 : base(tag, referenceName, define) 17 { 18 this.displayName = referenceName; 19 this.control = control; 20 this.shaderStage = shaderStage; 21 this.isHidden = isHidden; 22 this.isUnknown = isUnknown; 23 this.isCustom = isCustom; 24 } 25 26 public BlockFieldDescriptor(string tag, string referenceName, string displayName, string define, IControl control, ShaderStage shaderStage, bool isHidden = false, bool isUnknown = false, bool isCustom = false) 27 : base(tag, referenceName, define) 28 { 29 this.displayName = displayName; 30 this.control = control; 31 this.shaderStage = shaderStage; 32 this.isHidden = isHidden; 33 this.isUnknown = isUnknown; 34 this.isCustom = isCustom; 35 } 36 } 37 38 // TODO: This exposes the MaterialSlot API 39 // TODO: This needs to be removed but is currently required by HDRP for DiffusionProfileInputMaterialSlot 40 internal class CustomSlotBlockFieldDescriptor : BlockFieldDescriptor 41 { 42 public Func<MaterialSlot> createSlot; 43 44 public CustomSlotBlockFieldDescriptor(string tag, string referenceName, string define, Func<MaterialSlot> createSlot) 45 : base(tag, referenceName, define, null, ShaderStage.Fragment) 46 { 47 this.createSlot = createSlot; 48 } 49 50 public CustomSlotBlockFieldDescriptor(string tag, string referenceName, string displayName, string define, Func<MaterialSlot> createSlot) 51 : base(tag, referenceName, displayName, define, null, ShaderStage.Fragment) 52 { 53 this.createSlot = createSlot; 54 } 55 } 56}