From bb08f18d02f5b9d3dd2566dfcc0837d28265d221 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 6 Dec 2022 18:09:49 +0000 Subject: Disable depth test, remove unnecesary texture binds and clear for lighting pass The initial texture render covers the whole screen anyway --- gfx/gl/sceneRenderer.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp index 9f7143a..0b2da0f 100644 --- a/gfx/gl/sceneRenderer.cpp +++ b/gfx/gl/sceneRenderer.cpp @@ -88,11 +88,7 @@ SceneRenderer::render(const SceneProvider & scene) const glViewport(0, 0, size.x, size.y); glCullFace(GL_BACK); glDisable(GL_BLEND); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, gPosition); - glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, gNormal); + glDisable(GL_DEPTH_TEST); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, gAlbedoSpec); glActiveTexture(GL_TEXTURE3); -- cgit v1.2.3