GBufferPost.h 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Renderer/RendererObject.h>
  7. namespace anki {
  8. /// @addtogroup renderer
  9. /// @{
  10. /// Applies SSAO and decals to the GBuffer. It's a seperate pass because it requres the depth buffer.
  11. class GBufferPost : public RendererObject
  12. {
  13. public:
  14. GBufferPost(Renderer* r)
  15. : RendererObject(r)
  16. {
  17. }
  18. ~GBufferPost();
  19. ANKI_USE_RESULT Error init(const ConfigSet& cfg);
  20. /// Populate the rendergraph.
  21. void populateRenderGraph(RenderingContext& ctx);
  22. private:
  23. ShaderProgramResourcePtr m_prog;
  24. ShaderProgramPtr m_grProg;
  25. FramebufferDescription m_fbDescr;
  26. ANKI_USE_RESULT Error initInternal(const ConfigSet& cfg);
  27. void run(const RenderingContext& ctx, RenderPassWorkContext& rgraphCtx);
  28. };
  29. /// @}
  30. } // end namespace anki