summaryrefslogtreecommitdiffstats
path: root/src/RenderConfigs.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-12-11 16:44:40 +0100
committerLaG1924 <lag1924@gmail.com>2021-12-11 16:44:40 +0100
commitbe808181b2c84358b232e4a32d1a6dd9dd6659ed (patch)
tree5a0089532532a52fc307d836e2b1e90eced06779 /src/RenderConfigs.cpp
parentRemoved unnecessary framebuffers copying (diff)
downloadAltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.gz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.bz2
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.lz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.xz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.zst
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.zip
Diffstat (limited to 'src/RenderConfigs.cpp')
-rw-r--r--src/RenderConfigs.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/RenderConfigs.cpp b/src/RenderConfigs.cpp
index af1cde9..d399818 100644
--- a/src/RenderConfigs.cpp
+++ b/src/RenderConfigs.cpp
@@ -198,18 +198,12 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s
dsConf->SetMaxFilter(Gal::Filtering::Bilinear);
depthStencil = gal->BuildTexture(dsConf);
- auto worldPosConf = gal->CreateTexture2DConfig(geomW, geomH, Gal::Format::R32G32B32A32F);
- worldPosConf->SetMinFilter(Gal::Filtering::Bilinear);
- worldPosConf->SetMaxFilter(Gal::Filtering::Bilinear);
- worldPos = gal->BuildTexture(worldPosConf);
-
auto geomFbConf = gal->CreateFramebufferConfig();
geomFbConf->SetDepthStencil(depthStencil);
geomFbConf->SetTexture(0, color);
geomFbConf->SetTexture(1, normal);
- geomFbConf->SetTexture(2, worldPos);
- geomFbConf->SetTexture(3, addColor);
- geomFbConf->SetTexture(4, light);
+ geomFbConf->SetTexture(2, addColor);
+ geomFbConf->SetTexture(3, light);
geomFramebuffer = gal->BuildFramebuffer(geomFbConf);
geomFramebuffer->SetViewport(0, 0, geomW, geomH);
@@ -234,7 +228,7 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s
std::vector<std::pair<std::string_view, std::shared_ptr<Gal::Texture>>> ssaoTextures = {
{"normal", normal},
- {"worldPos", worldPos},
+ {"depthStencil", depthStencil},
{"ssaoNoise", ssaoNoise},
};
@@ -280,7 +274,6 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s
{"depthStencil", depthStencil},
{"color", color},
{"normal", normal},
- {"worldPos", worldPos},
{"addColor", addColor},
{"light", light},
};