summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Render.cpp')
-rw-r--r--src/Render.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Render.cpp b/src/Render.cpp
index 35ee695..be7e2b2 100644
--- a/src/Render.cpp
+++ b/src/Render.cpp
@@ -152,7 +152,11 @@ void Render::PrepareToRendering() {
bool useDeffered = Settings::ReadBool("deffered", false);
if (useDeffered) {
- gbuffer = std::make_unique<Gbuffer>(scaledW, scaledH, scaledW, scaledH, Settings::ReadBool("ssao", false));
+ int ssaoSamples = Settings::ReadDouble("ssaoSamples", 0.5f);
+ float ssaoScale = Settings::ReadDouble("ssaoScale", 0.5f);
+ size_t ssaoW = scaledW * ssaoScale, ssaoH = scaledH * ssaoScale;
+
+ gbuffer = std::make_unique<Gbuffer>(scaledW, scaledH, scaledW, scaledH, ssaoSamples, ssaoW, ssaoH);
gbuffer->SetRenderBuff(renderBuff);
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());