# FFmpeg custom expressions, made with xfade-easing.sh v. 3.6.2
# by Raymond Luckhurst, https://scriptit.uk, https://github.com/scriptituk/xfade-easing

# Uneased transition expressions (rgb24), inline for -filter_complex filterchains

FADE
A*P+B*(1-P)

FADEFAST
st(1,pow(P,1+log(1+abs(A-B)/255)));A*ld(1)+B*(1-ld(1))

FADESLOW
st(1,pow(P,1+log(2-abs(A-B)/255)));A*ld(1)+B*(1-ld(1))

DISSOLVE
st(1,st(1,sin(X*12.9898+Y*78.233)*43758.545)-floor(ld(1)));st(1,ld(1)*2+P*2-1.5);if(gte(ld(1),0.5),A,B)

FADEBLACK
st(1,ifnot(3-PLANE,255));st(2,st(2,clip((P-0.8)/0.2,0,1))*ld(2)*(3-2*ld(2)));st(2,A*ld(2)+ld(1)*(1-ld(2)));st(3,st(3,clip((P-0.2)/0.8,0,1))*ld(3)*(3-2*ld(3)));st(3,ld(1)*ld(3)+B*(1-ld(3)));ld(2)*P+ld(3)*(1-P)

FADEWHITE
st(1,255);st(2,st(2,clip((P-0.8)/0.2,0,1))*ld(2)*(3-2*ld(2)));st(2,A*ld(2)+ld(1)*(1-ld(2)));st(3,st(3,clip((P-0.2)/0.8,0,1))*ld(3)*(3-2*ld(3)));st(3,ld(1)*ld(3)+B*(1-ld(3)));ld(2)*P+ld(3)*(1-P)

FADEGRAYS
st(1,if(3-PLANE,(a0(X,Y)+a1(X,Y)+a2(X,Y))/3,A));st(2,if(3-PLANE,(b0(X,Y)+b1(X,Y)+b2(X,Y))/3,B));st(3,st(3,clip((P-0.8)/0.2,0,1))*ld(3)*(3-2*ld(3)));st(1,A*ld(3)+ld(1)*(1-ld(3)));st(3,st(3,clip((P-0.2)/0.8,0,1))*ld(3)*(3-2*ld(3)));st(2,ld(2)*ld(3)+B*(1-ld(3)));ld(1)*P+ld(2)*(1-P)

PIXELIZE
st(1,min(P,1-P));st(1,ceil(ld(1)*50)/50);st(2,2*ld(1)*min(W,H)/20);st(3,ld(2));st(2,if(gt(ld(1),0),min((floor(X/ld(2))+0.5)*ld(2),W-1),X));st(3,if(gt(ld(1),0),min((floor(Y/ld(3))+0.5)*ld(3),H-1),Y));st(1,ifnot(PLANE,a0(ld(2),ld(3)),ifnot(1-PLANE,a1(ld(2),ld(3)),ifnot(2-PLANE,a2(ld(2),ld(3)),a3(ld(2),ld(3))))));st(2,ifnot(PLANE,b0(ld(2),ld(3)),ifnot(1-PLANE,b1(ld(2),ld(3)),ifnot(2-PLANE,b2(ld(2),ld(3)),b3(ld(2),ld(3))))));ld(1)*P+ld(2)*(1-P)

WIPELEFT
if(gt(X,W*P),B,A)

WIPERIGHT
if(gt(X,W*(1-P)),A,B)

WIPEUP
if(gt(Y,H*P),B,A)

WIPEDOWN
if(gt(Y,H*(1-P)),A,B)

WIPETL
if(lte(Y,H*P)*lte(X,W*P),A,B)

WIPETR
if(lte(Y,H*P)*gt(X,W*(1-P)),A,B)

WIPEBL
if(gt(Y,H*(1-P))*lte(X,W*P),A,B)

WIPEBR
if(gt(Y,H*(1-P))*gt(X,W*(1-P)),A,B)

SLIDELEFT
st(1,trunc(-W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),ifnot(PLANE,b0(ld(3),Y),ifnot(1-PLANE,b1(ld(3),Y),ifnot(2-PLANE,b2(ld(3),Y),b3(ld(3),Y)))),ifnot(PLANE,a0(ld(3),Y),ifnot(1-PLANE,a1(ld(3),Y),ifnot(2-PLANE,a2(ld(3),Y),a3(ld(3),Y)))))

SLIDERIGHT
st(1,trunc(W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),ifnot(PLANE,b0(ld(3),Y),ifnot(1-PLANE,b1(ld(3),Y),ifnot(2-PLANE,b2(ld(3),Y),b3(ld(3),Y)))),ifnot(PLANE,a0(ld(3),Y),ifnot(1-PLANE,a1(ld(3),Y),ifnot(2-PLANE,a2(ld(3),Y),a3(ld(3),Y)))))

SLIDEUP
st(1,trunc(-H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),ifnot(PLANE,b0(X,ld(3)),ifnot(1-PLANE,b1(X,ld(3)),ifnot(2-PLANE,b2(X,ld(3)),b3(X,ld(3))))),ifnot(PLANE,a0(X,ld(3)),ifnot(1-PLANE,a1(X,ld(3)),ifnot(2-PLANE,a2(X,ld(3)),a3(X,ld(3))))))

SLIDEDOWN
st(1,trunc(H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),ifnot(PLANE,b0(X,ld(3)),ifnot(1-PLANE,b1(X,ld(3)),ifnot(2-PLANE,b2(X,ld(3)),b3(X,ld(3))))),ifnot(PLANE,a0(X,ld(3)),ifnot(1-PLANE,a1(X,ld(3)),ifnot(2-PLANE,a2(X,ld(3)),a3(X,ld(3))))))

SMOOTHLEFT
st(1,1+X/W-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

SMOOTHRIGHT
st(1,1+(W-1-X)/W-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

SMOOTHUP
st(1,1+Y/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

SMOOTHDOWN
st(1,1+(H-1-Y)/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

CIRCLECROP
st(1,(2*abs(P-0.5))^3*hypot(W/2,H/2));st(2,hypot(X-W/2,Y-H/2));if(lt(ld(1),ld(2)),ifnot(3-PLANE,255),if(lt(P,0.5),B,A))

RECTCROP
st(1,abs(P-0.5));if(lt(abs(X-W/2),ld(1)*W)*lt(abs(Y-H/2),ld(1)*H),if(lt(P,0.5),B,A),ifnot(3-PLANE,255))

CIRCLEOPEN
st(1,hypot(W/2,H/2));st(2,(P-0.5)*3);st(1,hypot(X-W/2,Y-H/2)/ld(1)+ld(2));st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));A*ld(1)+B*(1-ld(1))

CIRCLECLOSE
st(1,hypot(W/2,H/2));st(2,(0.5-P)*3);st(1,hypot(X-W/2,Y-H/2)/ld(1)+ld(2));st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

VERTOPEN
st(1,2-abs(2*X/W-1)-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

VERTCLOSE
st(1,1+abs(2*X/W-1)-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

HORZOPEN
st(1,2-abs(2*Y/H-1)-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

HORZCLOSE
st(1,1+abs(2*Y/H-1)-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

DIAGTL
st(1,1+X/W*Y/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

DIAGTR
st(1,1+(W-1-X)/W*Y/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

DIAGBL
st(1,1+X/W*(H-1-Y)/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

DIAGBR
st(1,1+(W-1-X)/W*(H-1-Y)/H-P*2);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

HLSLICE
st(1,X/W);st(2,ld(1)-P*1.5);st(2,st(2,clip((ld(2)+0.5)/0.5,0,1))*ld(2)*(3-2*ld(2)));st(1,10*ld(1));st(1,ld(1)-floor(ld(1)));if(gt(ld(2),ld(1)),B,A)

HRSLICE
st(1,(W-1-X)/W);st(2,ld(1)-P*1.5);st(2,st(2,clip((ld(2)+0.5)/0.5,0,1))*ld(2)*(3-2*ld(2)));st(1,10*ld(1));st(1,ld(1)-floor(ld(1)));if(gt(ld(2),ld(1)),B,A)

VUSLICE
st(1,Y/H);st(2,ld(1)-P*1.5);st(2,st(2,clip((ld(2)+0.5)/0.5,0,1))*ld(2)*(3-2*ld(2)));st(1,10*ld(1));st(1,ld(1)-floor(ld(1)));if(gt(ld(2),ld(1)),B,A)

VDSLICE
st(1,(H-1-Y)/H);st(2,ld(1)-P*1.5);st(2,st(2,clip((ld(2)+0.5)/0.5,0,1))*ld(2)*(3-2*ld(2)));st(1,10*ld(1));st(1,ld(1)-floor(ld(1)));if(gt(ld(2),ld(1)),B,A)

RADIAL
st(1,atan2(X-W/2,Y-H/2)-(P-0.5)*PI*2.5);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

ZOOMIN
st(1,st(1,clip((P-0.5)/0.5,0,1))*ld(1)*(3-2*ld(1)));st(2,0.5+(X/W-0.5)*ld(1));st(3,0.5+(Y/H-0.5)*ld(1));st(2,ceil(ld(2)*(W-1)));st(3,ceil(ld(3)*(H-1)));st(1,ifnot(PLANE,a0(ld(2),ld(3)),ifnot(1-PLANE,a1(ld(2),ld(3)),ifnot(2-PLANE,a2(ld(2),ld(3)),a3(ld(2),ld(3))))));st(2,st(2,clip(P/0.5,0,1))*ld(2)*(3-2*ld(2)));ld(1)*ld(2)+B*(1-ld(2))

SQUEEZEH
st(1,0.5+(Y/H-0.5)/P);if(between(ld(1),0,1),st(1,round(ld(1)*(H-1)));ifnot(PLANE,a0(X,ld(1)),ifnot(1-PLANE,a1(X,ld(1)),ifnot(2-PLANE,a2(X,ld(1)),a3(X,ld(1))))),B)

SQUEEZEV
st(1,0.5+(X/W-0.5)/P);if(between(ld(1),0,1),st(1,round(ld(1)*(W-1)));ifnot(PLANE,a0(ld(1),Y),ifnot(1-PLANE,a1(ld(1),Y),ifnot(2-PLANE,a2(ld(1),Y),a3(ld(1),Y)))),B)

HLWIND
st(1,1-X/W);st(2,st(2,sin(0*12.9898+Y*78.233)*43758.545)-floor(ld(2)));st(1,ld(1)*0.8+0.2*ld(2)-(1-P)*1.2);st(1,st(1,clip(ld(1)/-0.2,0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

HRWIND
st(1,X/W);st(2,st(2,sin(0*12.9898+Y*78.233)*43758.545)-floor(ld(2)));st(1,ld(1)*0.8+0.2*ld(2)-(1-P)*1.2);st(1,st(1,clip(ld(1)/-0.2,0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

VUWIND
st(1,1-Y/H);st(2,st(2,sin(X*12.9898+0*78.233)*43758.545)-floor(ld(2)));st(1,ld(1)*0.8+0.2*ld(2)-(1-P)*1.2);st(1,st(1,clip(ld(1)/-0.2,0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

VDWIND
st(1,Y/H);st(2,st(2,sin(X*12.9898+0*78.233)*43758.545)-floor(ld(2)));st(1,ld(1)*0.8+0.2*ld(2)-(1-P)*1.2);st(1,st(1,clip(ld(1)/-0.2,0,1))*ld(1)*(3-2*ld(1)));B*ld(1)+A*(1-ld(1))

COVERLEFT
st(1,trunc(-W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),ifnot(PLANE,b0(ld(3),Y),ifnot(1-PLANE,b1(ld(3),Y),ifnot(2-PLANE,b2(ld(3),Y),b3(ld(3),Y)))),A)

COVERRIGHT
st(1,trunc(W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),ifnot(PLANE,b0(ld(3),Y),ifnot(1-PLANE,b1(ld(3),Y),ifnot(2-PLANE,b2(ld(3),Y),b3(ld(3),Y)))),A)

REVEALLEFT
st(1,trunc(-W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),B,ifnot(PLANE,a0(ld(3),Y),ifnot(1-PLANE,a1(ld(3),Y),ifnot(2-PLANE,a2(ld(3),Y),a3(ld(3),Y)))))

REVEALRIGHT
st(1,trunc(W*P));st(2,ld(1)+X);st(3,(ld(2)-trunc(ld(2)/W)*W)+W*lt(ld(2),0));if(between(ld(2),0,W-1),B,ifnot(PLANE,a0(ld(3),Y),ifnot(1-PLANE,a1(ld(3),Y),ifnot(2-PLANE,a2(ld(3),Y),a3(ld(3),Y)))))

COVERUP
st(1,trunc(-H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),ifnot(PLANE,b0(X,ld(3)),ifnot(1-PLANE,b1(X,ld(3)),ifnot(2-PLANE,b2(X,ld(3)),b3(X,ld(3))))),A)

COVERDOWN
st(1,trunc(H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),ifnot(PLANE,b0(X,ld(3)),ifnot(1-PLANE,b1(X,ld(3)),ifnot(2-PLANE,b2(X,ld(3)),b3(X,ld(3))))),A)

REVEALUP
st(1,trunc(-H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),B,ifnot(PLANE,a0(X,ld(3)),ifnot(1-PLANE,a1(X,ld(3)),ifnot(2-PLANE,a2(X,ld(3)),a3(X,ld(3))))))

REVEALDOWN
st(1,trunc(H*P));st(2,ld(1)+Y);st(3,(ld(2)-trunc(ld(2)/H)*H)+H*lt(ld(2),0));if(between(ld(2),0,H-1),B,ifnot(PLANE,a0(X,ld(3)),ifnot(1-PLANE,a1(X,ld(3)),ifnot(2-PLANE,a2(X,ld(3)),a3(X,ld(3))))))

DISTANCE
NATIVE

HBLUR
NATIVE

GL_ANGULAR
st(1,90);st(2,0);st(1,ld(1)*PI/180);st(1,atan2(0.5-Y/H,X/W-0.5)+ld(1));st(1,ld(1)/2/PI+0.5);if(ld(2),st(1,-ld(1)));st(1,ld(1)-floor(ld(1)));if(gte(1-P,ld(1)),B,A)

GL_BARS
st(1,0);st(1,if(ld(1),X/W,1-Y/H));st(1,st(1,sin(ld(1)*12.9898+0*78.233)*43758.545)-floor(ld(1)));if(gte(1-P,ld(1)),B,A)

GL_BLEND
NATIVE

GL_BOOKFLIP
st(1,X/W-0.5);st(2,0.5-Y/H);st(3,gte(X/W,P));st(4,if(3-PLANE,max(0.7,abs(P-0.5)*2),1));if(lt(ld(1),0),ifnot(ld(3),A,st(5,ld(1)/(1-2*P)+0.5);st(6,ld(2)/(1-4*P*ld(1))+0.5);st(5,ld(5)*W);st(6,(1-ld(6))*H);st(3,ifnot(PLANE,b0(ld(5),ld(6)),ifnot(1-PLANE,b1(ld(5),ld(6)),ifnot(2-PLANE,b2(ld(5),ld(6)),b3(ld(5),ld(6))))));ld(3)*ld(4)),if(ld(3),B,st(5,(ld(1)-0.5+P)/(2*P-1));st(6,ld(2)/(1+4*(1-P)*ld(1))+0.5);st(5,ld(5)*W);st(6,(1-ld(6))*H);st(3,ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))));ld(3)*ld(4)))

GL_BOUNCE
st(1,3);st(2,0);st(3,0.6);st(4,0.075);st(5,0);st(6,1-P);st(1,ld(6)*PI*ld(1));st(1,abs(cos(ld(1)))*(1-sin(ld(6)*PI/2)));if(gt(ld(2),1),st(1,1-ld(1)));st(7,X/W);st(8,1-Y/H);st(2,8-mod(ld(2),2));st(1,ld(ld(2))-ld(1));if(gt(ld(1),0),if(gt(ld(1),ld(4)),B,st(6,st(6,clip((ld(6)-0.95)/0.05,0,1))*ld(6)*(3-2*ld(6)));st(4,(ld(1)/ld(4)-1)*ld(3)+1);st(4,ld(4)*(1-ld(6))+ld(6));st(3,if(3-PLANE,max(ld(5),0),gte(ld(5),0))*255);ld(3)*(1-ld(4))+B*ld(4)),st(ld(2),1+ld(1));st(7,ld(7)*W);st(8,(1-ld(8))*H);ifnot(PLANE,a0(ld(7),ld(8)),ifnot(1-PLANE,a1(ld(7),ld(8)),ifnot(2-PLANE,a2(ld(7),ld(8)),a3(ld(7),ld(8))))))

GL_BOWTIE
NATIVE

GL_BUTTERFLYWAVESCRAWLER
NATIVE

GL_CANNABISLEAF
if(eq(P,1),A,st(1,10*pow(1-P,3.5));st(2,(X/W-0.5)/ld(1));st(3,(0.5-Y/H)/ld(1)+0.35);st(1,atan2(ld(3),ld(2)));st(1,(1+sin(ld(1)))*(1+0.9*cos(8*ld(1)))*(1+0.1*cos(24*ld(1)))*(0.9+0.05*cos(200*ld(1))));if(gte(hypot(ld(2),ld(3)),0.18*ld(1)),A,B))

GL_CHESSBOARD
st(1,8);st(2,X/W*ld(1));st(3,(1-Y/H)*ld(1));st(4,floor(ld(2)));st(5,floor(ld(3)));st(2,ld(2)-ld(4));st(3,bitand(ld(4)+ld(5),1));st(1,1-P);if(if(lt(ld(1),0.5),if(ld(3),gte(ld(1)*2,ld(2))),if(ld(3),1,gte(ld(1)*2-1,ld(2)))),B,A)

GL_CORNERVANISH
st(2,1-st(1,P/2));if(between(X/W,ld(1),ld(2))+between(1-Y/H,ld(1),ld(2)),B,A)

GL_CRAZYPARAMETRICFUN
st(1,4);st(2,1);st(3,120);st(4,0.1);st(5,1-P);st(6,ld(1)-ld(2));st(7,ld(1)/ld(2)-1);st(1,ld(6)*cos(ld(5))+ld(2)*cos(ld(5)*ld(7)));st(2,ld(6)*sin(ld(5))-ld(2)*sin(ld(5)*ld(7)));st(6,X/W-0.5);st(7,0.5-Y/H);st(8,ld(5)*hypot(ld(6),ld(7))*ld(3));st(1,ld(6)*sin(ld(8)*ld(1))/ld(4));st(2,ld(7)*sin(ld(8)*ld(2))/ld(4));st(1,X+ld(1)*W);st(2,Y-ld(2)*H);st(1,ifnot(PLANE,a0(ld(1),ld(2)),ifnot(1-PLANE,a1(ld(1),ld(2)),ifnot(2-PLANE,a2(ld(1),ld(2)),a3(ld(1),ld(2))))));st(2,st(2,clip((ld(5)-0.2)/0.8,0,1))*ld(2)*(3-2*ld(2)));ld(1)*(1-ld(2))+B*ld(2)

GL_CROSSHATCH
st(1,0.5);st(2,0.5);st(3,3);st(4,0.1);st(5,1-P);st(6,hypot(X/W-ld(1),1-Y/H-ld(2))/ld(3));st(1,st(1,sin((1-Y/H)*12.9898+0*78.233)*43758.545)-floor(ld(1)));st(2,st(2,sin(0*12.9898+X/W*78.233)*43758.545)-floor(ld(2)));st(3,ld(5)-min(ld(1),ld(2)));st(2,st(2,clip(ld(5)/ld(4),0,1))*ld(2)*(3-2*ld(2)));st(4,1-ld(4));st(1,st(1,clip((ld(5)-ld(4))/(1-ld(4)),0,1))*ld(1)*(3-2*ld(1)));st(4,gte(ld(3),ld(6)));st(3,(ld(4)*(1-ld(1))+ld(1))*ld(2));A*(1-ld(3))+B*ld(3)

GL_CROSSOUT
st(1,0.05);st(2,(1-P)/2);st(3,X/W-0.5);st(4,0.5-Y/H);st(5,ld(3)+ld(4));st(6,ld(4)-ld(3));if(between(ld(5),-ld(2),ld(2))+between(ld(6),-ld(2),ld(2)),B,st(7,ld(2)+ld(1));ifnot(between(ld(5),-ld(7),ld(7))+between(ld(6),-ld(7),ld(7)),A,st(7,abs(ifnot(eq(gte(ld(3),0),gte(ld(4),0)),ld(5),ld(6))));st(7,(ld(7)-ld(2))/ld(1));B*(1-ld(7))+A*ld(7)))

GL_CROSSWARP
st(1,(1-P)*2+X/W-1);st(1,st(1,clip(ld(1),0,1))*ld(1)*(3-2*ld(1)));st(2,X/W-0.5);st(3,0.5-Y/H);st(4,(ld(2)*(1-ld(1))+0.5)*W);st(5,(0.5-ld(3)*(1-ld(1)))*H);st(6,ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5))))));st(4,(ld(2)*ld(1)+0.5)*W);st(5,(0.5-ld(3)*ld(1))*H);st(7,ifnot(PLANE,b0(ld(4),ld(5)),ifnot(1-PLANE,b1(ld(4),ld(5)),ifnot(2-PLANE,b2(ld(4),ld(5)),b3(ld(4),ld(5))))));ld(6)*(1-ld(1))+ld(7)*ld(1)

GL_CROSSZOOM
NATIVE

GL_CUBE
st(1,0.7);st(2,0.3);st(3,0.4);st(4,3);st(0,1-P);st(2,ld(2)*2*(0.5-abs(0.5-ld(0))));st(7,X/W*(1+ld(2))-ld(2)/2);st(8,(1-Y/H)*(1+ld(2))-ld(2)/2);st(2,ld(0)*(1-ld(1)));st(5,(ld(7)-ld(0))/(1-ld(0)));st(6,(ld(8)-ld(2)*ld(5)/2)/(1-ld(2)*ld(5)));st(2,1-ld(1)-ld(0)*ld(2));st(1,ld(7)/ld(0));st(2,(ld(8)-ld(2)*(1-ld(1))/2)/(1-ld(2)*(1-ld(1))));ifnot(st(0,-between(ld(5),0,1)*between(ld(6),0,1)),ifnot(st(0,between(ld(1),0,1)*between(ld(2),0,1)),st(2,ld(2)*-1.2-ld(4)/100);ifnot(st(0,2*between(ld(1),0,1)*between(ld(2),0,1)),st(6,ld(6)*-1.2-ld(4)/100);st(0,-2*between(ld(5),0,1)*between(ld(6),0,1)))));st(4,0);st(4,if(3-PLANE,max(ld(4),0),gte(ld(4),0))*255);if(ld(0),if(lt(ld(0),0),st(1,ld(5));st(2,ld(6)));st(5,ld(1)*W);st(6,(1-ld(2))*H);st(1,if(lt(ld(0),0),ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))),ifnot(PLANE,b0(ld(5),ld(6)),ifnot(1-PLANE,b1(ld(5),ld(6)),ifnot(2-PLANE,b2(ld(5),ld(6)),b3(ld(5),ld(6)))))));if(eq(abs(ld(0)),2),st(3,ld(3)*(1-ld(2)));ld(4)*(1-ld(3))+ld(1)*ld(3),ld(1)),ld(4))

GL_DIAMOND
st(1,0.05);st(2,1-P);st(3,abs(X/W-0.5)+abs(0.5-Y/H));if(lt(ld(3),ld(2)),B,if(gt(ld(3),ld(2)+ld(1)),A,st(1,(ld(3)-ld(2))/ld(1));B*(1-ld(1))+A*ld(1)))

GL_DIRECTIONALSCALED
st(1,0);st(2,1);st(3,0.7);st(4,0);st(5,1-P);st(3,1-(1-1/ld(3))*sin(ld(5)*PI));st(5,pow(sin(ld(5)*PI/2),3));st(1,X/W+ld(5)*sgn(ld(1)));st(2,1-Y/H+ld(5)*sgn(ld(2)));st(5,(ld(1)-floor(ld(1))-0.5)*ld(3)+0.5);st(6,(ld(2)-floor(ld(2))-0.5)*ld(3)+0.5);if(between(ld(5),0,1)*between(ld(6),0,1),st(5,ld(5)*W);st(6,(1-ld(6))*H);if(between(ld(1),0,1)*between(ld(2),0,1),ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))),ifnot(PLANE,b0(ld(5),ld(6)),ifnot(1-PLANE,b1(ld(5),ld(6)),ifnot(2-PLANE,b2(ld(5),ld(6)),b3(ld(5),ld(6)))))),if(3-PLANE,max(ld(4),0),gte(ld(4),0))*255)

GL_DIRECTIONALWARP
st(1,0.1);st(2,-1);st(3,1);st(4,hypot(ld(2),ld(3)));st(2,ld(2)/ld(4));st(3,ld(3)/ld(4));st(4,abs(ld(2))+abs(ld(3)));st(2,ld(2)/ld(4));st(3,ld(3)/ld(4));st(4,(ld(2)+ld(3))/2);st(4,ld(2)*X/W+ld(3)*(1-Y/H)-(ld(4)-0.5+(1-P)*(1+ld(1))));st(1,1-st(1,clip((ld(4)+ld(1))/ld(1),0,1))*ld(1)*(3-2*ld(1)));st(2,X/W-0.5);st(3,0.5-Y/H);st(4,(ld(2)*(1-ld(1))+0.5)*W);st(5,(0.5-ld(3)*(1-ld(1)))*H);st(6,ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5))))));st(4,(ld(2)*ld(1)+0.5)*W);st(5,(0.5-ld(3)*ld(1))*H);st(7,ifnot(PLANE,b0(ld(4),ld(5)),ifnot(1-PLANE,b1(ld(4),ld(5)),ifnot(2-PLANE,b2(ld(4),ld(5)),b3(ld(4),ld(5))))));ld(6)*(1-ld(1))+ld(7)*ld(1)

GL_DOORWAY
st(1,0.4);st(2,0.4);st(3,3);st(4,0);st(0,1-P);st(5,X/W);st(6,1-Y/H);st(7,0);st(8,2*abs(ld(5)-0.5)-ld(0));if(gt(ld(8),0),st(8,1/(1+ld(2)*ld(0)*(1-ld(8))));st(5,ld(5)+(1-gt(ld(5),0.5)*2)*ld(0)/2);st(6,(ld(6)+(1-ld(8))/2)*ld(8));st(7,between(ld(5),0,1)*between(ld(6),0,1)),st(8,ld(3)*(1-ld(0))+ld(0));st(5,(ld(5)-0.5)*ld(8)+0.5);st(6,(ld(6)-0.5)*ld(8)+0.5);st(7,2*between(ld(5),0,1)*between(ld(6),0,1));ifnot(ld(7),st(6,ld(6)*-1.2-0.02);st(7,3*between(ld(5),0,1)*between(ld(6),0,1))));st(4,if(3-PLANE,max(ld(4),0),gte(ld(4),0))*255);if(ld(7),st(2,ld(5)*W);st(3,(1-ld(6))*H);if(eq(ld(7),1),ifnot(PLANE,a0(ld(2),ld(3)),ifnot(1-PLANE,a1(ld(2),ld(3)),ifnot(2-PLANE,a2(ld(2),ld(3)),a3(ld(2),ld(3))))),st(3,ifnot(PLANE,b0(ld(2),ld(3)),ifnot(1-PLANE,b1(ld(2),ld(3)),ifnot(2-PLANE,b2(ld(2),ld(3)),b3(ld(2),ld(3))))));if(eq(ld(7),2),ld(3),st(1,ld(1)*(1-ld(6)));ld(4)*(1-ld(1))+ld(3)*ld(1))),ld(4))

GL_DOUBLEDIAMOND
st(1,0.05);st(3,1-st(2,P/2));st(4,abs(X/W-0.5)+abs(0.5-Y/H));if(between(ld(4),ld(2),ld(3)),if(between(ld(4),ld(2)+ld(1),ld(3)-ld(1)),B,st(1,min(ld(4)-ld(2),ld(3)-ld(4))/ld(1));A*(1-ld(1))+B*ld(1)),A)

GL_DREAMY
st(1,X/W);st(2,1-Y/H);st(3,1-P);st(4,0.03*ld(3)*cos(10*(ld(3)+ld(1))));st(4,ld(2)+ld(4));st(4,(1-ld(4))*H);st(4,ifnot(PLANE,a0(X,ld(4)),ifnot(1-PLANE,a1(X,ld(4)),ifnot(2-PLANE,a2(X,ld(4)),a3(X,ld(4))))));st(5,0.03*(1-ld(3))*cos(10*(1-ld(3)+ld(1))));st(5,ld(2)+ld(5));st(5,(1-ld(5))*H);st(5,ifnot(PLANE,b0(X,ld(5)),ifnot(1-PLANE,b1(X,ld(5)),ifnot(2-PLANE,b2(X,ld(5)),b3(X,ld(5))))));ld(4)*(1-ld(3))+ld(5)*ld(3)

GL_EDGETRANSITION
NATIVE

GL_EXPONENTIAL_SWISH
NATIVE

GL_FADECOLOR
NATIVE

GL_FANIN
st(1,0.05);st(2,PI*(1-P));st(3,1-Y/H);st(3,atan2(abs(X/W-0.5),if(lt(ld(3),0.5),0.25-ld(3),ld(3)-0.75))-ld(2));if(lt(ld(3),0),B,if(lt(ld(3),ld(1)),st(3,ld(3)/ld(1));B*(1-ld(3))+A*ld(3),A))

GL_FANOUT
st(1,0.05);st(2,2*PI*(1-P));st(3,X/W);st(3,PI+atan2(Y/H-0.5,if(lt(ld(3),0.5),0.25-ld(3),ld(3)-0.75))-ld(2));if(lt(ld(3),0),B,if(lt(ld(3),ld(1)),st(3,ld(3)/ld(1));B*(1-ld(3))+A*ld(3),A))

GL_FANUP
st(1,0.05);st(2,PI/2*(1-P));st(3,atan2(abs(X/W-0.5),Y/H)-ld(2));if(lt(ld(3),0),B,if(lt(ld(3),ld(1)),st(3,ld(3)/ld(1));B*(1-ld(3))+A*ld(3),A))

GL_FLOWER
st(1,0.05);st(2,360);st(3,(X/W-0.5)*W/H);st(4,Y/H-0.5);st(5,hypot(ld(3),ld(4)));st(2,(1-P)*ld(2)*PI/180);st(3,atan2(ld(3),ld(4))+ld(2));st(4,mod(abs(ld(3)),0.628319));st(6,W/H/0.731*(1-P));st(7,ld(6)*0.381962);st(2,ifnot(mod(trunc(ld(3)/0.628319),2),ld(4)/0.628319*(ld(6)-ld(7))+ld(7),(1-ld(4)/0.628319)*(ld(6)-ld(7))+ld(7)));if(gt(ld(5),ld(2)+ld(1)),A,if(gt(ld(5),ld(2)),st(1,(ld(5)-ld(2))/ld(1));B*(1-ld(1))+A*ld(1),B))

GL_GRIDFLIP
NATIVE

GL_HEART
st(1,1.6*(1-P));ifnot(ld(1),A,st(2,(X/W-0.5)/ld(1));st(3,(0.6-Y/H)/ld(1));st(1,st(2,ld(2)*ld(2))+st(4,ld(3)*ld(3))-0.3);if(gte(ld(2)*ld(3)*ld(4),ld(1)^3),B,A))

GL_HEXAGONALIZE
st(1,50);st(2,20);st(3,2*min(P,1-P));if(gt(ld(1),0),st(3,ceil(ld(3)*ld(1))/ld(1)));if(gt(ld(3),0),st(2,1.73205/3*ld(3)/ld(2));st(3,(X/W-0.5)/ld(2));st(4,((H-Y)/W-0.5)/ld(2));st(3,(1.73205*ld(3)-ld(4))/3);st(4,2/3*ld(4));st(5,-ld(3)-ld(4));st(6,floor(ld(3)+0.5));st(7,floor(ld(4)+0.5));st(8,floor(ld(5)+0.5));st(3,abs(ld(6)-ld(3)));st(4,abs(ld(7)-ld(4)));st(5,abs(ld(8)-ld(5)));if(gt(ld(3),ld(4))*gt(ld(3),ld(5)),st(6,-ld(7)-ld(8)),if(gt(ld(4),ld(5)),st(7,-ld(6)-ld(8))));st(3,1.73205*(ld(6)+ld(7)/2)*ld(2)+0.5);st(4,3/2*ld(7)*ld(2)+0.5);st(3,ld(3)*W);st(4,H-ld(4)*W);st(1,ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))));st(2,ifnot(PLANE,b0(ld(3),ld(4)),ifnot(1-PLANE,b1(ld(3),ld(4)),ifnot(2-PLANE,b2(ld(3),ld(4)),b3(ld(3),ld(4))))));ld(2)*(1-P)+ld(1)*P,B*(1-P)+A*P)

GL_INVERTEDPAGECURL
st(1,0.159);st(0,(1-P)*(1.5--0.16)+-0.16);st(2,ld(0)/ld(1));st(3,X/W);st(4,1-Y/H);st(6,-0.173649*ld(4)+0.89-0.984808*ld(3));st(7,ld(6)-ld(0));if(gt(ld(7),ld(1)),st(3,A),st(9,-0.173649*ld(3)+0.984808*ld(4)+-0.801);if(lt(ld(7),-ld(1)),st(7,-2*ld(1)-ld(7));st(8,acos(ld(7)/ld(1))+ld(2)-PI);st(6,ld(8)*ld(1));st(5,-0.173649*ld(9)-0.984808*ld(6)+0.985);st(6,0.984808*ld(9)+-0.173649*ld(6)+0.985);if(lt(ld(7),0)*between(ld(5),0,1)*between(ld(6),0,1)*(lt(ld(8),PI)+gt(ld(0),0.5)),st(8,(1-hypot(ld(5)-0.5,ld(6)-0.5)*1.414)*pow(-ld(7)/ld(1),3)/2);st(8,clip(ld(8)*255,0,B)),st(8,0));st(3,if(3-PLANE,B-ld(8),B)),st(3,st(8,PI-acos(ld(7)/ld(1))+ld(2));if(gt(ld(7),0),A,st(4,ld(8)*ld(1));st(5,-0.173649*ld(9)-0.984808*ld(4)+0.985);st(6,0.984808*ld(9)+-0.173649*ld(4)+0.985);if(between(ld(5),0,1)*between(ld(6),0,1),st(5,ld(5)*W);st(6,(1-ld(6))*H);ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))),B)));st(8,2*ld(2)-ld(8));st(4,mod(ld(8),2*PI));ifnot(gt(ld(4),PI)*lt(ld(0),0.5)+gt(ld(4),PI/2)*lt(ld(0),0),st(4,ld(8)*ld(1));st(5,-0.173649*ld(9)-0.984808*ld(4)+0.985);st(6,0.984808*ld(9)+-0.173649*ld(4)+0.985);st(8,if(lt(ld(5),0),-ld(5),if(gt(ld(5),1),ld(5)-1,if(gt(ld(5),0.5),1-ld(5),ld(5)))));st(9,if(lt(ld(6),0),-ld(6),if(gt(ld(6),1),ld(6)-1,if(gt(ld(6),0.5),1-ld(6),ld(6)))));st(8,if(between(ld(5),0,1)+between(ld(6),0,1),min(ld(8),ld(9)),hypot(ld(8),ld(9))));st(8,(1-ld(8)*30)/3);st(8,clip(ld(8)*ld(0)*255,0,ld(3)));if(3-PLANE,st(3,ld(3)-ld(8)));if(between(ld(5),0,1)*between(ld(6),0,1),st(5,ld(5)*W);st(6,(1-ld(6))*H);if(3-PLANE,st(3,(a0(ld(5),ld(6))+a1(ld(5),ld(6))+a2(ld(5),ld(6)))/255/15);st(3,ld(3)+0.8*(pow(1-abs(ld(7)/ld(1)),0.2)/2+0.5));st(3,ld(3)*255),st(3,a3(ld(5),ld(6))))))));ld(3)

GL_KALEIDOSCOPE
st(1,1);st(2,1);st(3,1.5);st(4,X/W-0.5);st(5,0.5-Y/H);st(1,(1-P)^ld(3)*ld(1));st(3,0);while(lte(st(3,ld(3)+1),7),st(6,sin(ld(1)));st(7,cos(ld(1)));st(8,ld(6)*ld(4)+ld(7)*ld(5));st(5,ld(6)*ld(5)-ld(7)*ld(4));st(4,abs(mod(ld(8),2)-1));st(5,abs(mod(ld(5),2)-1));st(1,ld(1)+ld(2)));st(4,ld(4)*W);st(5,(1-ld(5))*H);st(7,ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5))))));st(8,ifnot(PLANE,b0(ld(4),ld(5)),ifnot(1-PLANE,b1(ld(4),ld(5)),ifnot(2-PLANE,b2(ld(4),ld(5)),b3(ld(4),ld(5))))));st(1,B*(1-P)+A*P);st(2,ld(8)*(1-P)+ld(7)*P);st(3,1-2*abs(P-0.5));ld(1)*(1-ld(3))+ld(2)*ld(3)

GL_LINEARBLUR
st(1,0.1);st(1,ld(1)*(0.5-abs(P-0.5)));st(2,0);st(3,0);st(4,-1);while(lt(st(4,ld(4)+1),6),st(6,X+(ld(4)/6-0.5)*ld(1)*W);st(5,-1);while(lt(st(5,ld(5)+1),6),st(7,Y-(ld(5)/6-0.5)*ld(1)*H);st(2,ld(2)+ifnot(PLANE,a0(ld(6),ld(7)),ifnot(1-PLANE,a1(ld(6),ld(7)),ifnot(2-PLANE,a2(ld(6),ld(7)),a3(ld(6),ld(7))))));st(3,ld(3)+ifnot(PLANE,b0(ld(6),ld(7)),ifnot(1-PLANE,b1(ld(6),ld(7)),ifnot(2-PLANE,b2(ld(6),ld(7)),b3(ld(6),ld(7))))))));ld(3)/36*(1-P)+ld(2)/36*P

GL_LISSAJOUS_TILES
NATIVE

GL_MORPH
NATIVE

GL_MOSAIC
st(1,2);st(2,-1);st(5,1-2*P);st(5,abs(3-ld(5)*ld(5)*2));st(6,pow(cos(P*PI)/2+0.5,2));st(3,0.5*(1-ld(6))+(ld(1)+0.5)*ld(6));st(4,0.5*(1-ld(6))+(ld(2)+0.5)*ld(6));st(3,(X/W-0.5)*ld(5)+ld(3));st(4,(0.5-Y/H)*ld(5)+ld(4));st(5,floor(ld(3)));st(6,floor(ld(4)));st(3,ld(3)-ld(5));st(4,ld(4)-ld(6));st(1,eq(ld(5),ld(1))*eq(ld(6),ld(2)));st(2,st(2,sin(ld(5)*12.9898+ld(6)*78.233)*43758.545)-floor(ld(2)));ifnot(ld(1),st(7,trunc(ld(2)*4)*PI/2);st(5,cos(ld(7)));st(6,sin(ld(7)));st(3,ld(5)*st(7,ld(3)-0.5)+ld(6)*st(4,ld(4)-0.5)+0.5);st(4,ld(5)*ld(4)-ld(6)*ld(7)+0.5));st(3,ld(3)*W);st(4,(1-ld(4))*H);if(ld(1)+gt(ld(2),0.5),ifnot(PLANE,b0(ld(3),ld(4)),ifnot(1-PLANE,b1(ld(3),ld(4)),ifnot(2-PLANE,b2(ld(3),ld(4)),b3(ld(3),ld(4))))),ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))))

GL_PERLIN
st(1,4);st(2,0.01);st(3,X/W*ld(1));st(4,(1-Y/H)*ld(1));st(5,floor(ld(3)));st(6,floor(ld(4)));st(3,ld(3)-ld(5));st(4,ld(4)-ld(6));st(3,ld(3)*ld(3)*(3-2*ld(3)));st(4,ld(4)*ld(4)*(3-2*ld(4)));st(1,st(1,sin(ld(5)*12.9898+ld(6)*78.233)*43758.545)-floor(ld(1)));st(8,st(8,sin((ld(5)+1)*12.9898+ld(6)*78.233)*43758.545)-floor(ld(8)));st(7,st(7,sin(ld(5)*12.9898+(ld(6)+1)*78.233)*43758.545)-floor(ld(7)));st(6,st(6,sin((ld(6)+1)*12.9898+(ld(6)+1)*78.233)*43758.545)-floor(ld(6)));st(5,ld(1)*(1-ld(3))+ld(8)*ld(3));st(5,ld(5)+(ld(7)-ld(1))*ld(4)*(1-ld(3))+(ld(6)-ld(8))*ld(3)*ld(4));st(1,(1+ld(2))*(1-P)+(-ld(2))*P);st(3,ld(1)+ld(2));st(2,ld(1)-ld(2));st(1,1-st(1,clip((ld(5)-ld(2))/(ld(3)-ld(2)),0,1))*ld(1)*(3-2*ld(1)));A*(1-ld(1))+B*ld(1)

GL_PINWHEEL
st(1,2);st(2,1-P);st(1,atan2(0.5-Y/H,X/W-0.5)+ld(2)*ld(1));st(1,mod(ld(1),PI/4));if(lte(ld(2),ld(1)),A,B)

GL_POLAR_FUNCTION
st(1,5);st(2,X/W-0.5);st(3,0.5-Y/H);st(4,atan2(ld(3),ld(2))-PI/2);st(4,cos(ld(1)*ld(4))/4+1);st(1,hypot(ld(2),ld(3)));if(gt(ld(1),ld(4)*(1-P)),A,B)

GL_POLKADOTSCURTAIN
st(1,20);st(2,0);st(3,0);st(4,X/W*ld(1));st(4,ld(4)-floor(ld(4)));st(5,(1-Y/H)*ld(1));st(5,ld(5)-floor(ld(5)));st(1,hypot(ld(4)-0.5,ld(5)-0.5));st(2,(1-P)/hypot(X/W-ld(2),1-Y/H-ld(3)));if(lt(ld(1),ld(2)),B,A)

GL_POWERKALEIDO
st(1,2);st(2,1.5);st(3,5);st(0,1-P);st(1,ld(1)/10);st(3,ld(3)*ld(0));st(6,cos(ld(3)));st(7,sin(ld(3)));st(4,(X/W-0.5)*W/H*ld(2));st(2,(0.5-Y/H)*ld(2));st(5,ld(6)*ld(2)-ld(7)*ld(4));st(4,ld(6)*ld(4)+ld(7)*ld(2));st(8,-1);while(lt(st(8,ld(8)+1),30),ifnot(st(7,mod(ld(8),3)),st(6,1),ifnot(1-ld(7),st(6,-0.5);st(7,0.866025),st(7,-0.866025)));if(eq(not(ld(7)),gt(ld(5)-ld(6)*ld(1),(ld(4)+ld(7)*ld(1))*ld(7)/ld(6))),st(4,ld(4)+ld(7)*ld(1)*2);st(5,ld(5)-ld(6)*ld(1)*2);st(2,ld(4)*ld(6)+ld(5)*ld(7));st(4,ld(6)*ld(2)*2-ld(4));st(5,ld(7)*ld(2)*2-ld(5))));st(6,cos(-ld(3)));st(7,sin(-ld(3)));st(2,ld(6)*ld(4)+ld(7)*ld(5));st(5,ld(6)*ld(5)-ld(7)*ld(4));st(4,(ld(2)*H/W+0.5)/2);st(5,(ld(5)+0.5)/2);st(4,abs(ld(4)-floor(ld(4)+0.5))*2);st(5,abs(ld(5)-floor(ld(5)+0.5))*2);st(1,X/W);st(2,1-Y/H);st(3,(cos(ld(0)*PI*2)+1)/2);st(4,ld(4)*(1-ld(3))+ld(1)*ld(3));st(5,ld(5)*(1-ld(3))+ld(2)*ld(3));st(4,ld(4)*W);st(5,(1-ld(5))*H);st(1,ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5))))));st(2,ifnot(PLANE,b0(ld(4),ld(5)),ifnot(1-PLANE,b1(ld(4),ld(5)),ifnot(2-PLANE,b2(ld(4),ld(5)),b3(ld(4),ld(5))))));st(3,(cos((ld(0)-1)*PI)+1)/2);ld(1)*(1-ld(3))+ld(2)*ld(3)

GL_RANDOMNOISEX
st(1,st(1,sin(X*12.9898+Y*78.233)*43758.545)-floor(ld(1)));st(1,floor(ld(1)+(1-P)));A*(1-ld(1))+B*ld(1)

GL_RANDOMSQUARES
st(1,10);st(2,10);st(3,0.5);st(1,floor(ld(1)*X/W));st(2,floor(ld(2)*(1-Y/H)));st(4,st(4,sin(ld(1)*12.9898+ld(2)*78.233)*43758.545)-floor(ld(4)));st(4,ld(4)-(1-P)*(1+ld(3)));st(4,st(4,clip(ld(4)/-ld(3),0,1))*ld(4)*(3-2*ld(4)));A*(1-ld(4))+B*ld(4)

GL_RIPPLE
st(1,100);st(2,50);st(3,X/W-0.5);st(4,0.5-Y/H);st(5,hypot(ld(3),ld(4)));st(6,1-P);st(5,(sin(ld(6)*(ld(5)*ld(1)-ld(2)))+0.5)/30);st(3,ld(3)*ld(5));st(4,ld(4)*ld(5));st(3,X+ld(3)*W);st(4,Y-ld(4)*H);st(1,ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))));st(2,st(2,clip((ld(6)-0.2)/0.8,0,1))*ld(2)*(3-2*ld(2)));ld(1)*(1-ld(2))+B*ld(2)

GL_ROLLS
st(1,0);st(2,0);st(3,PI/2*(1-P));if(eq(gte(ld(1),2),ld(2)),st(3,-ld(3)));st(6,cos(ld(3)));st(7,sin(ld(3)));st(4,X/W);st(5,1-Y/H);ifnot(between(ld(1),1,2),st(4,1-ld(4)));if(gte(ld(1),2),st(5,1-ld(5)));st(8,W/H);st(2,ld(4)*ld(8)*ld(6)-ld(5)*ld(7));st(3,ld(4)*ld(8)*ld(7)+ld(5)*ld(6));if(between(ld(2),0,ld(8))*between(ld(3),0,1),st(2,ld(2)/ld(8));ifnot(between(ld(1),1,2),st(2,1-ld(2)));if(gte(ld(1),2),st(3,1-ld(3)));st(2,ld(2)*W);st(3,(1-ld(3))*H);ifnot(PLANE,a0(ld(2),ld(3)),ifnot(1-PLANE,a1(ld(2),ld(3)),ifnot(2-PLANE,a2(ld(2),ld(3)),a3(ld(2),ld(3))))),B)

GL_ROTATESCALEVANISH
st(1,1);st(2,0);st(3,0);st(0,if(ld(2),P,1-P));st(4,(X/W-0.5)*W/H);st(5,0.5-Y/H);st(3,if(ld(3),2,-2)*PI*ld(0));st(6,sin(ld(3)));st(7,cos(ld(3)));st(8,max(0.00001,1-ld(0)));st(3,(ld(4)*ld(7)-ld(5)*ld(6))/ld(8));st(4,(ld(4)*ld(6)+ld(5)*ld(7))/ld(8));st(3,ld(3)+W/H/2);st(4,ld(4)+0.5);st(5,if(ld(2),A,B));if(between(ld(3),0,W/H)*between(ld(4),0,1),st(3,ld(3)*H);st(4,(1-ld(4))*H);st(2,if(ld(2),ifnot(PLANE,b0(ld(3),ld(4)),ifnot(1-PLANE,b1(ld(3),ld(4)),ifnot(2-PLANE,b2(ld(3),ld(4)),b3(ld(3),ld(4))))),ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))))),st(2,if(ld(1),st(2,0);if(3-PLANE,max(ld(2),0),gte(ld(2),0))*255,ld(5))));ld(2)*(1-ld(0))+ld(5)*ld(0)

GL_ROTATETRANSITION
st(1,X/W-0.5);st(2,0.5-Y/H);st(4,(1-P)*PI*2);st(3,sin(ld(4)));st(4,cos(ld(4)));st(5,ld(1)*ld(4)-ld(2)*ld(3)+0.5);st(4,ld(1)*ld(3)+ld(2)*ld(4)+0.5);st(3,ld(5)-floor(ld(5)));st(4,ld(4)-floor(ld(4)));st(3,ld(3)*W);st(4,(1-ld(4))*H);st(1,ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))));st(2,ifnot(PLANE,b0(ld(3),ld(4)),ifnot(1-PLANE,b1(ld(3),ld(4)),ifnot(2-PLANE,b2(ld(3),ld(4)),b3(ld(3),ld(4))))));ld(2)*(1-P)+ld(1)*P

GL_ROTATE_SCALE_FADE
st(1,0.5);st(2,0.5);st(3,1);st(4,8);st(5,X/W-ld(1));st(6,1-Y/H-ld(2));st(7,hypot(ld(5),ld(6)));st(5,ld(5)/ld(7));st(6,ld(6)/ld(7));st(8,2*abs(P-0.5));st(8,ld(7)/(ld(4)*(1-ld(8))+ld(8)));st(3,2*PI*ld(3)*(1-P));st(4,sin(ld(3)));st(3,cos(ld(3)));st(7,ld(5)*ld(3)-ld(6)*ld(4));st(6,ld(5)*ld(4)+ld(6)*ld(3));st(1,ld(1)+ld(7)*ld(8));st(2,ld(2)+ld(6)*ld(8));if(between(ld(1),0,1)*between(ld(2),0,1),st(1,ld(1)*W);st(2,(1-ld(2))*H);st(3,ifnot(PLANE,a0(ld(1),ld(2)),ifnot(1-PLANE,a1(ld(1),ld(2)),ifnot(2-PLANE,a2(ld(1),ld(2)),a3(ld(1),ld(2))))));st(4,ifnot(PLANE,b0(ld(1),ld(2)),ifnot(1-PLANE,b1(ld(1),ld(2)),ifnot(2-PLANE,b2(ld(1),ld(2)),b3(ld(1),ld(2))))));ld(4)*(1-P)+ld(3)*P,st(1,0.15);if(3-PLANE,max(ld(1),0),gte(ld(1),0))*255)

GL_SIMPLEBOOKCURL
NATIVE

GL_SIMPLEPAGECURL
st(2,80);st(1,0.15);st(2,(ld(2)/180-0.5)*PI);st(3,cos(ld(2))*W/H);st(4,sin(ld(2)));st(2,hypot(ld(3),ld(4)));st(3,ld(3)/ld(2));st(4,ld(4)/ld(2));st(2,(gte(ld(3),0)-0.5)*ld(3)+(gte(ld(4),0)-0.5)*ld(4));st(5,ld(3)*ld(2));st(6,ld(4)*ld(2));st(7,(ld(3)*ld(1)+ld(5))*-2);st(8,(ld(4)*ld(1)+ld(6))*-2);st(2,if(0,1));if(0,st(2,bitor(ld(2),2)));st(0,if(bitand(ld(2),2),P,1-P));st(5,ld(5)+ld(7)*ld(0));st(6,ld(6)+ld(8)*ld(0));st(0,if(0,bitor(ld(2),4),ld(2)));st(7,X/W-0.5);st(8,0.5-Y/H);st(2,(ld(7)-ld(5))*ld(3)+(ld(8)-ld(6))*ld(4));st(5,ld(7)-ld(3)*ld(2));st(6,ld(8)-ld(4)*ld(2));st(7,0);st(8,if(bitand(ld(0),2),A,B));if(lt(ld(2),0),ifnot(bitand(ld(0),1),st(7,PI*ld(1)-ld(2));st(5,ld(5)+ld(3)*ld(7)+0.5);st(6,ld(6)+ld(4)*ld(7)+0.5);st(7,1),if(lt(-ld(2),ld(1)),st(7,(PI+asin(-ld(2)/ld(1)))*ld(1));st(5,ld(5)+ld(3)*ld(7)+0.5);st(6,ld(6)+ld(4)*ld(7)+0.5);st(7,5)));if(ld(7)*between(ld(5),0,1)*between(ld(6),0,1),st(7,bitor(ld(7),2)),st(7,0);st(8,if(bitand(ld(0),2),B,A))),if(gt(ld(1),0),st(7,(PI-asin(ld(2)/ld(1)))*ld(1));st(5,ld(5)+ld(3)*ld(7)+0.5);st(6,ld(6)+ld(4)*ld(7)+0.5);if(between(ld(5),0,1)*between(ld(6),0,1),st(7,7),st(7,2*ld(7)-PI*ld(1));st(5,ld(5)-ld(3)*ld(7));st(6,ld(6)-ld(4)*ld(7));st(7,if(between(ld(5),0,1)*between(ld(6),0,1),1,4)))));if(bitand(ld(7),1),st(5,ld(5)*W);st(6,(1-ld(6))*H);st(8,if(bitand(ld(0),2),ifnot(PLANE,b0(ld(5),ld(6)),ifnot(1-PLANE,b1(ld(5),ld(6)),ifnot(2-PLANE,b2(ld(5),ld(6)),b3(ld(5),ld(6))))),ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))))));if(3-PLANE,if(bitand(ld(7),2),if(bitand(ld(0),4),st(8,(a0(ld(5),ld(6))+a1(ld(5),ld(6))+a2(ld(5),ld(6)))/3));st(3,0.8);st(8,ld(8)+(255-ld(8))*ld(3)));if(bitand(ld(7),4)*gt(ld(1),0),st(3,0.2);st(4,ld(2)+if(bitand(ld(7),1),ld(1),-ld(1)));st(4,pow(clip(abs(ld(4))/ld(1),0,1),ld(3)));st(8,ld(8)*ld(4))));ld(8)

GL_SLIDES
st(1,0);st(2,0);st(5,st(4,1-st(3,if(ld(2),1-P,P)))/2);ifnot(ld(1),st(6,ld(5));st(7,0),ifnot(ld(1)-1,st(6,ld(4));st(7,ld(5)),ifnot(ld(1)-2,st(6,ld(5));st(7,ld(4)),ifnot(ld(1)-3,st(6,0);st(7,ld(5)),ifnot(ld(1)-4,st(6,ld(4));st(7,0),ifnot(ld(1)-5,st(6,st(7,ld(4))),ifnot(ld(1)-6,st(6,0);st(7,ld(4)),ifnot(ld(1)-7,st(6,st(7,0)),st(6,st(7,ld(5)))))))))));st(4,X/W);st(5,Y/H);if(between(ld(4),ld(6),ld(6)+ld(3))*between(ld(5),ld(7),ld(7)+ld(3)),st(4,(ld(4)-ld(6))/ld(3)*W);st(5,(ld(5)-ld(7))/ld(3)*H);if(ld(2),ifnot(PLANE,b0(ld(4),ld(5)),ifnot(1-PLANE,b1(ld(4),ld(5)),ifnot(2-PLANE,b2(ld(4),ld(5)),b3(ld(4),ld(5))))),ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5)))))),if(ld(2),A,B))

GL_SQUARESWIRE
st(1,10);st(2,10);st(3,1.0);st(4,-0.5);st(5,1.6);st(6,hypot(ld(3),ld(4)));st(3,ld(3)/ld(6));st(4,ld(4)/ld(6));st(6,abs(ld(3)+abs(ld(4))));st(3,ld(3)/ld(6));st(4,ld(4)/ld(6));st(6,ld(3)/2+ld(4)/2);st(6,ld(3)*X/W+ld(4)*(1-Y/H)-(ld(6)-0.5+(1-P)*(1+ld(5))));st(6,st(6,clip((ld(6)+ld(5))/ld(5),0,1))*ld(6)*(3-2*ld(6)));st(1,X/W*ld(1));st(2,(1-Y/H)*ld(2));st(1,ld(1)-floor(ld(1)));st(2,ld(2)-floor(ld(2)));st(5,ld(6)/2);st(6,1-ld(5));if(between(ld(1),ld(5),ld(6))*between(ld(2),ld(5),ld(6)),B,A)

GL_STAGECURTAINS
NATIVE

GL_STARWIPE
st(1,0.01);st(2,0.75);st(3,1);st(8,PI*0.4);st(2,ld(2)*ld(8));st(7,sin(ld(2)));st(2,cos(ld(2)));st(4,X/W-0.5);st(5,0.5-Y/H);st(6,ld(4)*ld(2)-ld(5)*ld(7));st(7,ld(5)*ld(2)+ld(4)*ld(7));st(2,atan2(ld(7),ld(6))+PI);st(2,ld(8)*(floor(ld(2)/ld(8))+0.5));st(8,sin(ld(2)));st(2,cos(ld(2)));st(4,(ld(6)*ld(2)+ld(7)*ld(8))*0.3);st(5,ld(7)*ld(2)-ld(6)*ld(8));st(2,(2*ld(1)+1)*(1-P)+ld(4)-ld(1));if(gt(ld(2),ld(5))*lt(-ld(2),ld(5)),B,st(2,ld(2)+ld(1));if(gt(ld(2),ld(5))*lt(-ld(2),ld(5)),if(3-PLANE,max(ld(3),0),gte(ld(3),0))*255,A))

GL_STATIC_WIPE
st(1,1);st(2,0.5);st(3,1-P);st(2,ld(2)*sqrt(sin(PI*ld(3))));st(4,X/W);st(5,1-Y/H);st(1,if(ld(1),1-ld(5),ld(5)));st(6,ld(3)-ld(2));st(6,st(6,clip((ld(1)-ld(6))/(ld(3)-ld(6)),0,1))*ld(6)*(3-2*ld(6)));st(7,ld(3)+ld(2));st(7,1-st(7,clip((ld(1)-ld(3))/(ld(7)-ld(3)),0,1))*ld(7)*(3-2*ld(7)));st(6,ld(6)*ld(7));st(7,if(gte(ld(1),ld(3)),A,B));if(3-PLANE,st(4,ld(4)*(1+ld(3)));st(5,ld(5)*(1+ld(3)));st(1,st(1,sin(ld(4)*12.9898+ld(5)*78.233)*43758.545)-floor(ld(1)));st(1,ld(1)*255),st(1,255));ld(7)*(1-ld(6))+ld(1)*ld(6)

GL_STEREOVIEWER
NATIVE

GL_STRIPE_WIPE
NATIVE

GL_SWAP
st(1,0.4);st(2,0.2);st(3,3);st(4,0);st(0,1-P);st(7,1+(ld(3)-1)*ld(0));st(8,ld(2)*ld(0));st(5,X/W*ld(7)/(1-ld(8)));st(6,(0.5-Y/H)*ld(7)/(1-ld(7)*ld(8)*X/W)+0.5);st(7,ld(3)*(1-ld(0))+ld(0));st(8,ld(2)-ld(8));st(2,(X/W-1)*ld(7)/(1-ld(8))+1);st(3,(0.5-Y/H)*ld(7)/(1-ld(7)*ld(8)*(0.5-X/W))+0.5);st(7,between(ld(2),0,1)*between(ld(3),0,1));st(8,between(ld(5),0,1)*between(ld(6),0,1));st(0,lt(ld(0),0.5));ifnot(st(0,if(ld(8)*(ld(0)+not(ld(7))),-1,if(ld(7)*not(ld(0)*ld(8)),1))),st(3,ld(3)*-1.2-0.02);ifnot(st(0,2*between(ld(2),0,1)*between(ld(3),0,1)),st(6,ld(6)*-1.2-0.02);st(0,-2*between(ld(5),0,1)*between(ld(6),0,1))));st(4,if(3-PLANE,max(ld(4),0),gte(ld(4),0))*255);if(ld(0),if(lt(ld(0),0),st(2,ld(5));st(3,ld(6)));st(5,ld(2)*W);st(6,(1-ld(3))*H);st(2,if(lt(ld(0),0),ifnot(PLANE,a0(ld(5),ld(6)),ifnot(1-PLANE,a1(ld(5),ld(6)),ifnot(2-PLANE,a2(ld(5),ld(6)),a3(ld(5),ld(6))))),ifnot(PLANE,b0(ld(5),ld(6)),ifnot(1-PLANE,b1(ld(5),ld(6)),ifnot(2-PLANE,b2(ld(5),ld(6)),b3(ld(5),ld(6)))))));if(eq(abs(ld(0)),2),st(1,ld(1)*(1-ld(3)));ld(4)*(1-ld(1))+ld(2)*ld(1),ld(2)),ld(4))

GL_SWIRL
st(1,1);st(2,1);st(3,X/W-0.5);st(4,0.5-Y/H);st(5,hypot(ld(3),ld(4)));if(lt(ld(5),ld(1)),st(1,(ld(1)-ld(5))/ld(1));st(5,1-2*abs(P-0.5));st(1,ld(1)*ld(1)*ld(5)*8*PI);ifnot(ld(2),st(1,-ld(1)));st(5,sin(ld(1)));st(6,cos(ld(1)));st(1,ld(3)*ld(6)-ld(4)*ld(5));st(4,ld(3)*ld(5)+ld(4)*ld(6));st(3,ld(1)));st(3,(ld(3)+0.5)*W);st(4,(0.5-ld(4))*H);st(5,ifnot(PLANE,a0(ld(3),ld(4)),ifnot(1-PLANE,a1(ld(3),ld(4)),ifnot(2-PLANE,a2(ld(3),ld(4)),a3(ld(3),ld(4))))));st(6,ifnot(PLANE,b0(ld(3),ld(4)),ifnot(1-PLANE,b1(ld(3),ld(4)),ifnot(2-PLANE,b2(ld(3),ld(4)),b3(ld(3),ld(4))))));ld(6)*(1-P)+ld(5)*P

GL_WATERDROP
st(1,30);st(2,30);st(3,1-P);st(4,X/W-0.5);st(5,0.5-Y/H);st(6,hypot(ld(4),ld(5)));st(7,if(lte(ld(6),ld(3)),st(1,sin(ld(6)*ld(1)-ld(3)*ld(2)));st(4,X+ld(4)*ld(1)*W);st(5,Y-ld(5)*ld(1)*H);ifnot(PLANE,a0(ld(4),ld(5)),ifnot(1-PLANE,a1(ld(4),ld(5)),ifnot(2-PLANE,a2(ld(4),ld(5)),a3(ld(4),ld(5))))),A));ld(7)*(1-ld(3))+B*ld(3)

GL_WINDOWBLINDS
st(1,1-P);st(2,if(mod(floor((1-Y/H)*100*ld(1)),2),ld(1)*1.5,ld(1)));st(3,st(3,clip((ld(1)-0.8)/0.2,0,1))*ld(3)*(3-2*ld(3)));st(3,clip(ld(2)*(1-ld(3))+ld(1)*ld(3),0,1));A*(1-ld(3))+B*ld(3)

GL_WINDOWSLICE
st(1,10);st(2,0.5);st(3,X/W-(1-P)*(1+ld(2)));st(3,st(3,clip((ld(3)+ld(2))/ld(2),0,1))*ld(3)*(3-2*ld(3)));st(1,ld(1)*X/W);if(gte(ld(1)-floor(ld(1)),ld(3)),B,A)
