Get the last frame color from GLSL

那年仲夏 提交于 2019-12-10 12:09:12

问题


I want to processing a texture in the Fragment Shader. However, current frame should base on last frame information, such as neighbor positions. So I need write current frame into one place/buffur/object and read it in next loop.

Can someone give me a direction about my requirement?


回答1:


Use Frame Buffer Objects. Create two FBOs into which you render alternatingly, each time binding the other one as texture for sourcing the data.



来源:https://stackoverflow.com/questions/8291314/get-the-last-frame-color-from-glsl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!