Most shaders are single-pass — one calculation per pixel per frame. Multi-pass rendering changes the game by letting you write intermediate results to framebuffers (Buffers A–D) and read them back in later passes via iChannel0–3. This unlocks feedback loops where each frame builds on the last, enabling effects like motion blur, fluid simulation, particle physics, and trails. The key concept is the ping-pong pattern: read last frame's buffer, compute new values, write them back for next frame.
Key Concepts
iChannel uniforms
framebuffer ping-pong
feedback loops
multi-pass pipeline
Try this shader live in the Shader Sandbox editor with real-time preview.