question about ping pong technique

I have read an article.

in one section, it says: textures are read-only objects, which forced

the programmers to compute one step of an algorithm , store the result in the

frame buffer, and start the next step using a texture reference to the newly produced

pixels. This technique is known as ping-ponging.

does anyone know “one step of an algortihm” ?

and what is ping-pong?

1 Like

“ping pong” is a fuzzy term without a precise definition. It tends to be used to describe programs or algorithms that alternate writing between two buffers. Often you’ll take data from buffer A, process it, and feed the results into buffer B. Then you’ll process buffer B, feeding the results back into buffer A, and then repeating the cycle Basically this is just a memory transfer organization/optimization.

It’s called ping-pong because like the game (sometimes called table tennis), the ball keeps moving between the two alternating sides.

If there’s more than 2 buffers, sometimes the terms circular buffer or “log roller” is used. (log rollers being multiple logs used like wheels to slide a heavy stone… when the stone has moved enough to roll off the back log, you move the log it to the front and keep going.)

1 Like