As you can see, it's as if the buffer is not being cleared, but glClear() is being called every frame with the mask set to the depth and color bits
Do you clear all render targets ?
The bug seems to be in the way you render your game and not in the shader. Could you show some rendering code too.
Ahhh...the problem was no calling glClear AFTER binding the framebuffer! Thanks