In my last post I stated that I was having trouble with rendering to a depth texture. But I believe the following has demonstrated that the render to texture is successful and the issue is I can't read from the texture after the rendering is complete.
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo); float depth; glReadPixels(0, 0, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); printf("depth value is %f",depth);
float mapSample = (texture( gCascadedShadowMap, TexCoord).x); FragColor = vec4(mapSample,mapSample,mapSample,1);
Edited by mv348, 28 July 2013 - 09:49 PM.