Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. #@gui Gradient norm [JR's mod] : fx_jr_gradient_norm, fx_jr_gradient_norm_preview(1)
  2. #@gui : Smoothness = float(0,0,10)
  3. #@gui : Contrast = float(0.45,0,1.5)
  4. #@gui : Min threshold = float(40,0,100)
  5. #@gui : Max threshold = float(60,0,100)
  6. #@gui : Negative = bool(0)
  7. #@gui : Include direction = bool(0)
  8. #@gui : Scale X = float(1,0,5)
  9. #@gui : Scale Y = float(1,0,5)
  10. #@gui : Interpolation = choice(2,"Nearest","Average","Bilinear","Bicubic")
  11. #@gui : Alpha = bool(0)
  12. #@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)
  13. #@gui : sep = separator(), note = note("<small>Author: <i><a href="http://ow.ly/wpsV30fzhdI">David Tschumperl&#233;</a></i>. Latest update: <i>2010/29/12</i>.</small>")
  14.  
  15. jr_dir2rgb :
  16. v - channels 0,1 repeat $! l[$>] nm={0,n}
  17. s c complex2polar round.. 0.001
  18. *. {180/pi} %. 360 100%,100%,1,1,1 mv... $!
  19. c 0,360 if {im!=iM} n. 0,1 else f. 1 fi
  20. a c hsv2rgb
  21. nm $nm endl done v +
  22.  
  23. jr_gradient_norm :
  24. b $1 gradient_norm c 0,255 ^ $2
  25. c $3%,$4%
  26. if $5 negate fi
  27. n 0,255
  28.  
  29. fx_jr_gradient_norm :
  30. repeat $! l[$>]
  31. if {$9==3}
  32. inter=5
  33. else
  34. inter={1+$9}
  35. fi
  36. if {$7!=1||$8!=1}
  37. ww={w}
  38. hh={h}
  39. shift -0.5,-0.5,0,0,1
  40. r {max(1,$7*w)},{max(1,$8*h)},100%,100%,$inter
  41. fi
  42. if $6
  43. +l luminance gradient append c
  44. blur $1 orientation +jr_dir2rgb
  45. endl rm[1]
  46. if $5
  47. l[1]
  48. rgb2hsv8 100%,100%,1,1 f[1] "j(#0,0,0,0,2)" f[0] "[i0,i1,255]" hsv82rgb[0] a c
  49. fx_solidify_td 100,0,10,2,0
  50. rgb2hsv8 f "[i0,i1,255]" hsv82rgb
  51. endl
  52. fi
  53. fi
  54. jr_gradient_norm[0] ${1-5}
  55. if {$7!=1||$8!=1}
  56. r $ww,$hh,100%,100%,$inter
  57. fi
  58. if $6 blend multiply fi
  59. if $10 rgb2hsv8 100%,100%,1,1 f[1] "j(#0,0,0,0,2)" f[0] "[i0,i1,255]" hsv82rgb[0] a c fi
  60. endl done
  61. fx_jr_gradient_norm_preview :
  62. fx_jr_gradient_norm $*
  63. #gui_split_preview "fx_jr_gradient_norm $*",${-3--1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement