Try to fix incomplete fbo attachement

This commit is contained in:
Vincent Lejeune 2014-11-02 00:00:21 +01:00
parent 4e6a7b5192
commit cedbb32a17
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);