Changed order of Draw for PostFX

This commit is contained in:
Antoine Pilote
2023-07-07 01:34:07 -04:00
parent 2a8da705e4
commit 244a5f1b27

View File

@@ -48,9 +48,6 @@ namespace Nuake {
mGBuffer->QueueResize(framebuffer.GetSize());
GBufferPass(scene);
mShadingBuffer->QueueResize(framebuffer.GetSize());
ShadingPass(scene);
const auto& sceneEnv = scene.GetEnvironment();
Ref<Texture> finalOutput = mShadingBuffer->GetTexture();
if (scene.GetEnvironment()->BloomEnabled)
@@ -61,7 +58,6 @@ namespace Nuake {
finalOutput = scene.GetEnvironment()->mBloom->GetOutput();
}
const auto view = scene.m_Registry.view<LightComponent>();
auto lightList = std::vector<LightComponent>();
@@ -143,6 +139,10 @@ namespace Nuake {
framebuffer.Unbind();
mShadingBuffer->QueueResize(framebuffer.GetSize());
ShadingPass(scene);
RenderCommand::Enable(RendererEnum::DEPTH_TEST);
Renderer::EndDraw();
}