RtMaterialFetchDbg.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_CVAR2(BoolCVar, Render, Dbg, RtMaterialFetch, false, "Enable material debugging pass")
  11. /// Similar to ShadowmapsResolve but it's using ray tracing.
  12. class RtMaterialFetchDbg : public RtMaterialFetchRendererObject
  13. {
  14. public:
  15. RtMaterialFetchDbg()
  16. {
  17. registerDebugRenderTarget("RtMaterialFetchDbg");
  18. }
  19. Error init();
  20. void populateRenderGraph(RenderingContext& ctx);
  21. void getDebugRenderTarget([[maybe_unused]] CString rtName, Array<RenderTargetHandle, U32(DebugRenderTargetRegister::kCount)>& handles,
  22. [[maybe_unused]] DebugRenderTargetDrawStyle& drawStyle) const override
  23. {
  24. handles[0] = m_runCtx.m_rt;
  25. }
  26. public:
  27. ShaderProgramResourcePtr m_rtProg;
  28. ShaderProgramResourcePtr m_missProg;
  29. ShaderProgramPtr m_libraryGrProg;
  30. RenderTargetDesc m_rtDesc;
  31. U32 m_sbtRecordSize = 0;
  32. U32 m_rayGenShaderGroupIdx = 0;
  33. U32 m_missShaderGroupIdx = 0;
  34. class
  35. {
  36. public:
  37. RenderTargetHandle m_rt;
  38. } m_runCtx;
  39. };
  40. /// @}
  41. } // namespace anki