Rendering & implementation · 7 / 10

Ping-Pong Buffers / Double Buffering

読み元と書き先を交互に交換して反復計算する。

Compare in motion

育つ模様

Synchronized comparison
AReference
同じバッファを読み書きする

同じバッファを読み書きする

BPing-Pong Buffers / Double Buffering100%
反復更新で前の値を壊さない

反復更新で前の値を壊さない

Loading demo…

Scrub to pause and inspect. At 0%, B matches A; at 100%, B shows the effect. The scene repeats every 8 seconds.

Look for: 読み元と書き先を交換 → 次フレームの場になる。

This model simplifies the technique to show its use case and effect. Operation counts describe the model; they are not performance measurements.

Read the storyboard

例: 育つ模様

  1. 1. Start

    前フレームの場がある

  2. 2. Change

    読み元と書き先を交換

  3. 3. Result

    次フレームの場になる

反復更新で前の値を壊さない。時間変化を示す模式図です。実際の描画結果や処理速度を再現したものではありません。

How it works

  1. 1. Input

    二つの更新バッファ

  2. 2. Process

    読み元と書き先を交換

  3. 3. Result

    前の結果を壊さず反復

A schematic of Ping-Pong Buffers / Double Buffering. It shows the relationship between input, process, and result; exact values and rendering depend on the implementation.

Further reading

Unity ComputeShader ↗

A general reference for this subcategory.