Well, here’s the code
#@cli rep_splinter_blur: _length,_thickness,_duplicates,_angle,_sharpen_multiplier,-1<=_balance<=1,_boundary={ 0=None | 1=Neumann | 2=Periodic | 3=Mirror },_bisided={ 0=one-line | two-line }
rep_splinter_blur:
skip ${1=10%},${2=5%},${3=5},${4=0},${5=0},${6=0},${7=1},${8=0}
start_ang={$4}
angs_per_dups={360/$3}
m "average_output: ti=$! add / $ti"
if $6==-1 m "output_splinter : min"
elif $6<0&&$6>-1 m "output_splinter : +average_output +min[^-1] f. lerp(i#-2,i,abs($6)) k."
elif $6==0 m "output_splinter : average_output"
elif $6>0&&$6<1 m "output_splinter : +average_output +max[^-1] f. lerp(i#-2,i,$6) k."
elif $6==1 m "output_splinter : max"
else error (-1<=\$\6<=1)=F
fi
repeat $! l[$>]
hypo={(sqrt(w^2+h^2)/2)}
if ${is_percent\ $1} length={round($1*$hypo)}
else length={round($1)}
fi
if ${is_percent\ $2} thickness={round($2*$hypo)}
else thickness={round($2)}
fi
ds={d},{s}
if $7!=2 expand_xy $length,$7 fi
repeat $3
ang={$start_ang+$angs_per_dups*$>}
+rep_splinter_blur_convolve_map. $length,$thickness,$ang,$5,$8
+convolve_fft[0] [-1]
rm..
done
rm[0]
output_splinter
if $7!=2 shrink_xy $length fi
endl done
um average_output,output_splinter,splinter_convolve
#@cli rep_splinter_blur_convolve_map: _length,_thickness,_angle,_sharpen_multiplier,_bisided={ 0=one-line | two-line }
#@cli : Create a convolve map for directional blur. This enables one to create a convolve map for one-direction motion blur.
#@cli : Default values: '_length=10%','_thickness=5%','_angle=0','_bisided=1'
rep_splinter_blur_convolve_map : skip ${1=10%},${2=5%},${3=0},${5=1}
repeat $! l[$>]
hypo={(sqrt(w^2+h^2)/2)}
if ${is_percent\ $1} length={round($1*$hypo)} else length={round($1)} fi
if ${is_percent\ $2} thickness={round($2*$hypo)} else thickness={round($2)} fi
ds={d},{s}
rm
{$length},{$length},1,1
f "begin(
const sides=$5;
const thickness="$thickness";
const hw=(w-1)/2;
const hh=(h-1)/2;
const ang=($3/180)*pi*-1;
const cos_ang=cos(ang);
const sin_ang=sin(ang);
rot_x(a,b)=a*cos_ang-b*sin_ang;
rot_y(a,b)=a*sin_ang+b*cos_ang;
cutval(v)=v<0?0:v;
maxcutval(v)=v>1?1:v;
);
xx=x/w-.5;
yy=y/h-.5;
lx=x-hw;
ly=y-hh;
radial_grad=1-sqrt(xx^2+yy^2)*2;
radial_grad=cutval(radial_grad);
line=1-maxcutval(abs(rot_x(lx,ly))/thickness);
sides?(line?radial_grad*line):(rot_y(lx,ly)<=0?(line?radial_grad*line));
"
/ {is}
if $4
avgstat={ia}
+f (i*2-$avgstat)
f.. lerp(i,i#1,min(1,$4))
k[0]
fi
r 100%,100%,$ds,0,1
endl done
It looks like this.