Seven is the number.
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.

36 lines
900 B

3 years ago
  1. using UnityEngine;
  2. namespace LeTai.Effects
  3. {
  4. public static class ShaderProperties
  5. {
  6. private static bool isInitialized;
  7. public static int[] intermediateRT;
  8. public static int blurRadius;
  9. public static int blurTextureCropRegion;
  10. public static void Init()
  11. {
  12. if (isInitialized)
  13. return;
  14. blurRadius = Shader.PropertyToID("_Radius");
  15. blurTextureCropRegion = Shader.PropertyToID("_CropRegion");
  16. isInitialized = true;
  17. }
  18. public static void Init(int stackDepth)
  19. {
  20. intermediateRT = new int[stackDepth * 2 - 1];
  21. for (var i = 0; i < intermediateRT.Length; i++)
  22. {
  23. intermediateRT[i] = Shader.PropertyToID(string.Format("TI_intermediate_rt_{0}", i));
  24. }
  25. Init();
  26. }
  27. }
  28. }