// Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #pragma once #include namespace anki { /// @addtogroup renderer /// @{ /// Compute the history length (aka disocclusion length) class HistoryLength : public RendererObject { public: HistoryLength() { registerDebugRenderTarget("HistoryLen"); } Error init(); void populateRenderGraph(RenderingContext& ctx); void getDebugRenderTarget([[maybe_unused]] CString rtName, Array& handles, [[maybe_unused]] DebugRenderTargetDrawStyle& drawStyle) const override { handles[0] = m_runCtx.m_rt; drawStyle = DebugRenderTargetDrawStyle::kRedOnly; } RenderTargetHandle getRt() const { return m_runCtx.m_rt; } private: ShaderProgramResourcePtr m_prog; ShaderProgramPtr m_grProg; Array m_historyLenTextures; Bool m_texturesImportedOnce = false; class { public: RenderTargetHandle m_rt; } m_runCtx; }; /// @} } // namespace anki