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

pixels = W:1024 H:1024

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

u = x - 1/1.73*y
v = y*2/1.73 
w = 1 - u - v

idx = floor(u)
idy = floor(v)
idz = floor(w)

gx = fract(u)
gy = fract(v)
gz = fract(w)

gh = length3(gx, gy, gz)
gx = if(gh > 1, 1-gx, gx)
gy = if(gh > 1, 1-gy, gy)
gz = if(gh > 1, 1-gz, gz)

g2x = abs(fract(gx) - 0.5)*2
g2y = abs(fract(gy) - 0.5)*2
g2z = abs(fract(gz) - 0.5)*2

r = mix(gx, g2x, 0.5+x*0.1)
g = mix(gy, g2y, 0.5+x*0.1)
b = mix(gz, g2z, 0.5+x*0.1)

r = mix(mod(idx,2), r, abs(x*0.1))
g = mix(mod(idy,2), g, abs(x*0.1))
b = mix(mod(idz,2), b, abs(x*0.1))
