ShaderIDs.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. namespace UnityEngine.Rendering.PostProcessing
  2. {
  3. // Pre-hashed shader ids - naming conventions are a bit off in this file as we use the same
  4. // fields names as in the shaders for ease of use... Would be nice to clean this up at some
  5. // point.
  6. static class ShaderIDs
  7. {
  8. internal static readonly int MainTex = Shader.PropertyToID("_MainTex");
  9. internal static readonly int Jitter = Shader.PropertyToID("_Jitter");
  10. internal static readonly int Sharpness = Shader.PropertyToID("_Sharpness");
  11. internal static readonly int FinalBlendParameters = Shader.PropertyToID("_FinalBlendParameters");
  12. internal static readonly int HistoryTex = Shader.PropertyToID("_HistoryTex");
  13. internal static readonly int SMAA_Flip = Shader.PropertyToID("_SMAA_Flip");
  14. internal static readonly int SMAA_Flop = Shader.PropertyToID("_SMAA_Flop");
  15. internal static readonly int AOParams = Shader.PropertyToID("_AOParams");
  16. internal static readonly int AOColor = Shader.PropertyToID("_AOColor");
  17. internal static readonly int OcclusionTexture1 = Shader.PropertyToID("_OcclusionTexture1");
  18. internal static readonly int OcclusionTexture2 = Shader.PropertyToID("_OcclusionTexture2");
  19. internal static readonly int SAOcclusionTexture = Shader.PropertyToID("_SAOcclusionTexture");
  20. internal static readonly int MSVOcclusionTexture = Shader.PropertyToID("_MSVOcclusionTexture");
  21. internal static readonly int DepthCopy = Shader.PropertyToID("DepthCopy");
  22. internal static readonly int LinearDepth = Shader.PropertyToID("LinearDepth");
  23. internal static readonly int LowDepth1 = Shader.PropertyToID("LowDepth1");
  24. internal static readonly int LowDepth2 = Shader.PropertyToID("LowDepth2");
  25. internal static readonly int LowDepth3 = Shader.PropertyToID("LowDepth3");
  26. internal static readonly int LowDepth4 = Shader.PropertyToID("LowDepth4");
  27. internal static readonly int TiledDepth1 = Shader.PropertyToID("TiledDepth1");
  28. internal static readonly int TiledDepth2 = Shader.PropertyToID("TiledDepth2");
  29. internal static readonly int TiledDepth3 = Shader.PropertyToID("TiledDepth3");
  30. internal static readonly int TiledDepth4 = Shader.PropertyToID("TiledDepth4");
  31. internal static readonly int Occlusion1 = Shader.PropertyToID("Occlusion1");
  32. internal static readonly int Occlusion2 = Shader.PropertyToID("Occlusion2");
  33. internal static readonly int Occlusion3 = Shader.PropertyToID("Occlusion3");
  34. internal static readonly int Occlusion4 = Shader.PropertyToID("Occlusion4");
  35. internal static readonly int Combined1 = Shader.PropertyToID("Combined1");
  36. internal static readonly int Combined2 = Shader.PropertyToID("Combined2");
  37. internal static readonly int Combined3 = Shader.PropertyToID("Combined3");
  38. internal static readonly int SSRResolveTemp = Shader.PropertyToID("_SSRResolveTemp");
  39. internal static readonly int Noise = Shader.PropertyToID("_Noise");
  40. internal static readonly int Test = Shader.PropertyToID("_Test");
  41. internal static readonly int Resolve = Shader.PropertyToID("_Resolve");
  42. internal static readonly int History = Shader.PropertyToID("_History");
  43. internal static readonly int ViewMatrix = Shader.PropertyToID("_ViewMatrix");
  44. internal static readonly int InverseViewMatrix = Shader.PropertyToID("_InverseViewMatrix");
  45. internal static readonly int InverseProjectionMatrix = Shader.PropertyToID("_InverseProjectionMatrix");
  46. internal static readonly int ScreenSpaceProjectionMatrix = Shader.PropertyToID("_ScreenSpaceProjectionMatrix");
  47. internal static readonly int Params2 = Shader.PropertyToID("_Params2");
  48. internal static readonly int FogColor = Shader.PropertyToID("_FogColor");
  49. internal static readonly int FogParams = Shader.PropertyToID("_FogParams");
  50. internal static readonly int VelocityScale = Shader.PropertyToID("_VelocityScale");
  51. internal static readonly int MaxBlurRadius = Shader.PropertyToID("_MaxBlurRadius");
  52. internal static readonly int RcpMaxBlurRadius = Shader.PropertyToID("_RcpMaxBlurRadius");
  53. internal static readonly int VelocityTex = Shader.PropertyToID("_VelocityTex");
  54. internal static readonly int Tile2RT = Shader.PropertyToID("_Tile2RT");
  55. internal static readonly int Tile4RT = Shader.PropertyToID("_Tile4RT");
  56. internal static readonly int Tile8RT = Shader.PropertyToID("_Tile8RT");
  57. internal static readonly int TileMaxOffs = Shader.PropertyToID("_TileMaxOffs");
  58. internal static readonly int TileMaxLoop = Shader.PropertyToID("_TileMaxLoop");
  59. internal static readonly int TileVRT = Shader.PropertyToID("_TileVRT");
  60. internal static readonly int NeighborMaxTex = Shader.PropertyToID("_NeighborMaxTex");
  61. internal static readonly int LoopCount = Shader.PropertyToID("_LoopCount");
  62. internal static readonly int DepthOfFieldTemp = Shader.PropertyToID("_DepthOfFieldTemp");
  63. internal static readonly int DepthOfFieldTex = Shader.PropertyToID("_DepthOfFieldTex");
  64. internal static readonly int Distance = Shader.PropertyToID("_Distance");
  65. internal static readonly int LensCoeff = Shader.PropertyToID("_LensCoeff");
  66. internal static readonly int MaxCoC = Shader.PropertyToID("_MaxCoC");
  67. internal static readonly int RcpMaxCoC = Shader.PropertyToID("_RcpMaxCoC");
  68. internal static readonly int RcpAspect = Shader.PropertyToID("_RcpAspect");
  69. internal static readonly int CoCTex = Shader.PropertyToID("_CoCTex");
  70. internal static readonly int TaaParams = Shader.PropertyToID("_TaaParams");
  71. internal static readonly int AutoExposureTex = Shader.PropertyToID("_AutoExposureTex");
  72. internal static readonly int HistogramBuffer = Shader.PropertyToID("_HistogramBuffer");
  73. internal static readonly int Params = Shader.PropertyToID("_Params");
  74. internal static readonly int ScaleOffsetRes = Shader.PropertyToID("_ScaleOffsetRes");
  75. internal static readonly int BloomTex = Shader.PropertyToID("_BloomTex");
  76. internal static readonly int SampleScale = Shader.PropertyToID("_SampleScale");
  77. internal static readonly int Threshold = Shader.PropertyToID("_Threshold");
  78. internal static readonly int ColorIntensity = Shader.PropertyToID("_ColorIntensity");
  79. internal static readonly int Bloom_DirtTex = Shader.PropertyToID("_Bloom_DirtTex");
  80. internal static readonly int Bloom_Settings = Shader.PropertyToID("_Bloom_Settings");
  81. internal static readonly int Bloom_Color = Shader.PropertyToID("_Bloom_Color");
  82. internal static readonly int Bloom_DirtTileOffset = Shader.PropertyToID("_Bloom_DirtTileOffset");
  83. internal static readonly int ChromaticAberration_Amount = Shader.PropertyToID("_ChromaticAberration_Amount");
  84. internal static readonly int ChromaticAberration_SpectralLut = Shader.PropertyToID("_ChromaticAberration_SpectralLut");
  85. internal static readonly int Distortion_CenterScale = Shader.PropertyToID("_Distortion_CenterScale");
  86. internal static readonly int Distortion_Amount = Shader.PropertyToID("_Distortion_Amount");
  87. internal static readonly int Lut2D = Shader.PropertyToID("_Lut2D");
  88. internal static readonly int Lut3D = Shader.PropertyToID("_Lut3D");
  89. internal static readonly int Lut3D_Params = Shader.PropertyToID("_Lut3D_Params");
  90. internal static readonly int Lut2D_Params = Shader.PropertyToID("_Lut2D_Params");
  91. internal static readonly int UserLut2D_Params = Shader.PropertyToID("_UserLut2D_Params");
  92. internal static readonly int PostExposure = Shader.PropertyToID("_PostExposure");
  93. internal static readonly int ColorBalance = Shader.PropertyToID("_ColorBalance");
  94. internal static readonly int ColorFilter = Shader.PropertyToID("_ColorFilter");
  95. internal static readonly int HueSatCon = Shader.PropertyToID("_HueSatCon");
  96. internal static readonly int Brightness = Shader.PropertyToID("_Brightness");
  97. internal static readonly int ChannelMixerRed = Shader.PropertyToID("_ChannelMixerRed");
  98. internal static readonly int ChannelMixerGreen = Shader.PropertyToID("_ChannelMixerGreen");
  99. internal static readonly int ChannelMixerBlue = Shader.PropertyToID("_ChannelMixerBlue");
  100. internal static readonly int Lift = Shader.PropertyToID("_Lift");
  101. internal static readonly int InvGamma = Shader.PropertyToID("_InvGamma");
  102. internal static readonly int Gain = Shader.PropertyToID("_Gain");
  103. internal static readonly int Curves = Shader.PropertyToID("_Curves");
  104. internal static readonly int CustomToneCurve = Shader.PropertyToID("_CustomToneCurve");
  105. internal static readonly int ToeSegmentA = Shader.PropertyToID("_ToeSegmentA");
  106. internal static readonly int ToeSegmentB = Shader.PropertyToID("_ToeSegmentB");
  107. internal static readonly int MidSegmentA = Shader.PropertyToID("_MidSegmentA");
  108. internal static readonly int MidSegmentB = Shader.PropertyToID("_MidSegmentB");
  109. internal static readonly int ShoSegmentA = Shader.PropertyToID("_ShoSegmentA");
  110. internal static readonly int ShoSegmentB = Shader.PropertyToID("_ShoSegmentB");
  111. internal static readonly int Vignette_Color = Shader.PropertyToID("_Vignette_Color");
  112. internal static readonly int Vignette_Center = Shader.PropertyToID("_Vignette_Center");
  113. internal static readonly int Vignette_Settings = Shader.PropertyToID("_Vignette_Settings");
  114. internal static readonly int Vignette_Mask = Shader.PropertyToID("_Vignette_Mask");
  115. internal static readonly int Vignette_Opacity = Shader.PropertyToID("_Vignette_Opacity");
  116. internal static readonly int Vignette_Mode = Shader.PropertyToID("_Vignette_Mode");
  117. internal static readonly int Grain_Params1 = Shader.PropertyToID("_Grain_Params1");
  118. internal static readonly int Grain_Params2 = Shader.PropertyToID("_Grain_Params2");
  119. internal static readonly int GrainTex = Shader.PropertyToID("_GrainTex");
  120. internal static readonly int Phase = Shader.PropertyToID("_Phase");
  121. internal static readonly int GrainNoiseParameters = Shader.PropertyToID("_NoiseParameters");
  122. internal static readonly int LumaInAlpha = Shader.PropertyToID("_LumaInAlpha");
  123. internal static readonly int DitheringTex = Shader.PropertyToID("_DitheringTex");
  124. internal static readonly int Dithering_Coords = Shader.PropertyToID("_Dithering_Coords");
  125. internal static readonly int From = Shader.PropertyToID("_From");
  126. internal static readonly int To = Shader.PropertyToID("_To");
  127. internal static readonly int Interp = Shader.PropertyToID("_Interp");
  128. internal static readonly int TargetColor = Shader.PropertyToID("_TargetColor");
  129. internal static readonly int HalfResFinalCopy = Shader.PropertyToID("_HalfResFinalCopy");
  130. internal static readonly int WaveformSource = Shader.PropertyToID("_WaveformSource");
  131. internal static readonly int WaveformBuffer = Shader.PropertyToID("_WaveformBuffer");
  132. internal static readonly int VectorscopeBuffer = Shader.PropertyToID("_VectorscopeBuffer");
  133. internal static readonly int RenderViewportScaleFactor = Shader.PropertyToID("_RenderViewportScaleFactor");
  134. internal static readonly int UVTransform = Shader.PropertyToID("_UVTransform");
  135. internal static readonly int DepthSlice = Shader.PropertyToID("_DepthSlice");
  136. internal static readonly int UVScaleOffset = Shader.PropertyToID("_UVScaleOffset");
  137. internal static readonly int PosScaleOffset = Shader.PropertyToID("_PosScaleOffset");
  138. }
  139. }