TemporalUpscaler.h 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. namespace anki {
  8. /// @addtogroup renderer
  9. /// @{
  10. ANKI_CVAR(BoolCVar, Render, Dlss, true, "Enable or disable DLSS")
  11. ANKI_CVAR(NumericCVar<U8>, Render, DlssQuality, 1, 0, 3, "0: Performance, 1: Balanced, 2: Quality")
  12. /// Upscales.
  13. class TemporalUpscaler : public RendererObject
  14. {
  15. public:
  16. Error init();
  17. void populateRenderGraph(RenderingContext& ctx);
  18. /// This is the HDR upscaled RT.
  19. RenderTargetHandle getRt() const
  20. {
  21. return m_runCtx.m_rt;
  22. }
  23. Bool getEnabled() const
  24. {
  25. return m_grUpscaler.isCreated();
  26. }
  27. private:
  28. GrUpscalerPtr m_grUpscaler;
  29. RenderTargetDesc m_rtDesc;
  30. ShaderProgramResourcePtr m_blitProg;
  31. ShaderProgramPtr m_blitGrProg;
  32. class
  33. {
  34. public:
  35. RenderTargetHandle m_rt;
  36. } m_runCtx;
  37. };
  38. /// @}
  39. } // end namespace anki