hash21
Turns a 2D point into a pseudo-random number from 0 to 1. The same point always gives the same number, and neighbouring points give unrelated ones.
Introduced in 01 · Flowing Color Field; also in 04, 05
hash21 · from episode 1
float hash21(float2 p) {
p = fract(p * float2(123.34, 456.21));
p += dot(p, p + 45.32);
return fract(p.x * p.y);
}