4 ms·
For my stack based texture generator I used (utilizing https://github.com/skeeto/hash-prospector https://github.com/skeeto/hash-prospector ) let intHash = x
by Lerc 4y ago
For my stack based texture generator I used (utilizing https://github.com/skeeto/hash-prospector https://github.com/skeeto/hash-prospector )
let intHash = x => {
x *= 0xed5ad4bb;
x ^= x >> 11;
x = Math.imul(x,0xac4c1b51);
x ^= x >> 15;
x = Math.imul(x,0x31848bab);
x ^= x >> 14;
return x;
}
With a little wrapper to blend it with a seed via intHash(x+inthash(x+seed))
Used in a Perlin flame here http://fingswotidun.com/stackie/?code=x1x-*5*dx4**y3*p%2By!-&palette=xy!1%2B*e&seed=991150 http://fingswotidun.com/stackie/?code=x1x-*5*dx4**y3*p%2By!-...
- WaxedChewbacca 4y ago