From cedbb32a1761be8f08ef9abd42818bef24123801 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sun, 2 Nov 2014 00:00:21 +0100 Subject: [PATCH] Try to fix incomplete fbo attachement --- src/graphics/render_geometry.cpp | 2 +- src/graphics/rtts.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index a720fcc01..c4998bfc6 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -1026,7 +1026,7 @@ void IrrDriver::renderShadows() glDisable(GL_MULTISAMPLE); for (unsigned i = 0; i < 4; i++) - FrameBuffer::BlitLayer(m_rtts->getShadowMSAAFBO(), m_rtts->getShadowFBO(), i, GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, GL_NEAREST); + FrameBuffer::BlitLayer(m_rtts->getShadowMSAAFBO(), m_rtts->getShadowFBO(), i, GL_COLOR_BUFFER_BIT, GL_LINEAR); glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]); glGenerateMipmap(GL_TEXTURE_2D_ARRAY); } diff --git a/src/graphics/rtts.cpp b/src/graphics/rtts.cpp index 687bc917e..753b529cb 100644 --- a/src/graphics/rtts.cpp +++ b/src/graphics/rtts.cpp @@ -224,7 +224,7 @@ RTT::RTT(size_t width, size_t height) if (UserConfigParams::m_shadows && !irr_driver->needUBOWorkaround()) { shadowColorTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_R32F, GL_RED, GL_FLOAT, 10); - shadowDepthTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_DEPTH_COMPONENT32, GL_DEPTH_STENCIL, GL_DEPTH_COMPONENT, 10); + shadowDepthTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 10); somevector.clear(); somevector.push_back(shadowColorTex); @@ -235,7 +235,7 @@ RTT::RTT(size_t width, size_t height) glTexStorage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 8, GL_R32F, 1024, 1024, 4, true); glGenTextures(1, &shadowDepthMSAATex); glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, shadowDepthMSAATex); - glTexStorage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 8, GL_DEPTH_COMPONENT32, 1024, 1024, 4, true); + glTexStorage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 8, GL_DEPTH24_STENCIL8, 1024, 1024, 4, true); somevector.clear(); somevector.push_back(shadowColorMSAATex);