Efficient way of reading depth values from depth buffer

前端 未结 2 1363
暗喜
暗喜 2021-02-09 14:54

For an algorithm of mine I need to be able to access the depth buffer. I have no problem at all doing this using glReadPixels, but reading an 800x600 window is extremely slow (F

相关标签:
2条回答
  • 2021-02-09 15:16

    The fastest way of doing this is using asynchronous pixel buffer objects, there's a good explanation here:

    http://www.songho.ca/opengl/gl_pbo.html

    0 讨论(0)
  • 2021-02-09 15:16

    I would render to a FBO and read its depth buffer after the frame has been rendered. PBOs are outdated technology.

    0 讨论(0)
提交回复
热议问题