Adding cached depth renderpass

This commit is contained in:
Dynamitos
2024-05-30 16:56:22 +02:00
parent 4b6022237b
commit f278afad66
20 changed files with 908 additions and 677 deletions
+7 -4
View File
@@ -7,8 +7,12 @@
#include "System/LightGather.h"
#include "System/MeshUpdater.h"
#include "System/CameraUpdater.h"
#include "Graphics/Vulkan/Graphics.h"
#include "Graphics/Vulkan/Allocator.h"
#include "Graphics/RenderPass/CachedDepthPass.h"
#include "Graphics/RenderPass/DepthPrepass.h"
#include "Graphics/RenderPass/LightCullingPass.h"
#include "Graphics/RenderPass/BasePass.h"
#include "Graphics/RenderPass/SkyboxRenderPass.h"
#include "Graphics/RenderPass/DebugPass.h"
using namespace Seele;
@@ -22,10 +26,9 @@ GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreate
, gameInterface(dllPath)
{
reloadGame();
//renderGraph.addPass(new StaticDepthPrepass(graphics, scene));
renderGraph.addPass(new CachedDepthPass(graphics, scene));
renderGraph.addPass(new DepthPrepass(graphics, scene));
renderGraph.addPass(new LightCullingPass(graphics, scene));
//renderGraph.addPass(new StaticBasePass(graphics, scene));
renderGraph.addPass(new BasePass(graphics, scene));
renderGraph.addPass(new DebugPass(graphics, scene));
//renderGraph.addPass(new SkyboxRenderPass(graphics, scene));
+24 -28
View File
@@ -1,11 +1,6 @@
#pragma once
#include "Window/View.h"
#include "Scene/Scene.h"
#include "Graphics/RenderPass/DepthPrepass.h"
#include "Graphics/RenderPass/LightCullingPass.h"
#include "Graphics/RenderPass/BasePass.h"
#include "Graphics/RenderPass/SkyboxRenderPass.h"
#include "Graphics/RenderPass/DebugPass.h"
#include "System/KeyboardInput.h"
#ifdef WIN32
#include "Platform/Windows/GameInterface.h" // TODO
@@ -15,34 +10,35 @@
namespace Seele
{
class GameView : public View
{
public:
class GameView : public View
{
public:
GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo &createInfo, std::string dllPath);
virtual ~GameView();
virtual void beginUpdate() override;
virtual void update() override;
virtual void commitUpdate() override;
virtual void beginUpdate() override;
virtual void update() override;
virtual void commitUpdate() override;
virtual void prepareRender() override;
virtual void render() override;
virtual void prepareRender() override;
virtual void render() override;
void reloadGame();
protected:
virtual void applyArea(URect rect) override;
OScene scene;
GameInterface gameInterface;
void reloadGame();
protected:
virtual void applyArea(URect rect) override;
OScene scene;
GameInterface gameInterface;
RenderGraph renderGraph;
PSystemGraph systemGraph;
System::PKeyboardInput keyboardSystem;
float updateTime = 0;
PSystemGraph systemGraph;
System::PKeyboardInput keyboardSystem;
float updateTime = 0;
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void mouseMoveCallback(double xPos, double yPos) override;
virtual void mouseButtonCallback(Seele::MouseButton button, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void scrollCallback(double xOffset, double yOffset) override;
virtual void fileCallback(int count, const char** paths) override;
};
DEFINE_REF(GameView)
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void mouseMoveCallback(double xPos, double yPos) override;
virtual void mouseButtonCallback(Seele::MouseButton button, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void scrollCallback(double xOffset, double yOffset) override;
virtual void fileCallback(int count, const char **paths) override;
};
DEFINE_REF(GameView)
} // namespace Seele