// 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 /// @{ ANKI_CVAR2(NumericCVar, Render, VolumetricLightingAccumulation, QualityXY, 4.0f, 1.0f, 16.0f, "Quality of XY dimensions of volumetric lights") ANKI_CVAR2(NumericCVar, Render, VolumetricLightingAccumulation, QualityZ, 4.0f, 1.0f, 16.0f, "Quality of Z dimension of volumetric lights") ANKI_CVAR2(NumericCVar, Render, VolumetricLightingAccumulation, FinalZSplit, 26, 1, 256, "Final cluster split that will recieve volumetric lights") /// Volumetric lighting. It accumulates lighting in a volume texture. class VolumetricLightingAccumulation : public RendererObject { public: Error init(); /// Populate the rendergraph. void populateRenderGraph(RenderingContext& ctx); RenderTargetHandle getRt() const { return m_runCtx.m_rts[1]; } private: ShaderProgramResourcePtr m_prog; ShaderProgramPtr m_grProg; Array m_rtTextures; ImageResourcePtr m_noiseImage; Array m_volumeSize; class { public: Array m_rts; } m_runCtx; ///< Runtime context. }; /// @} } // end namespace anki