Last active
May 26, 2017 12:54
-
-
Save m0ppers/2ab9a0da93e1841a5a29a314f62ff785 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#l 2 8 0 | |
pi $0, si 0 | |
pi $1, si 1 | |
pi $2, si 2 | |
pi $4, si 4 | |
pi $8, si 8 | |
pi $12, si 12 | |
pi $16, si 16 | |
pi $127, si 127 | |
pi $shifter, pi 0 | |
pi $roffset, pi 0 | |
pi $goffset, pi 0 | |
pi $boffset, pi 0 | |
pi $255, si 255 | |
pi $changecount, si 0 | |
pi $changemod, si 8 | |
pi $changer, si 0 | |
pi $glitchcount, si 0 | |
pi $glitchmod, si 8 | |
pi $glitch, si 7 // EIN GLITCH IN JEDEM SIEBTEN EI | |
pi $sxoffset, si 0 | |
pi $syoffset, si 2 | |
pi $sw, si 16 | |
pi $sh, si 16 | |
pi $dw, si 64 | |
pi $dh, si 64 | |
@mainloop | |
pi $x, si 0 | |
@gxloop | |
pi $sinv, s $x, add $shifter, mul $2 | |
pi $yoffset, sin $sinv, div $8 | |
pi $y, si 0 | |
@gyloop | |
pi $r, s $y, add $roffset, div $16, mul $16, add $127 | |
pi $g, s $y, sub $goffset, div $16, mul $2 | |
pi $b, s $y, sub $boffset, div $16, mul $4 | |
pi $realy, s $y, add $yoffset | |
x $x, y $realy, zi 4, s $r | |
x $x, y $realy, zi 5, s $g | |
x $x, y $realy, zi 6, s $b | |
pi $y, add $1, seq $0, j @gyloop | |
pi $x, add $1, seq $0, j @gxloop | |
pi $shifter, add $1 | |
/////////////////// ----- GRADIENT END ------ | |
pi $halfdw, s $dw, div $2 | |
pi $halfdh, s $dh, div $2 | |
pi $y, si 0 | |
@yloop | |
pi $fac1, s $y | |
pi $fac2, s $sh | |
pi $div, s $dh | |
xi 0, yi 1, zi 17, s $fac1, sf $fac2 | |
pi $sy, s $syoffset | |
pi $_x, si 0 | |
pi $_r, si 0 | |
@ycalc | |
x $_x, yi 1, zi 17, g $v | |
pi $_f, s $v, div $div | |
pi $sy, add $_f | |
pi $_r2, s $v, mod $div | |
pi $_r, add $_r2 | |
pi $_f, s $_r, div $div | |
pi $_r, mod $div | |
pi $sy, add $_f | |
pi $_x, add $1 | |
pi $v, seq $0, j @ycalc | |
pi $x, si 0 | |
@xloop | |
pi $fac1, s $x | |
pi $fac2, s $sw | |
pi $div, s $dw | |
xi 0, yi 0, zi 17, s $fac1, sf $fac2 | |
pi $sx, s $sxoffset | |
pi $_x, si 0 | |
pi $_r, si 0 | |
@xcalc | |
x $_x, yi 0, zi 17, g $v | |
pi $_f, s $v, div $div | |
pi $sx, add $_f | |
pi $_r2, s $v, mod $div | |
pi $_r, add $_r2 | |
pi $_f, s $_r, div $div | |
pi $_r, mod $div | |
pi $sx, add $_f | |
pi $_x, add $1 | |
pi $v, seq $0, j @xcalc | |
//pi $sx, s $x, mul $sw, div $dw | |
x $sx, y $sy, zi 8, g $r | |
x $sx, y $sy, zi 9, g $g | |
x $sx, y $sy, zi 10, g $b | |
x $sx, y $sy, zi 11, g $a | |
pi $targetx, si 127, sub $halfdw, add $x | |
pi $targety, si 127, sub $halfdh, add $y | |
x $targetx, y $targety, zi 12, s $r | |
x $targetx, y $targety, zi 13, s $g | |
x $targetx, y $targety, zi 14, s $b | |
x $targetx, y $targety, zi 15, s $a | |
pi $x, add $1, seq $dw, j @xloop | |
pi $y, add $1, seq $dh, j @yloop | |
zi 4, cpa $12 | |
pi $changecount, add $1 | |
pi $changemodder, s $changecount, mod $changemod, seq $0, j @skipimagerotate | |
pi $changer, add $1 | |
pi $imagerotate, s $changer, mod $2 | |
pi $sxoffset, si 16, mul $imagerotate | |
@skipimagerotate | |
pi $dw, add $1 | |
pi $dh, add $1 | |
w $1 | |
pi $glitchcount, add $1 | |
pi $glitcher, s $glitchcount, mod $glitchmod | |
seq $glitch, j @mainloop | |
l $x | |
pi $x, si 0, rnd $x // $x = random() | |
pi $y, si 4, rnd $y // $y = random() (in range of 0 - 3) | |
pi $v, si 0, rnd $v // $v = random() | |
x $x, y $y, zi 1, s $v // GLITCH!! | |
j @mainloop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment