summaryrefslogtreecommitdiff
path: root/gfx/gl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 18:09:49 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 18:09:49 +0000
commitbb08f18d02f5b9d3dd2566dfcc0837d28265d221 (patch)
tree97b909bb061f4580ba2541d37c66479242a0e71f /gfx/gl
parentIncrease gBuffer position data to 32bit and drop all the alpha channels (diff)
downloadilt-bb08f18d02f5b9d3dd2566dfcc0837d28265d221.tar.bz2
ilt-bb08f18d02f5b9d3dd2566dfcc0837d28265d221.tar.xz
ilt-bb08f18d02f5b9d3dd2566dfcc0837d28265d221.zip
Disable depth test, remove unnecesary texture binds and clear for lighting pass
The initial texture render covers the whole screen anyway
Diffstat (limited to 'gfx/gl')
-rw-r--r--gfx/gl/sceneRenderer.cpp6
1 files changed, 1 insertions, 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);