ShaderParams.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using UnityEngine;
  2. namespace HighlightPlus {
  3. public static class ShaderParams {
  4. // general uniforms
  5. public static int Cull = Shader.PropertyToID("_Cull");
  6. public static int BlurScale = Shader.PropertyToID("_BlurScale");
  7. public static int BlurScaleFirstHoriz = Shader.PropertyToID("_BlurScaleFirstHoriz");
  8. public static int Speed = Shader.PropertyToID("_Speed");
  9. public static int ConstantWidth = Shader.PropertyToID("_ConstantWidth");
  10. public static int CutOff = Shader.PropertyToID("_CutOff");
  11. public static int ZTest = Shader.PropertyToID("_ZTest");
  12. public static int Flip = Shader.PropertyToID("_Flip");
  13. public static int Debug = Shader.PropertyToID("_Debug");
  14. public static int Color = Shader.PropertyToID("_Color");
  15. public static int MainTex = Shader.PropertyToID("_MainTex");
  16. public static int BaseMap = Shader.PropertyToID("_BaseMap");
  17. public static int BaseMapST = Shader.PropertyToID("_BaseMap_ST");
  18. public static int BlendSrc = Shader.PropertyToID("_BlendSrc");
  19. public static int BlendDst = Shader.PropertyToID("_BlendDst");
  20. public static int FadeFactor = Shader.PropertyToID("_HP_Fade");
  21. public static int ResampleScale = Shader.PropertyToID("_ResampleScale");
  22. // outline uniforms
  23. public static int OutlineWidth = Shader.PropertyToID("_OutlineWidth");
  24. public static int OutlineZTest = Shader.PropertyToID("_OutlineZTest");
  25. public static int OutlineDirection = Shader.PropertyToID("_OutlineDirection");
  26. public static int OutlineColor = Shader.PropertyToID("_OutlineColor");
  27. public static int OutlineVertexWidth = Shader.PropertyToID("_OutlineVertexWidth");
  28. public static int OutlineGradientTex = Shader.PropertyToID("_OutlineGradientTex");
  29. public static int OutlineVertexData = Shader.PropertyToID("_OutlineVertexData");
  30. public static int OutlineStencilCompareFunction = Shader.PropertyToID("_OutlineStencilComp");
  31. public static int OutlineEdgeThreshold = Shader.PropertyToID("_EdgeThreshold");
  32. // glow uniforms
  33. public static int GlowZTest = Shader.PropertyToID("_GlowZTest");
  34. public static int GlowStencilComp = Shader.PropertyToID("_GlowStencilComp");
  35. public static int GlowStencilOp = Shader.PropertyToID("_GlowStencilOp");
  36. public static int GlowDirection = Shader.PropertyToID("_GlowDirection");
  37. public static int Glow = Shader.PropertyToID("_Glow");
  38. public static int GlowColor = Shader.PropertyToID("_GlowColor");
  39. public static int Glow2 = Shader.PropertyToID("_Glow2");
  40. // see-through uniforms
  41. public static int SeeThrough = Shader.PropertyToID("_SeeThrough");
  42. public static int SeeThroughNoise = Shader.PropertyToID("_SeeThroughNoise");
  43. public static int SeeThroughBorderWidth = Shader.PropertyToID("_SeeThroughBorderWidth");
  44. public static int SeeThroughBorderConstantWidth = Shader.PropertyToID("_SeeThroughBorderConstantWidth");
  45. public static int SeeThroughTintColor = Shader.PropertyToID("_SeeThroughTintColor");
  46. public static int SeeThroughBorderColor = Shader.PropertyToID("_SeeThroughBorderColor");
  47. public static int SeeThroughStencilRef = Shader.PropertyToID("_SeeThroughStencilRef");
  48. public static int SeeThroughStencilComp = Shader.PropertyToID("_SeeThroughStencilComp");
  49. public static int SeeThroughStencilPassOp = Shader.PropertyToID("_SeeThroughStencilPassOp");
  50. public static int SeeThroughDepthOffset = Shader.PropertyToID("_SeeThroughDepthOffset");
  51. public static int SeeThroughMaxDepth = Shader.PropertyToID("_SeeThroughMaxDepth");
  52. public static int SeeThroughTexture = Shader.PropertyToID("_SeeThroughTexture");
  53. public static int SeeThroughTextureScale = Shader.PropertyToID("_SeeThroughTextureScale");
  54. // inner glow uniforms
  55. public static int InnerGlowWidth = Shader.PropertyToID("_InnerGlowWidth");
  56. public static int InnerGlowZTest = Shader.PropertyToID("_InnerGlowZTest");
  57. public static int InnerGlowColor = Shader.PropertyToID("_InnerGlowColor");
  58. public static int InnerGlowBlendMode = Shader.PropertyToID("_InnerGlowBlendMode");
  59. // overlay uniforms
  60. public static int OverlayData = Shader.PropertyToID("_OverlayData");
  61. public static int OverlayBackColor = Shader.PropertyToID("_OverlayBackColor");
  62. public static int OverlayColor = Shader.PropertyToID("_OverlayColor");
  63. public static int OverlayHitPosData = Shader.PropertyToID("_OverlayHitPosData");
  64. public static int OverlayHitStartTime = Shader.PropertyToID("_OverlayHitStartTime");
  65. public static int OverlayTexture = Shader.PropertyToID("_OverlayTexture");
  66. public static int OverlayZTest = Shader.PropertyToID("_OverlayZTest");
  67. // target uniforms
  68. public static int TargetFXRenderData = Shader.PropertyToID("_TargetFXRenderData");
  69. public static int GlowRT = Shader.PropertyToID("_HPComposeGlowFinal");
  70. public static int OutlineRT = Shader.PropertyToID("_HPComposeOutlineFinal");
  71. // keywords
  72. public const string SKW_ALPHACLIP = "HP_ALPHACLIP";
  73. public const string SKW_OUTLINE_GRADIENT_WS = "HP_OUTLINE_GRADIENT_WS";
  74. public const string SKW_OUTLINE_GRADIENT_LS = "HP_OUTLINE_GRADIENT_LS";
  75. public const string SKW_ALL_EDGES = "HP_ALL_EDGES";
  76. public const string SKW_DEPTHCLIP = "HP_DEPTHCLIP";
  77. public const string SKW_DEPTHCLIP_INV = "HP_DEPTHCLIP_INV";
  78. public const string SKW_DEPTH_OFFSET = "HP_DEPTH_OFFSET";
  79. public const string SKW_TEXTURE_TRIPLANAR = "HP_TEXTURE_TRIPLANAR";
  80. public const string SKW_TEXTURE_SCREENSPACE = "HP_TEXTURE_SCREENSPACE";
  81. public const string SKW_TEXTURE_OBJECTSPACE = "HP_TEXTURE_OBJECTSPACE";
  82. public const string SKW_SEETHROUGH_ONLY_BORDER = "HP_SEETHROUGH_ONLY_BORDER";
  83. }
  84. }