summaryrefslogtreecommitdiff
path: root/gfx/gl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 17:55:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 17:55:56 +0000
commitc979b221d0ec68333c38a5896662b1a6892bebc6 (patch)
treed4162dcefe0ab0a1d48b615e24fb04ce8bde469e /gfx/gl
parentCentre shadow map at 0,0 until we can do better (diff)
downloadilt-c979b221d0ec68333c38a5896662b1a6892bebc6.tar.bz2
ilt-c979b221d0ec68333c38a5896662b1a6892bebc6.tar.xz
ilt-c979b221d0ec68333c38a5896662b1a6892bebc6.zip
Increase gBuffer position data to 32bit and drop all the alpha channels
16bit float is insufficient for decent shadow accuracy and the alpha channel is pointless in a delayed render.
Diffstat (limited to 'gfx/gl')
-rw-r--r--gfx/gl/sceneRenderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp
index 56e8f73..9f7143a 100644
--- a/gfx/gl/sceneRenderer.cpp
+++ b/gfx/gl/sceneRenderer.cpp
@@ -33,10 +33,10 @@ SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) :
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, data, 0);
};
- configuregdata(gPosition, GL_RGBA16F, GL_FLOAT, GL_COLOR_ATTACHMENT0);
- configuregdata(gNormal, GL_RGBA16F, GL_FLOAT, GL_COLOR_ATTACHMENT1);
- configuregdata(gAlbedoSpec, GL_RGBA, GL_UNSIGNED_BYTE, GL_COLOR_ATTACHMENT2);
- configuregdata(gIllumination, GL_RGBA16F, GL_FLOAT, GL_COLOR_ATTACHMENT3);
+ configuregdata(gPosition, GL_RGB32F, GL_FLOAT, GL_COLOR_ATTACHMENT0);
+ configuregdata(gNormal, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT1);
+ configuregdata(gAlbedoSpec, GL_RGB, GL_UNSIGNED_BYTE, GL_COLOR_ATTACHMENT2);
+ configuregdata(gIllumination, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT3);
glBindRenderbuffer(GL_RENDERBUFFER, depth);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, size.x, size.y);