Pps.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef ANKI_RENDERER_PPS_H
  2. #define ANKI_RENDERER_PPS_H
  3. #include "anki/renderer/RenderingPass.h"
  4. #include "anki/gl/Fbo.h"
  5. #include "anki/resource/TextureResource.h"
  6. #include "anki/resource/Resource.h"
  7. #include "anki/renderer/Hdr.h"
  8. #include "anki/renderer/Ssao.h"
  9. #include "anki/renderer/Bl.h"
  10. #include "anki/renderer/Lf.h"
  11. namespace anki {
  12. class ShaderProgram;
  13. /// Post-processing stage.This stage is divided into 2 two parts. The first
  14. /// happens before blending stage and the second after
  15. class Pps: public OptionalRenderingPass
  16. {
  17. public:
  18. Pps(Renderer* r);
  19. ~Pps();
  20. void init(const RendererInitializer& initializer);
  21. void run();
  22. /// @name Accessors
  23. /// @{
  24. const Hdr& getHdr() const
  25. {
  26. return hdr;
  27. }
  28. Hdr& getHdr()
  29. {
  30. return hdr;
  31. }
  32. const Ssao& getSsao() const
  33. {
  34. return ssao;
  35. }
  36. const Bl& getBl() const
  37. {
  38. return bl;
  39. }
  40. Bl& getBl()
  41. {
  42. return bl;
  43. }
  44. const Lf& getLf() const
  45. {
  46. return lf;
  47. }
  48. Lf& getLf()
  49. {
  50. return lf;
  51. }
  52. const Texture& getFai() const
  53. {
  54. return fai;
  55. }
  56. Texture& getFai()
  57. {
  58. return fai;
  59. }
  60. /// @}
  61. private:
  62. /// @name Passes
  63. /// @{
  64. Hdr hdr;
  65. Ssao ssao;
  66. Bl bl;
  67. Lf lf;
  68. /// @}
  69. Fbo fbo;
  70. ShaderProgramResourcePointer prog;
  71. Texture fai;
  72. void initInternal(const RendererInitializer& initializer);
  73. };
  74. } // end namespace anki
  75. #endif