Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gui Cascading self glitching: fx_self_glitching_cascade, fx_self_glitching_cascade_preview(1)
- #@gui : Zeroth shift = point(50,50)
- #@gui : Boundary = choice(3,"Zero","Nearest","Periodic","Mirror")
- #@gui : Iterations = int(3,1,10)
- #@gui : Power = float(0,-5,5)
- #@gui : Bias = float(0,-255,255)
- #@gui : Negate = bool(0)
- #@gui : Operator = choice("Add","Multiply","Bitwise And","Bitwise Or","Bitwise Xor","Power","Reverse Power","Modulo","Reverse Modulo","Divide","Reverse Divide","Subtract","Reverse Subtract","Left Bitwise Shift", "ReverseLBS", "Right Bitwise Shift", "ReverseRBS","Average","Round","Reverse Round","Sine","Reverse Sine","Cosine","Reverse Cosine","Tangent (CPU-intensive)","Reverse Tangent (CPU-intensive)")
- #@gui : First shift target = point(50,50)
- #@gui : Cascade centre point = point(50,50)
- #@gui : Shift randomness = float(0.75,0,4)
- #@gui : Boundary = choice(3,"Zero","Nearest","Periodic","Mirror")
- #@gui : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right","Duplicate horizontal","Duplicate vertical","Checkered","Checkered inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0)
- #@gui : sep = separator(), note = note("<small>Author: <i><a href="https://goo.gl/Ryf7Cv">David Tschumperlé</a></i>. Latest update: <i>2018/08/19</i>.</small>")
- fx_self_glitching_cascade :
- shift {$1-50}%,{$2-50}%,0,0,$3,0
- repeat $4
- repeat $! l[$>] split_opacity l[0]
- f "init(
- shift = ([w,h]-1)*([$11,$12]-[$9,$10]+(2*(u-0.5)*sqrt((($11-$9)^2)+(($12-$10)^2))*($13^3)))%;
- const sign = $7?-1:1;
- const boundary = $14;
- );
- val = sign*((2^$5)*j(shift) + $6);
- ($8==0?(val + i):
- $8==1?(val * i):
- $8==2?(val & i):
- $8==3?(val | i):
- $8==4?xor(val,i):
- $8==5?(val^i):
- $8==6?(i^val):
- $8==7?(val%i):
- $8==8?(i%val):
- $8==9?(val / i):
- $8==10?(i / val):
- $8==11?(i - val):
- $8==12?(val - i):
- $8==13?(val << i):
- $8==14?(i << val):
- $8==15?(val >> i):
- $8==16?(i >> val):
- $8==17?avg(i,val):
- $8==18?round(val,i,0):
- $8==19?round(i,val,0):
- $8==20?i*sin(val*2*pi/255):
- $8==21?val*sin(i*2*pi/255):
- $8==22?i*cos(val*2*pi/255):
- $8==23?val*cos(i*2*pi/255):
- $8==24?(i*tan(val*pi/255)):
- (val*tan(i*pi/255))
- )%255;
- "
- endl a c endl done done
- fx_self_glitching_cascade_preview :
- fx_self_glitching_cascade $*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement