问题
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