PostProcessEvent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Collections.Generic;
  2. namespace UnityEngine.Rendering.PostProcessing
  3. {
  4. /// <summary>
  5. /// Injection points for custom effects.
  6. /// </summary>
  7. public enum PostProcessEvent
  8. {
  9. /// <summary>
  10. /// Effects at this injection points will execute before transparent objects are rendered.
  11. /// </summary>
  12. BeforeTransparent = 0,
  13. /// <summary>
  14. /// Effects at this injection points will execute after temporal anti-aliasing and before
  15. /// builtin effects are rendered.
  16. /// </summary>
  17. BeforeStack = 1,
  18. /// <summary>
  19. /// Effects at this injection points will execute after builtin effects have been rendered
  20. /// and before the final pass that does FXAA and applies dithering.
  21. /// </summary>
  22. AfterStack = 2,
  23. }
  24. // Box free comparer for our `PostProcessEvent` enum, else the runtime will box the type when
  25. // used as a key in a dictionary, thus leading to garbage generation... *sigh*
  26. internal struct PostProcessEventComparer : IEqualityComparer<PostProcessEvent>
  27. {
  28. public bool Equals(PostProcessEvent x, PostProcessEvent y)
  29. {
  30. return x == y;
  31. }
  32. public int GetHashCode(PostProcessEvent obj)
  33. {
  34. return (int)obj;
  35. }
  36. }
  37. }