History tiles
This is the simplest example using output history. The shader flashes a new solid color for the first 4 frames. On the 5th frame, it samples the stored frames using historyZ and arranges them in a grid. After the 5th frame, the demo pauses so you can inspect it.