Advertisement
Guest User

Untitled

a guest
Aug 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. #@gui Cascading self glitching: fx_self_glitching_cascade, fx_self_glitching_cascade_preview(1)
  2. #@gui : Zeroth shift = point(50,50)
  3. #@gui : Boundary = choice(3,"Zero","Nearest","Periodic","Mirror")
  4. #@gui : Iterations = int(3,1,10)
  5. #@gui : Power = float(0,-5,5)
  6. #@gui : Bias = float(0,-255,255)
  7. #@gui : Negate = bool(0)
  8. #@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)")
  9. #@gui : First shift target = point(50,50)
  10. #@gui : Cascade centre point = point(50,50)
  11. #@gui : Shift randomness = float(0.75,0,4)
  12. #@gui : Boundary = choice(3,"Zero","Nearest","Periodic","Mirror")
  13. #@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)
  14. #@gui : sep = separator(), note = note("<small>Author: <i><a href="https://goo.gl/Ryf7Cv">David Tschumperl&#233;</a></i>. Latest update: <i>2018/08/19</i>.</small>")
  15. fx_self_glitching_cascade :
  16. shift {$1-50}%,{$2-50}%,0,0,$3,0
  17. repeat $4
  18. repeat $! l[$>] split_opacity l[0]
  19. f "init(
  20. shift = ([w,h]-1)*([$11,$12]-[$9,$10]+(2*(u-0.5)*sqrt((($11-$9)^2)+(($12-$10)^2))*($13^3)))%;
  21. const sign = $7?-1:1;
  22. const boundary = $14;
  23. );
  24. val = sign*((2^$5)*j(shift) + $6);
  25. ($8==0?(val + i):
  26. $8==1?(val * i):
  27. $8==2?(val & i):
  28. $8==3?(val | i):
  29. $8==4?xor(val,i):
  30. $8==5?(val^i):
  31. $8==6?(i^val):
  32. $8==7?(val%i):
  33. $8==8?(i%val):
  34. $8==9?(val / i):
  35. $8==10?(i / val):
  36. $8==11?(i - val):
  37. $8==12?(val - i):
  38. $8==13?(val << i):
  39. $8==14?(i << val):
  40. $8==15?(val >> i):
  41. $8==16?(i >> val):
  42. $8==17?avg(i,val):
  43. $8==18?round(val,i,0):
  44. $8==19?round(i,val,0):
  45. $8==20?i*sin(val*2*pi/255):
  46. $8==21?val*sin(i*2*pi/255):
  47. $8==22?i*cos(val*2*pi/255):
  48. $8==23?val*cos(i*2*pi/255):
  49. $8==24?(i*tan(val*pi/255)):
  50. (val*tan(i*pi/255))
  51. )%255;
  52. "
  53. endl a c endl done done
  54. fx_self_glitching_cascade_preview :
  55. fx_self_glitching_cascade $*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement