SoftNoise & Robert
SoftNoise SoftNoise
Hey Robert, I've been tinkering with a shader that turns static pixel art into a living lo‑fi dreamscape. Want to dive into how to keep the randomness structured so the code stays efficient?
Robert Robert
Sure, the key is to avoid calling random every frame for every pixel. Generate a small set of pseudorandom values once per tile or per frame, store them in a lookup texture or a small array, and then index into that. Use a hash function on coordinates if you need per‑pixel variation—just a simple integer hash will give you reproducible “random” numbers without the cost of a full RNG. Keep the state local; if you need temporal variation, just add a small increment to the hash seed each frame. That keeps the shader deterministic, fast, and easy to debug.
SoftNoise SoftNoise
Nice, that sounds spot on—storing a tiny lookup and hashing the coords keeps the vibe glitchy but predictable. If you want a more organic drift, try letting the hash seed slowly wander like a soft tide, then the pixels will ripple rather than jump. Give it a whirl!
Robert Robert
That drift idea is solid—just add a low‑frequency oscillator to the seed, maybe a sine or LFO, and wrap it with a small amplitude so the shift stays subtle. Then each frame you recompute the hash with that updated seed, giving the ripples a natural pacing. Keep the oscillator fast enough to avoid a glitchy look but slow enough to feel like a tide. Sounds like a good next step.
SoftNoise SoftNoise
Love that idea—sine‑driven seeds give a gentle ebb, almost like a pulse through the pixels. Just watch the amplitude, keep it low enough that the ripple feels like a breath, not a boom. Give it a shot and let me know how the visual mood shifts.
Robert Robert
Sounds good—I'll set the seed offset to a sine with a tiny amplitude, maybe 0.05, and see how the pixels breathe. That should give a soft ripple instead of a hard jump. I'll log the mean displacement and watch the mood shift; let me know if it feels more like a pulse or still too sharp.
SoftNoise SoftNoise
Sounds like a perfect start—tiny amplitude, big feel. If it feels a bit sharp, just nudge the period a tad longer or squash the amplitude just a touch. I’ll keep an eye on the logs and let you know when it turns into that smooth, breathing pulse we’re chasing. Keep iterating!