설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UniversalSixWaySubTarget.cs 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. using System;
  2. using UnityEngine;
  3. using UnityEditor.ShaderGraph;
  4. using UnityEngine.UIElements;
  5. using UnityEngine.Assertions;
  6. using UnityEngine.Rendering;
  7. using static UnityEditor.Rendering.Universal.ShaderGraph.SubShaderUtils;
  8. using UnityEngine.Rendering.Universal;
  9. using static Unity.Rendering.Universal.ShaderUtils;
  10. namespace UnityEditor.Rendering.Universal.ShaderGraph
  11. {
  12. sealed class UniversalSixWaySubTarget : UniversalSubTarget
  13. {
  14. static readonly GUID kSourceCodeGuid = new GUID("d6c78107b64145745805d963de80cc17"); // UniversalLitSubTarget.cs
  15. public override int latestVersion => 2;
  16. public UniversalSixWaySubTarget()
  17. {
  18. displayName = "Six-way Smoke Lit";
  19. }
  20. protected override ShaderID shaderID => ShaderID.SG_SixWaySmokeLit;
  21. public override bool IsActive() => true;
  22. [SerializeField]
  23. bool m_UseColorAbsorption = true;
  24. bool useColorAbsorption
  25. {
  26. get => m_UseColorAbsorption;
  27. set => m_UseColorAbsorption = value;
  28. }
  29. public override void Setup(ref TargetSetupContext context)
  30. {
  31. context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
  32. base.Setup(ref context);
  33. var universalRPType = typeof(UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset);
  34. if (!context.HasCustomEditorForRenderPipeline(universalRPType))
  35. {
  36. var gui = typeof(SixWayGUI);
  37. #if HAS_VFX_GRAPH
  38. if (TargetsVFX())
  39. gui = typeof(VFXSixWayGUI);
  40. #endif
  41. context.AddCustomEditorForRenderPipeline(gui.FullName, universalRPType);
  42. }
  43. // Process SubShaders
  44. context.AddSubShader(PostProcessSubShader(SubShaders.SixWaySubShader(target, target.renderType, target.renderQueue, target.disableBatching, useColorAbsorption)));
  45. }
  46. public override void ProcessPreviewMaterial(Material material)
  47. {
  48. if (target.allowMaterialOverride)
  49. {
  50. // copy our target's default settings into the material
  51. // (technically not necessary since we are always recreating the material from the shader each time,
  52. // which will pull over the defaults from the shader definition)
  53. // but if that ever changes, this will ensure the defaults are set
  54. material.SetFloat(Property.CastShadows, target.castShadows ? 1.0f : 0.0f);
  55. material.SetFloat(Property.ReceiveShadows, target.receiveShadows ? 1.0f : 0.0f);
  56. material.SetFloat(Property.SurfaceType, (float)target.surfaceType);
  57. material.SetFloat(Property.BlendMode, (float)target.alphaMode);
  58. material.SetFloat(Property.AlphaClip, target.alphaClip ? 1.0f : 0.0f);
  59. material.SetFloat(Property.CullMode, (int)target.renderFace);
  60. material.SetFloat(Property.ZWriteControl, (float)target.zWriteControl);
  61. material.SetFloat(Property.ZTest, (float)target.zTestMode);
  62. material.SetFloat(SixWayProperties.UseColorAbsorption, useColorAbsorption ? 1.0f : 0.0f );
  63. }
  64. // We always need these properties regardless of whether the material is allowed to override
  65. // Queue control & offset enable correct automatic render queue behavior
  66. // Control == 0 is automatic, 1 is user-specified render queue
  67. material.SetFloat(Property.QueueOffset, 0.0f);
  68. material.SetFloat(Property.QueueControl, (float)BaseShaderGUI.QueueControl.Auto);
  69. // call the full unlit material setup function
  70. ShaderGraphLitGUI.UpdateMaterial(material, MaterialUpdateType.CreatedNewMaterial);
  71. bool useColorAbsorptionValue = false;
  72. if (material.HasProperty(SixWayProperties.UseColorAbsorption))
  73. useColorAbsorptionValue = material.GetFloat(SixWayProperties.UseColorAbsorption) > 0.0f;
  74. CoreUtils.SetKeyword(material, "_SIX_WAY_COLOR_ABSORPTION", useColorAbsorptionValue);
  75. }
  76. public override void GetFields(ref TargetFieldContext context)
  77. {
  78. base.GetFields(ref context);
  79. bool containsNormalDescriptor = false;
  80. foreach (var block in context.blocks)
  81. {
  82. if (Equals(block.descriptor, BlockFields.SurfaceDescription.NormalOS) ||
  83. Equals(block.descriptor, BlockFields.SurfaceDescription.NormalTS) ||
  84. Equals(block.descriptor, BlockFields.SurfaceDescription.NormalWS))
  85. {
  86. containsNormalDescriptor = true;
  87. break;
  88. }
  89. }
  90. context.AddField(UniversalFields.Normal, containsNormalDescriptor);
  91. }
  92. public struct Varyings
  93. {
  94. public static string name = "Varyings";
  95. public static FieldDescriptor diffuseGIData0 = new FieldDescriptor(Varyings.name, "diffuseGIData0",
  96. "VARYINGS_NEED_SIX_WAY_DIFFUSE_GI_DATA", ShaderValueType.Float4 ,subscriptOptions: StructFieldOptions.Optional);
  97. public static FieldDescriptor diffuseGIData1 = new FieldDescriptor(Varyings.name, "diffuseGIData1",
  98. "VARYINGS_NEED_SIX_WAY_DIFFUSE_GI_DATA", ShaderValueType.Float4 ,subscriptOptions: StructFieldOptions.Optional);
  99. public static FieldDescriptor diffuseGIData2 = new FieldDescriptor(Varyings.name, "diffuseGIData2",
  100. "VARYINGS_NEED_SIX_WAY_DIFFUSE_GI_DATA", ShaderValueType.Float4, subscriptOptions: StructFieldOptions.Optional);
  101. }
  102. public override void GetActiveBlocks(ref TargetActiveBlockContext context)
  103. {
  104. context.AddBlock(BlockFields.SurfaceDescription.Emission);
  105. context.AddBlock(BlockFields.SurfaceDescription.Occlusion);
  106. context.AddBlock(BlockFields.SurfaceDescription.MapRightTopBack);
  107. context.AddBlock(BlockFields.SurfaceDescription.MapLeftBottomFront);
  108. context.AddBlock(BlockFields.SurfaceDescription.AbsorptionStrength, useColorAbsorption || target.allowMaterialOverride);
  109. // when the surface options are material controlled, we must show all of these blocks
  110. // when target controlled, we can cull the unnecessary blocks
  111. context.AddBlock(BlockFields.SurfaceDescription.Alpha, (target.surfaceType == SurfaceType.Transparent || target.alphaClip) || target.allowMaterialOverride);
  112. context.AddBlock(BlockFields.SurfaceDescription.AlphaClipThreshold, (target.alphaClip) || target.allowMaterialOverride);
  113. }
  114. public override void CollectShaderProperties(PropertyCollector collector, GenerationMode generationMode)
  115. {
  116. // if using material control, add the material property to control workflow mode
  117. if (target.allowMaterialOverride)
  118. {
  119. collector.AddFloatProperty(Property.CastShadows, target.castShadows ? 1.0f : 0.0f);
  120. collector.AddToggleProperty(Property.ReceiveShadows, target.receiveShadows);
  121. // setup properties using the defaults
  122. collector.AddFloatProperty(Property.SurfaceType, (float)target.surfaceType);
  123. collector.AddFloatProperty(Property.BlendMode, (float)target.alphaMode);
  124. collector.AddFloatProperty(Property.AlphaClip, target.alphaClip ? 1.0f : 0.0f);
  125. collector.AddFloatProperty(Property.SrcBlend, 1.0f); // always set by material inspector, ok to have incorrect values here
  126. collector.AddFloatProperty(Property.DstBlend, 0.0f); // always set by material inspector, ok to have incorrect values here
  127. collector.AddToggleProperty(Property.ZWrite, (target.surfaceType == SurfaceType.Opaque));
  128. collector.AddFloatProperty(Property.ZWriteControl, (float)target.zWriteControl);
  129. collector.AddFloatProperty(Property.ZTest, (float)target.zTestMode); // ztest mode is designed to directly pass as ztest
  130. collector.AddFloatProperty(Property.CullMode, (float)target.renderFace); // render face enum is designed to directly pass as a cull mode
  131. bool enableAlphaToMask = (target.alphaClip && (target.surfaceType == SurfaceType.Opaque));
  132. collector.AddFloatProperty(Property.AlphaToMask, enableAlphaToMask ? 1.0f : 0.0f);
  133. collector.AddToggleProperty(SixWayProperties.UseColorAbsorption, useColorAbsorption);
  134. }
  135. // We always need these properties regardless of whether the material is allowed to override other shader properties.
  136. // Queue control & offset enable correct automatic render queue behavior. Control == 0 is automatic, 1 is user-specified.
  137. // We initialize queue control to -1 to indicate to UpdateMaterial that it needs to initialize it properly on the material.
  138. collector.AddFloatProperty(Property.QueueOffset, 0.0f);
  139. collector.AddFloatProperty(Property.QueueControl, -1.0f);
  140. }
  141. public override void GetPropertiesGUI(ref TargetPropertyGUIContext context, Action onChange, Action<String> registerUndo)
  142. {
  143. var universalTarget = (target as UniversalTarget);
  144. universalTarget.AddDefaultMaterialOverrideGUI(ref context, onChange, registerUndo);
  145. universalTarget.AddDefaultSurfacePropertiesGUI(ref context, onChange, registerUndo, showReceiveShadows: true);
  146. context.AddProperty("Use Color Absorption", new Toggle() { value = useColorAbsorption }, (evt) =>
  147. {
  148. if (Equals(useColorAbsorption, evt.newValue))
  149. return;
  150. registerUndo("Change Use Color Absorption");
  151. useColorAbsorption = evt.newValue;
  152. onChange();
  153. });
  154. }
  155. protected override int ComputeMaterialNeedsUpdateHash()
  156. {
  157. int hash = base.ComputeMaterialNeedsUpdateHash();
  158. hash = hash * 23 + target.allowMaterialOverride.GetHashCode();
  159. return hash;
  160. }
  161. #region SubShader
  162. static class SubShaders
  163. {
  164. const string kSixWayMaterialTypeTag = "\"UniversalMaterialType\" = \"SixWayLit\"";
  165. public static SubShaderDescriptor SixWaySubShader(UniversalTarget target, string renderType, string renderQueue, string disableBatchingTag, bool useColorAbsorption)
  166. {
  167. SubShaderDescriptor result = new SubShaderDescriptor()
  168. {
  169. pipelineTag = UniversalTarget.kPipelineTag,
  170. customTags = kSixWayMaterialTypeTag,
  171. renderType = renderType,
  172. renderQueue = renderQueue,
  173. disableBatchingTag = disableBatchingTag,
  174. generatesPreview = true,
  175. passes = new PassCollection()
  176. };
  177. result.passes.Add(SixWayPasses.ForwardOnly(target, CoreBlockMasks.Vertex, SixWayBlockMasks.FragmentLit, CorePragmas.Forward, SixWayKeywords.Forward, useColorAbsorption));
  178. // cull the shadowcaster pass if we know it will never be used
  179. if (target.castShadows || target.allowMaterialOverride)
  180. result.passes.Add(PassVariant(CorePasses.ShadowCaster(target), CorePragmas.Instanced));
  181. if (target.mayWriteDepth)
  182. result.passes.Add(PassVariant(CorePasses.DepthOnly(target), CorePragmas.Instanced));
  183. result.passes.Add(PassVariant(SixWayPasses.Meta(target), CorePragmas.Default));
  184. // Currently neither of these passes (selection/picking) can be last for the game view for
  185. // UI shaders to render correctly. Verify [1352225] before changing this order.
  186. result.passes.Add(PassVariant(CorePasses.SceneSelection(target), CorePragmas.Default));
  187. result.passes.Add(PassVariant(CorePasses.ScenePicking(target), CorePragmas.Default));
  188. return result;
  189. }
  190. }
  191. #endregion
  192. #region Passes
  193. static class SixWayPasses
  194. {
  195. static void AddReceiveShadowsControlToPass(ref PassDescriptor pass, UniversalTarget target, bool receiveShadows)
  196. {
  197. if (target.allowMaterialOverride)
  198. pass.keywords.Add(SixWayKeywords.ReceiveShadowsOff);
  199. else if (!receiveShadows)
  200. pass.defines.Add(SixWayKeywords.ReceiveShadowsOff, 1);
  201. }
  202. static void AddColorAbsorptionControlToPass(ref PassDescriptor pass, UniversalTarget target,
  203. bool useColorAbsorption)
  204. {
  205. if (target.allowMaterialOverride)
  206. pass.keywords.Add(SixWayKeywords.UseColorAbsorption);
  207. else if (useColorAbsorption)
  208. pass.defines.Add(SixWayKeywords.UseColorAbsorption, 1);
  209. }
  210. static StructDescriptor ForwardVaryings
  211. {
  212. get
  213. {
  214. var baseVaryingsDescriptor = UniversalStructs.Varyings;
  215. FieldDescriptor[] varyingsDescriptorFields =
  216. new FieldDescriptor[baseVaryingsDescriptor.fields.Length + 3];
  217. varyingsDescriptorFields[0] = Varyings.diffuseGIData0;
  218. varyingsDescriptorFields[1] = Varyings.diffuseGIData1;
  219. varyingsDescriptorFields[2] = Varyings.diffuseGIData2;
  220. baseVaryingsDescriptor.fields.CopyTo(varyingsDescriptorFields,3);
  221. baseVaryingsDescriptor.fields = varyingsDescriptorFields;
  222. return baseVaryingsDescriptor;
  223. }
  224. }
  225. static readonly StructCollection ForwardStructCollection = new StructCollection
  226. {
  227. { Structs.Attributes },
  228. { ForwardVaryings },
  229. { Structs.SurfaceDescriptionInputs },
  230. { Structs.VertexDescriptionInputs },
  231. };
  232. public static PassDescriptor ForwardOnly(
  233. UniversalTarget target,
  234. BlockFieldDescriptor[] vertexBlocks,
  235. BlockFieldDescriptor[] pixelBlocks,
  236. PragmaCollection pragmas,
  237. KeywordCollection keywords,
  238. bool useColorAbsorption)
  239. {
  240. var result = new PassDescriptor
  241. {
  242. // Definition
  243. displayName = "Universal Forward Only",
  244. referenceName = "SHADERPASS_FORWARDONLY",
  245. lightMode = "UniversalForwardOnly",
  246. useInPreview = true,
  247. // Template
  248. passTemplatePath = UniversalTarget.kUberTemplatePath,
  249. sharedTemplateDirectories = UniversalTarget.kSharedTemplateDirectories,
  250. // Port Mask
  251. validVertexBlocks = vertexBlocks,
  252. validPixelBlocks = pixelBlocks,
  253. // Fields
  254. structs = ForwardStructCollection,
  255. requiredFields = SixWayRequiredFields.Forward,
  256. fieldDependencies = CoreFieldDependencies.Default,
  257. // Conditional State
  258. renderStates = CoreRenderStates.UberSwitchedRenderState(target),
  259. pragmas = pragmas,
  260. defines = new DefineCollection { CoreDefines.UseFragmentFog },
  261. keywords = new KeywordCollection { keywords },
  262. includes = new IncludeCollection { SixWayIncludes.Forward },
  263. // Custom Interpolator Support
  264. customInterpolators = CoreCustomInterpDescriptors.Common
  265. };
  266. CorePasses.AddTargetSurfaceControlsToPass(ref result, target);
  267. CorePasses.AddAlphaToMaskControlToPass(ref result, target);
  268. AddReceiveShadowsControlToPass(ref result, target, target.receiveShadows);
  269. CorePasses.AddLODCrossFadeControlToPass(ref result, target);
  270. AddColorAbsorptionControlToPass(ref result, target, useColorAbsorption);
  271. return result;
  272. }
  273. public static PassDescriptor Meta(UniversalTarget target)
  274. {
  275. var result = new PassDescriptor()
  276. {
  277. // Definition
  278. displayName = "Meta",
  279. referenceName = "SHADERPASS_META",
  280. lightMode = "Meta",
  281. // Template
  282. passTemplatePath = UniversalTarget.kUberTemplatePath,
  283. sharedTemplateDirectories = UniversalTarget.kSharedTemplateDirectories,
  284. // Port Mask
  285. validVertexBlocks = CoreBlockMasks.Vertex,
  286. validPixelBlocks = SixWayBlockMasks.FragmentMeta,
  287. // Fields
  288. structs = CoreStructCollections.Default,
  289. requiredFields = SixWayRequiredFields.Meta,
  290. fieldDependencies = CoreFieldDependencies.Default,
  291. // Conditional State
  292. renderStates = CoreRenderStates.Meta,
  293. pragmas = CorePragmas.Default,
  294. defines = new DefineCollection() { CoreDefines.UseFragmentFog },
  295. keywords = new KeywordCollection() { CoreKeywordDescriptors.EditorVisualization },
  296. includes = SixWayIncludes.Meta,
  297. // Custom Interpolator Support
  298. customInterpolators = CoreCustomInterpDescriptors.Common
  299. };
  300. CorePasses.AddAlphaClipControlToPass(ref result, target);
  301. return result;
  302. }
  303. }
  304. #endregion
  305. #region PortMasks
  306. static class SixWayBlockMasks
  307. {
  308. public static readonly BlockFieldDescriptor[] FragmentLit = new BlockFieldDescriptor[]
  309. {
  310. BlockFields.SurfaceDescription.BaseColor,
  311. BlockFields.SurfaceDescription.MapRightTopBack,
  312. BlockFields.SurfaceDescription.MapLeftBottomFront,
  313. BlockFields.SurfaceDescription.AbsorptionStrength,
  314. BlockFields.SurfaceDescription.Emission,
  315. BlockFields.SurfaceDescription.Occlusion,
  316. BlockFields.SurfaceDescription.Alpha,
  317. BlockFields.SurfaceDescription.AlphaClipThreshold,
  318. };
  319. public static readonly BlockFieldDescriptor[] FragmentMeta = new BlockFieldDescriptor[]
  320. {
  321. BlockFields.SurfaceDescription.BaseColor,
  322. BlockFields.SurfaceDescription.Emission,
  323. BlockFields.SurfaceDescription.Alpha,
  324. BlockFields.SurfaceDescription.AlphaClipThreshold,
  325. };
  326. }
  327. #endregion
  328. #region RequiredFields
  329. static class SixWayRequiredFields
  330. {
  331. public static readonly FieldCollection Forward = new FieldCollection()
  332. {
  333. StructFields.Attributes.uv1,
  334. StructFields.Attributes.uv2,
  335. StructFields.Varyings.positionWS,
  336. StructFields.Varyings.normalWS,
  337. StructFields.Varyings.tangentWS, // needed for vertex lighting
  338. UniversalStructFields.Varyings.staticLightmapUV,
  339. UniversalStructFields.Varyings.dynamicLightmapUV,
  340. UniversalStructFields.Varyings.sh,
  341. UniversalStructFields.Varyings.probeOcclusion,
  342. UniversalStructFields.Varyings.fogFactorAndVertexLight, // fog and vertex lighting, vert input is dependency
  343. UniversalStructFields.Varyings.shadowCoord, // shadow coord, vert input is dependency
  344. Varyings.diffuseGIData0,
  345. Varyings.diffuseGIData1,
  346. Varyings.diffuseGIData2,
  347. };
  348. public static readonly FieldCollection Meta = new FieldCollection()
  349. {
  350. StructFields.Attributes.positionOS,
  351. StructFields.Attributes.normalOS,
  352. StructFields.Attributes.uv0, //
  353. StructFields.Attributes.uv1, // needed for meta vertex position
  354. StructFields.Attributes.uv2, // needed for meta UVs
  355. StructFields.Attributes.instanceID, // needed for rendering instanced terrain
  356. StructFields.Varyings.positionCS,
  357. StructFields.Varyings.texCoord0, // needed for meta UVs
  358. StructFields.Varyings.texCoord1, // VizUV
  359. StructFields.Varyings.texCoord2, // LightCoord
  360. };
  361. }
  362. #endregion
  363. #region Defines
  364. public static class SixWayProperties
  365. {
  366. public static readonly string UseColorAbsorption = "_UseColorAbsorption";
  367. }
  368. #endregion
  369. #region Keywords
  370. static class SixWayKeywords
  371. {
  372. public static readonly KeywordDescriptor ReceiveShadowsOff = new KeywordDescriptor()
  373. {
  374. displayName = "Receive Shadows Off",
  375. referenceName = ShaderKeywordStrings._RECEIVE_SHADOWS_OFF,
  376. type = KeywordType.Boolean,
  377. definition = KeywordDefinition.ShaderFeature,
  378. scope = KeywordScope.Local,
  379. };
  380. public static readonly KeywordDescriptor UseColorAbsorption = new KeywordDescriptor()
  381. {
  382. displayName = "Use Color Absorption",
  383. referenceName = "_SIX_WAY_COLOR_ABSORPTION",
  384. type = KeywordType.Boolean,
  385. definition = KeywordDefinition.ShaderFeature,
  386. scope = KeywordScope.Local,
  387. stages = KeywordShaderStage.Fragment
  388. };
  389. public static readonly KeywordCollection Forward = new KeywordCollection
  390. {
  391. { CoreKeywordDescriptors.MainLightShadows },
  392. { CoreKeywordDescriptors.AdditionalLights },
  393. { CoreKeywordDescriptors.AdditionalLightShadows },
  394. { CoreKeywordDescriptors.ShadowsSoft },
  395. { CoreKeywordDescriptors.ShadowsShadowmask },
  396. { CoreKeywordDescriptors.LightLayers },
  397. { CoreKeywordDescriptors.DebugDisplay },
  398. { CoreKeywordDescriptors.LightCookies },
  399. { CoreKeywordDescriptors.ForwardPlus },
  400. };
  401. }
  402. #endregion
  403. #region Includes
  404. static class SixWayIncludes
  405. {
  406. const string kShadows = "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl";
  407. const string kMetaInput = "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl";
  408. const string kForwardPass = "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SixWayForwardPass.hlsl";
  409. const string kLightingMetaPass = "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl";
  410. const string kSixWayLighting = "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SixWayLighting.hlsl";
  411. public static readonly IncludeCollection Forward = new IncludeCollection
  412. {
  413. // Pre-graph
  414. { CoreIncludes.DOTSPregraph },
  415. { CoreIncludes.WriteRenderLayersPregraph },
  416. { CoreIncludes.ProbeVolumePregraph },
  417. { CoreIncludes.CorePregraph },
  418. { kShadows, IncludeLocation.Pregraph },
  419. { CoreIncludes.ShaderGraphPregraph },
  420. { CoreIncludes.DBufferPregraph },
  421. // Post-graph
  422. { kSixWayLighting, IncludeLocation.Postgraph},
  423. { CoreIncludes.CorePostgraph },
  424. { kForwardPass, IncludeLocation.Postgraph },
  425. };
  426. public static readonly IncludeCollection Meta = new IncludeCollection
  427. {
  428. // Pre-graph
  429. { CoreIncludes.CorePregraph },
  430. { CoreIncludes.ShaderGraphPregraph },
  431. { kMetaInput, IncludeLocation.Pregraph },
  432. // Post-graph
  433. { CoreIncludes.CorePostgraph },
  434. { kLightingMetaPass, IncludeLocation.Postgraph },
  435. };
  436. }
  437. #endregion
  438. }
  439. }