mrdoob/glsl-sandbox

uniform sampler2D backbuffer

wangjiangchuan opened this issue · 2 comments

what is the sampler2D? is it a black picture? I don't know it at all. If it is a picture, can I find it in the github code?

It's a texturemap of the previous animation frame. It can be used to have effects propagate from one frame to the next.

For example, it can be used to implement Conway's Game of Life:

http://glslsandbox.com/e#207.3

Thank you a lot. I understand it. It just like when you move you mouse, backbuffer is the last pisition of your mouse.