Original Post
I'm currently using a shader to output offscreen buffers (deferred buffers, light accumulation buffers, etc...). But now I'm having a problem with my shadow mapping and would like to view my depth maps, which are currently just stored as GL_DEPTH_COMPONENT (previously GL_DEPTH_COMPONENT24). The problem is that the output is either all white or all black. In my "debugging shader" I've been using the glsl mod command and also trying to scale the output to set different results, I can mask the output to a certain color, but if I call mod on it with any value, it always comes out black. I would like to see a nice gradient of gray-scale as I commonly see in various tutorials, however I have not been able to achieve this. On a side now, I had shadow mapping working before, but the output of the depth buffer has never been "pretty" and it certainly needs work anyway. And I figured this would be a good way of debugging all depth maps. Thoughts?... thanks in advance! As an extra note, when I output the depth buffer from the deferred prepass, it is also all white, however it definitely uses the depth buffer, because the depth test works (objects don't show through each other, but I bet you knew what I meant).