PostProcessingContext.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. public class PostProcessingContext
  5. {
  6. public bool interrupted { get; private set; }
  7. public void Interrupt()
  8. {
  9. this.interrupted = true;
  10. }
  11. public PostProcessingContext Reset()
  12. {
  13. this.profile = null;
  14. this.camera = null;
  15. this.materialFactory = null;
  16. this.renderTextureFactory = null;
  17. this.interrupted = false;
  18. return this;
  19. }
  20. public bool isGBufferAvailable
  21. {
  22. get
  23. {
  24. return this.camera.actualRenderingPath == RenderingPath.DeferredShading;
  25. }
  26. }
  27. public bool isHdr
  28. {
  29. get
  30. {
  31. return this.camera.allowHDR;
  32. }
  33. }
  34. public int width
  35. {
  36. get
  37. {
  38. return this.camera.pixelWidth;
  39. }
  40. }
  41. public int height
  42. {
  43. get
  44. {
  45. return this.camera.pixelHeight;
  46. }
  47. }
  48. public Rect viewport
  49. {
  50. get
  51. {
  52. return this.camera.rect;
  53. }
  54. }
  55. public PostProcessingProfile profile;
  56. public Camera camera;
  57. public MaterialFactory materialFactory;
  58. public RenderTextureFactory renderTextureFactory;
  59. }
  60. }