ForwardShading.h 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright (C) 2009-present, 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. #include <AnKi/Renderer/Utils/GpuVisibility.h>
  8. namespace anki {
  9. /// @addtogroup renderer
  10. /// @{
  11. /// Forward rendering stage. The objects that blend must be handled differently
  12. class ForwardShading : public RendererObject
  13. {
  14. public:
  15. ForwardShading() = default;
  16. ~ForwardShading() = default;
  17. Error init()
  18. {
  19. return Error::kNone;
  20. }
  21. void populateRenderGraph(RenderingContext& ctx);
  22. void setDependencies(GraphicsRenderPass& pass);
  23. void run(const RenderingContext& ctx, RenderPassWorkContext& rgraphCtx);
  24. /// Use some of the output for debug drawing.
  25. const GpuVisibilityOutput& getGpuVisibilityOutput() const
  26. {
  27. return m_runCtx.m_visOut;
  28. }
  29. private:
  30. class
  31. {
  32. public:
  33. GpuVisibilityOutput m_visOut;
  34. } m_runCtx;
  35. };
  36. /// @}
  37. } // end namespace anki