opengl-esopengl-es-3.0opengl-es-3.1

sample depth from default frame buffer? (GL ES 3)


I'm wondering if it is possible to bind the default frame buffer's depth as a texture so that it can be sampled from in a fragment shader (during rendering passes which do not write to that depth buffer)? If so, some pointers would be appreciated.


Solution

  • You cannot bind any of the native window surface attachments as textures; it's simply not possible in the API.