Contrary to TIC-80, PICO-8 has a built-in fillp() ("fill pattern") function that accepts a 4x4 pattern, and can be used with e.g. rect() or line(). So a pre-computed table of all Bayer values is more useful than the matrix itself.
@0xSim I've been using a little function to give me a halftone dithered gradient between two palette colours:
function cd(d,ps,pe)
d=1-d
local mv=#ht*(pe-ps+1)
local i=mv*d
if(i<#ht)return false
local c1=mid(ps,pe,ps+(i#ht))
local c2=mid(ps,pe,c1-1)
color((c1<<4)+c2)
fillp(ht[ceil(i%#ht)])
return c1
end
Add comment