#https://www.shadertoy.com/view/4s2yD1

pixels = W:1024 H:1024

x = from -16 to 16 W
y = from -16 to 16 H

gx = floor(x*7)
gy = floor(y*7)

cx = floor(x)
cy = floor(y)

rx = floor(fract(x)*7)
ry = floor(fract(y)*7)

ox = fract(rx*0.5)*2.0
oy = fract(ry*0.5)*2.0

c = max(ox, oy)
c = c * step(0.5, tex_hash2(gx, gy))
c = c + min(ox, oy)

c = c * (rx * (6.0 - rx))
c = c * (ry * (6.0 - ry))

r = clamp(c, 0.0, 1.0)
g = r
b = r
