#https://www.shadertoy.com/view/Xl2XDm

pixels = W:1024 H:1024

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

c = 1.0/(3.0*pow(2.0, 8.0))
a = 0.55648
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
u = u*(sin(a)*0.5 + 1.5)
v = v*(sin(a)*0.5 + 1.5)
s = 0.3

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

u = abs(u) - s
v = abs(v) - s
x = u
y = v
u = x*cos(a)-y*sin(a)
v = y*cos(a)+x*sin(a)
s = s/2

k = length2(u, v)
o = if(k > c, 0.0, 1.0)

r = o
g = o
b = o
