Suppose I have a 2D scene to render (orthographic projection), which I render with depth testing enabled. This scene is composed of lots and lots of small tiles, so I render it in bigger chunks to FBOs, to avoid re-rendering lots of triangles every frame.
Now, when I render contents of those FBOs, I also would like to preserve the depth value of every of its pixels/texels.
How should I go about that?
GL ES 2.0 / WebGL compatible solution would be appreciated.