Provisional light culling
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user