I want to render the DepthMap with FBOs, but when I render the scene, the result is a texture with the background color and the texture of the ColorAttachement0 is darker than the real image.
I’ve tried several tutorials but I don’t know what I’m doing wrong.
I use the OpenTK framework.
It would be realy nice if anyone could help me.
The Code: http://codepad.org/4cOIutjD
Use a depth attachment with your fbo, and render to this.
I can render the DepthMap.
But the DepthMap is very bad, it seems to be a constant gray value. Can I set some properties for the DepthMap so that the gray values will be more different?
If I render all of my model in the viewport, there is a white DepthMap although the Depth difference of the model is more than 100, so there must be a noticeable DepthMap and no white respectively light grey DepthMap.
Here is a screenshot of the DepthMap