A game about forced loneliness, made by TACStudios
1namespace UnityEditor.ShaderGraph
2{
3 [GenerationAPI]
4 internal class FieldDescriptor
5 {
6 // Default
7 public string tag { get; }
8 public string name { get; }
9 public string define { get; }
10 public string interpolation { get; }
11
12 // StructField
13 public string type { get; }
14 public int vectorCount { get; }
15 public string semantic { get; }
16 public string preprocessor { get; }
17 public StructFieldOptions subscriptOptions { get; }
18
19 public FieldDescriptor(string tag, string name, string define)
20 {
21 this.tag = tag;
22 this.name = name;
23 this.define = define;
24 }
25
26 public FieldDescriptor(string tag, string name, string define, ShaderValueType type,
27 string semantic = "", string preprocessor = "", StructFieldOptions subscriptOptions = StructFieldOptions.Static, string interpolation = "")
28 {
29 this.tag = tag;
30 this.name = name;
31 this.define = define;
32 this.type = type.ToShaderString();
33 this.vectorCount = type.GetVectorCount();
34 this.semantic = semantic;
35 this.preprocessor = preprocessor;
36 this.interpolation = interpolation;
37 this.subscriptOptions = subscriptOptions;
38 }
39
40 public FieldDescriptor(string tag, string name, string define, string type,
41 string semantic = "", string preprocessor = "", StructFieldOptions subscriptOptions = StructFieldOptions.Static, string interpolation = "")
42 {
43 this.tag = tag;
44 this.name = name;
45 this.define = define;
46 this.type = type;
47 this.vectorCount = 0;
48 this.semantic = semantic;
49 this.preprocessor = preprocessor;
50 this.interpolation = interpolation;
51 this.subscriptOptions = subscriptOptions;
52 }
53 }
54}