Provisional light culling

This commit is contained in:
Dynamitos
2021-05-10 23:57:55 +02:00
parent 0cf13bcff5
commit e00b382d4a
41 changed files with 1072 additions and 330 deletions
+10
View File
@@ -12,7 +12,11 @@ SceneRenderPath::SceneRenderPath(PScene scene, Gfx::PGraphics graphics, Gfx::PVi
{
renderGraph = new RenderGraph();
depthPrepass = new DepthPrepass(renderGraph, scene, graphics, target, source);
lightCullingPass = new LightCullingPass(renderGraph, scene, graphics, target, source);
basePass = new BasePass(renderGraph, scene, graphics, target, source);
renderGraph->addRenderPass(depthPrepass);
renderGraph->addRenderPass(lightCullingPass);
renderGraph->addRenderPass(basePass);
renderGraph->setup();
}
@@ -33,14 +37,20 @@ void SceneRenderPath::init()
void SceneRenderPath::beginFrame()
{
depthPrepass->beginFrame();
lightCullingPass->beginFrame();
basePass->beginFrame();
}
void SceneRenderPath::render()
{
depthPrepass->render();
lightCullingPass->render();
basePass->render();
}
void SceneRenderPath::endFrame()
{
depthPrepass->endFrame();
lightCullingPass->endFrame();
basePass->endFrame();
}
+3 -1
View File
@@ -1,7 +1,8 @@
#pragma once
#include "RenderPath.h"
#include "Graphics/RenderPass/BasePass.h"
#include "Graphics/RenderPass/DepthPrepass.h"
#include "Graphics/RenderPass/LightCullingPass.h"
#include "Graphics/RenderPass/BasePass.h"
namespace Seele
{
@@ -22,6 +23,7 @@ protected:
PScene scene;
PRenderGraph renderGraph;
PDepthPrepass depthPrepass;
PLightCullingPass lightCullingPass;
PBasePass basePass;
};