Browse Source

Add a skeleton

Panagiotis Christopoulos Charitos 9 months ago
parent
commit
c06ff5b40f

+ 21 - 0
AnKi/Renderer/IndirectDiffuseClipmaps.cpp

@@ -0,0 +1,21 @@
+// Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
+// All rights reserved.
+// Code licensed under the BSD License.
+// http://www.anki3d.org/LICENSE
+
+#include <AnKi/Renderer/IndirectDiffuseProbes2.h>
+#include <AnKi/Renderer/Renderer.h>
+#include <AnKi/Renderer/PrimaryNonRenderableVisibility.h>
+#include <AnKi/Util/Tracer.h>
+#include <AnKi/Scene/Components/GlobalIlluminationProbeComponent.h>
+
+namespace anki {
+
+void IndirectDiffuseProbes2::populateRenderGraph(RenderingContext& ctx)
+{
+	ANKI_TRACE_SCOPED_EVENT(IndirectDiffuse);
+
+	m_runCtx = {};
+}
+
+} // end namespace anki

+ 36 - 0
AnKi/Renderer/IndirectDiffuseClipmaps.h

@@ -0,0 +1,36 @@
+// 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 <AnKi/Renderer/RendererObject.h>
+#include <AnKi/Renderer/Utils/TraditionalDeferredShading.h>
+#include <AnKi/Collision/Forward.h>
+
+namespace anki {
+
+/// @addtogroup renderer
+/// @{
+
+inline NumericCVar<F32> g_indirectDiffuseClipmap0MetersCVar("R", "IndirectDiffuseClipmap0Meters", 20.0, 10.0, 50.0, "The size of the 1st clipmap");
+inline NumericCVar<U32> g_indirectDiffuseClipmap0CellsPerCubicMeterCVar("R", "IndirectDiffuseClipmap0CellsPerCubicMeter", 1, 1, 10 * 3,
+																		"Cell count per cubic meter");
+
+/// Ambient global illumination passes.
+class IndirectDiffuseProbes2 : public RendererObject
+{
+public:
+	Error init();
+
+	void populateRenderGraph(RenderingContext& ctx);
+
+private:
+	static constexpr U32 kClipmapLevelCount = 3;
+
+	Array<TexturePtr, kClipmapLevelCount> m_clipmapLevelTextures;
+};
+/// @}
+
+} // end namespace anki