From 5721d60db866373dc5718a8af8e63e5377ffd927 Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Sat, 11 Dec 2021 20:56:17 +0500 Subject: More optimization to GBuffer size --- src/RenderConfigs.cpp | 9 +-------- src/RenderConfigs.hpp | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/RenderConfigs.cpp b/src/RenderConfigs.cpp index d399818..8cc4ee1 100644 --- a/src/RenderConfigs.cpp +++ b/src/RenderConfigs.cpp @@ -183,11 +183,6 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s normalConf->SetMaxFilter(Gal::Filtering::Bilinear); normal = gal->BuildTexture(normalConf); - auto addColorConf = gal->CreateTexture2DConfig(geomW, geomH, Gal::Format::R8G8B8); - addColorConf->SetMinFilter(Gal::Filtering::Bilinear); - addColorConf->SetMaxFilter(Gal::Filtering::Bilinear); - addColor = gal->BuildTexture(addColorConf); - auto lightConf = gal->CreateTexture2DConfig(geomW, geomH, Gal::Format::R8G8B8); lightConf->SetMinFilter(Gal::Filtering::Bilinear); lightConf->SetMaxFilter(Gal::Filtering::Bilinear); @@ -202,8 +197,7 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s geomFbConf->SetDepthStencil(depthStencil); geomFbConf->SetTexture(0, color); geomFbConf->SetTexture(1, normal); - geomFbConf->SetTexture(2, addColor); - geomFbConf->SetTexture(3, light); + geomFbConf->SetTexture(2, light); geomFramebuffer = gal->BuildFramebuffer(geomFbConf); geomFramebuffer->SetViewport(0, 0, geomW, geomH); @@ -274,7 +268,6 @@ Gbuffer::Gbuffer(size_t geomW, size_t geomH, size_t lightW, size_t lightH, int s {"depthStencil", depthStencil}, {"color", color}, {"normal", normal}, - {"addColor", addColor}, {"light", light}, }; diff --git a/src/RenderConfigs.hpp b/src/RenderConfigs.hpp index 92ce90c..d0adfce 100644 --- a/src/RenderConfigs.hpp +++ b/src/RenderConfigs.hpp @@ -96,7 +96,6 @@ class Gbuffer { std::shared_ptr depthStencil; std::shared_ptr color; //RGB - color std::shared_ptr normal; //RGB - normal - std::shared_ptr addColor; //RGB - addColor std::shared_ptr light; //R - faceLight, G - skyLight, B - unused std::shared_ptr geomFramebuffer; -- cgit v1.2.3