home/ atoms/ glsl-feedback-gain-contraction

A GLSL double-buffer feedback pass with gain ≥ 1 saturates to white within a few frames

When implementing frame-to-frame feedback in glslViewer via u_doubleBuffer0, the accumulated value compounds each frame. If the loop gain is 1 or greater it saturates to white (1.0) within seconds. The feedback recurrence must be a contraction: multiply the fed-back term by a value strictly less than 1 (e.g. *0.95) and/or fade toward black each frame. This is the same <1-gain rule as Hydra and Glicol feedback across domains.

Examples

col = texture2D(u_doubleBuffer0, uv) * 0.95 + newSignal * 0.05; // safe decay col = texture2D(u_doubleBuffer0, uv) + newSignal; // blows out to white

Assessment

A GLSL feedback shader turns white within 3 seconds. Identify the likely gain value and rewrite the feedback term to create a trail that decays over roughly 20 frames.

“Feedback runaway / blow-out:** a `u_doubleBuffer0` accumulation with gain ≥ 1 saturates to white in a few frames. Keep the recurrence a **contraction**: multiply the fed-back term by `< 1.0` (e.g. `*0.95`)”
context/ · L1-instruments/glsl/gotchas.md · chunk 1