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

pixels = W:1024 H:1024

x = from 0 to 256 W
y = from 0 to 256 H


u = x
v = y
r = if(fract(u) > fract(v), 1, 0)

u = u*0.5
v = v*0.5
g = if(fract(u) > fract(v), 1, 0)

u = u*0.5
v = v*0.5
b = if(fract(u) > fract(v), 1, 0)

u = u*0.5
v = v*0.5
r = if(fract(u) > fract(v), r + 1, r)

u = u*0.5
v = v*0.5
g = if(fract(u) > fract(v), g + 1, g)

u = u*0.5
v = v*0.5
b = if(fract(u) > fract(v), b + 1, b)

u = u*0.5
v = v*0.5
r = if(fract(u) > fract(v), r + 1, r)

u = u*0.5
v = v*0.5
g = if(fract(u) > fract(v), g + 1, g)

u = u*0.5
v = v*0.5
b = if(fract(u) > fract(v), b + 1, b)


