A game about forced loneliness, made by TACStudios
1using System;
2using System.Collections.Generic;
3
4namespace UnityEditor.ShaderGraph
5{
6 internal struct ShaderDependency : IComparable<ShaderDependency>
7 {
8 public string dependencyName;
9 public string shaderName;
10
11 public int CompareTo(ShaderDependency other)
12 {
13 int result = string.CompareOrdinal(dependencyName, other.dependencyName);
14 if (result == 0)
15 result = string.CompareOrdinal(shaderName, other.shaderName);
16 return result;
17 }
18 }
19
20 internal struct ShaderCustomEditor : IComparable<ShaderCustomEditor>
21 {
22 public string shaderGUI;
23 public string renderPipelineAssetType;
24
25 public int CompareTo(ShaderCustomEditor other)
26 {
27 int result = string.CompareOrdinal(renderPipelineAssetType, other.renderPipelineAssetType);
28 if (result == 0)
29 result = string.CompareOrdinal(shaderGUI, other.shaderGUI);
30 return result;
31 }
32 }
33
34 [GenerationAPI]
35 internal struct SubShaderDescriptor
36 {
37 public string pipelineTag;
38 public string IgnoreProjector;
39 public string customTags;
40 public string renderType;
41 public string PreviewType;
42 public string CanUseSpriteAtlas;
43 public string renderQueue;
44 public string disableBatchingTag;
45 public bool generatesPreview;
46 public PassCollection passes;
47 public List<string> usePassList;
48
49 // if set, this subshader is intended to be placed not in the primary shader result, but in an additional shader.
50 // the name of the additional shader is specified by this string,
51 // with "{Name}" replaced by the name of the primary shader
52 public string additionalShaderID;
53
54 // these are per-shader settings, that get passed up to the shader level
55 // and merged with the same settings from other subshaders
56 public List<ShaderDependency> shaderDependencies;
57
58 // if null, it will use the global custom editors provided via TargetSetupContext.AddCustomEditorForRenderPipeline
59 public List<ShaderCustomEditor> shaderCustomEditors;
60
61 // if null, it will use the global defaultShaderGUI provided via TargetSetupContext.SetDefaultShaderGUI
62 // NOTE: only Builtin Target currently uses this value
63 public string shaderCustomEditor;
64
65 // if null, the default shadergraph fallback shader is used
66 public string shaderFallback;
67 }
68}