uniform float uRandom; // JavaScript will change each frame void main() { ... // Create new pixels on top float x = ( 1.0 - STEP ) * fract( uRandom ); if ( shouldSpawn( vec2( x, 1.0 - 2.0 * STEP ) ) ) { color.r = 1.0; } }