Category : shadow-mapping

For cascaded shadow mapping I’m trying to use a GL_TEXTURE_2D_ARRAY for the individual shadow maps. However following tutorials found online and even looking up things in a textbook I can’t seem to create a working framebuffer, as it always errors with GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT. The code: glGenFramebuffers(1, &m_DepthMap.m_FrameBuffer); glGenTextures(1, &m_DepthMap.m_DepthTexture); glBindTexture(GL_TEXTURE_2D_ARRAY, m_DepthMap.m_DepthTexture); glTexImage3D( GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT32F, Renderer::m_ShadowMapResolution, ..

Read more