I am currently trying to implement a deferred renderer.
I am mostly following this tutorial: http://bat710.univ-lyon1.fr/~jciehl/Public/educ/GAMA/2007/Deferred_Shading_Tutorial_SBGAMES2005.pdf
Here are some screenshot from my current state. The test scene consists of two cubes and a point light.
1. This first screenshot looks correct

2. The second screenshot is taken from the opposite side. Here you can see that the cube which is further away overlaps the near cube:

3. Because I think this is a problem related to the depth buffer I rendered the depth buffer to the screen and everything was white. Then I manually created a texture and filled it with the z-values. The next two screenshots show this manually created depth texture:


Does anyone have an idea what the problem could be? If you need source code of specific parts just let me know.
Thx in advance.






