MILKDROP_PRESET_VERSION=201
PSVERSION=3
PSVERSION_WARP=3
PSVERSION_COMP=3
[preset00]
fRating=5.000
fGammaAdj=1.980
fDecay=0.500
fVideoEchoZoom=0.952
fVideoEchoAlpha=0.500
nVideoEchoOrientation=3
nWaveMode=0
bAdditiveWaves=1
bWaveDots=0
bWaveThick=1
bModWaveAlphaByVolume=1
bMaximizeWaveColor=0
bTexWrap=1
bDarkenCenter=0
bRedBlueStereo=0
bBrighten=0
bDarken=1
bSolarize=0
bInvert=0
fWaveAlpha=0.001
fWaveScale=0.021
fWaveSmoothing=0.450
fWaveParam=0.000
fModWaveAlphaStart=0.000
fModWaveAlphaEnd=1.320
fWarpAnimSpeed=1.459
fWarpScale=2.007
fZoomExponent=1.00000
fShader=0.000
zoom=0.99990
rot=0.00000
cx=0.500
cy=0.500
dx=0.00000
dy=0.00000
warp=0.00683
sx=0.99990
sy=1.00000
wave_r=0.000
wave_g=0.000
wave_b=0.000
wave_x=0.500
wave_y=0.500
ob_size=0.050
ob_r=0.000
ob_g=0.000
ob_b=0.000
ob_a=0.000
ib_size=0.260
ib_r=0.250
ib_g=0.250
ib_b=0.250
ib_a=0.000
nMotionVectorsX=0.000
nMotionVectorsY=0.000
mv_dx=0.000
mv_dy=0.000
mv_l=1.850
mv_r=0.500
mv_g=0.500
mv_b=0.500
mv_a=0.000
b1n=0.000
b2n=0.000
b3n=0.000
b1x=1.000
b2x=0.600
b3x=0.400
b1ed=0.000
wavecode_0_enabled=1
wavecode_0_samples=512
wavecode_0_sep=20
wavecode_0_bSpectrum=0
wavecode_0_bUseDots=1
wavecode_0_bDrawThick=0
wavecode_0_bAdditive=1
wavecode_0_scaling=0.29460
wavecode_0_smoothing=0.10000
wavecode_0_r=1.000
wavecode_0_g=0.300
wavecode_0_b=1.000
wavecode_0_a=0.600
wave_0_init1=t0 = 0;
wave_0_per_frame1=t1 = 0;
wave_0_per_point1=self = t1*reg01 + 100000; //#
wave_0_per_point2=
wave_0_per_point3=age = gmegabuf(self+12);
wave_0_per_point4=max_age = reg22;
wave_0_per_point5=if (age > 0,
wave_0_per_point6=  x0 = gmegabuf(self)-reg07;
wave_0_per_point7=  y0 = gmegabuf(self+1)-reg08;
wave_0_per_point8=  z0 = gmegabuf(self+2)-reg09;
wave_0_per_point9=
wave_0_per_point10=
wave_0_per_point11=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
wave_0_per_point12=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
wave_0_per_point13=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
wave_0_per_point14=
wave_0_per_point15=
wave_0_per_point16=  if (z1 > 0,
wave_0_per_point17=    a = min(1,.03/z1)* max(0,1-age/max_age); //###
wave_0_per_point18=    r = gmegabuf(self+9);
wave_0_per_point19=    g = gmegabuf(self+10);
wave_0_per_point20=    b = gmegabuf(self+11);
wave_0_per_point21=    fac = reg19;;
wave_0_per_point22=    x = .5 + x1/z1*fac;
wave_0_per_point23=    y = .5 - y1/z1*fac;
wave_0_per_point24=  ,gmegabuf(self+12) += 4*q30; a= 0; ); //#age prematurely ?);
wave_0_per_point25=
wave_0_per_point26=, a=0; ) ;
wave_0_per_point27=
wave_0_per_point28=t1 += 1;
wavecode_1_enabled=1
wavecode_1_samples=512
wavecode_1_sep=0
wavecode_1_bSpectrum=0
wavecode_1_bUseDots=1
wavecode_1_bDrawThick=0
wavecode_1_bAdditive=1
wavecode_1_scaling=0.14869
wavecode_1_smoothing=0.82000
wavecode_1_r=1.000
wavecode_1_g=1.000
wavecode_1_b=1.000
wavecode_1_a=0.100
wave_1_per_frame1=t1 = samples;
wave_1_per_point1=self = t1*reg01 + 100000; //#
wave_1_per_point2=
wave_1_per_point3=age = gmegabuf(self+12);
wave_1_per_point4=max_age = reg22;
wave_1_per_point5=if (age > 0,
wave_1_per_point6=  x0 = gmegabuf(self)-reg07;
wave_1_per_point7=  y0 = gmegabuf(self+1)-reg08;
wave_1_per_point8=  z0 = gmegabuf(self+2)-reg09;
wave_1_per_point9=
wave_1_per_point10=
wave_1_per_point11=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
wave_1_per_point12=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
wave_1_per_point13=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
wave_1_per_point14=
wave_1_per_point15=
wave_1_per_point16=  if (z1 > 0,
wave_1_per_point17=    a = min(1,.03/z1)* max(0,1-age/max_age); //###
wave_1_per_point18=    r = gmegabuf(self+9);
wave_1_per_point19=    g = gmegabuf(self+10);
wave_1_per_point20=    b = gmegabuf(self+11);
wave_1_per_point21=    fac = reg19;;
wave_1_per_point22=    x = .5 + x1/z1*fac;
wave_1_per_point23=    y = .5 - y1/z1*fac;
wave_1_per_point24=  ,gmegabuf(self+12) += 4*q30; a= 0; ); //#age prematurely ?);
wave_1_per_point25=
wave_1_per_point26=, a=0; ) ;
wave_1_per_point27=
wave_1_per_point28=t1 += 1;
wavecode_2_enabled=1
wavecode_2_samples=512
wavecode_2_sep=0
wavecode_2_bSpectrum=0
wavecode_2_bUseDots=1
wavecode_2_bDrawThick=1
wavecode_2_bAdditive=1
wavecode_2_scaling=0.89152
wavecode_2_smoothing=0.82000
wavecode_2_r=1.000
wavecode_2_g=1.000
wavecode_2_b=1.000
wavecode_2_a=1.000
wave_2_per_frame1=t1 = samples*2;
wave_2_per_point1=self = t1*reg01 + 100000; //#
wave_2_per_point2=
wave_2_per_point3=age = gmegabuf(self+12);
wave_2_per_point4=max_age = reg22;
wave_2_per_point5=if (age > 0,
wave_2_per_point6=  x0 = gmegabuf(self)-reg07;
wave_2_per_point7=  y0 = gmegabuf(self+1)-reg08;
wave_2_per_point8=  z0 = gmegabuf(self+2)-reg09;
wave_2_per_point9=
wave_2_per_point10=
wave_2_per_point11=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
wave_2_per_point12=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
wave_2_per_point13=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
wave_2_per_point14=
wave_2_per_point15=
wave_2_per_point16=  if (z1 > 0,
wave_2_per_point17=    a = min(1,.03/z1)* max(0,1-age/max_age); //###
wave_2_per_point18=    r = gmegabuf(self+9);
wave_2_per_point19=    g = gmegabuf(self+10);
wave_2_per_point20=    b = gmegabuf(self+11);
wave_2_per_point21=    fac = reg19;;
wave_2_per_point22=    x = .5 + x1/z1*fac;
wave_2_per_point23=    y = .5 - y1/z1*fac;
wave_2_per_point24=  ,gmegabuf(self+12) += 4*q30; a= 0; ); //#age prematurely ?);
wave_2_per_point25=
wave_2_per_point26=, a=0; ) ;
wave_2_per_point27=
wave_2_per_point28=t1 += 1;
wavecode_3_enabled=1
wavecode_3_samples=512
wavecode_3_sep=0
wavecode_3_bSpectrum=0
wavecode_3_bUseDots=1
wavecode_3_bDrawThick=0
wavecode_3_bAdditive=1
wavecode_3_scaling=1.22018
wavecode_3_smoothing=0.20000
wavecode_3_r=1.000
wavecode_3_g=1.000
wavecode_3_b=1.000
wavecode_3_a=1.000
wave_3_per_frame1=t1 = samples*3;
wave_3_per_point1=self = t1*reg01 + 100000; //#
wave_3_per_point2=
wave_3_per_point3=age = gmegabuf(self+12);
wave_3_per_point4=max_age = reg22;
wave_3_per_point5=if (age > 0,
wave_3_per_point6=  x0 = gmegabuf(self)-reg07;
wave_3_per_point7=  y0 = gmegabuf(self+1)-reg08;
wave_3_per_point8=  z0 = gmegabuf(self+2)-reg09;
wave_3_per_point9=
wave_3_per_point10=
wave_3_per_point11=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
wave_3_per_point12=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
wave_3_per_point13=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
wave_3_per_point14=
wave_3_per_point15=
wave_3_per_point16=  if (z1 > 0,
wave_3_per_point17=    a = min(1,.03/z1)* max(0,1-age/max_age); //###
wave_3_per_point18=    r = gmegabuf(self+9);
wave_3_per_point19=    g = gmegabuf(self+10);
wave_3_per_point20=    b = gmegabuf(self+11);
wave_3_per_point21=    fac = reg19;;
wave_3_per_point22=    x = .5 + x1/z1*fac;
wave_3_per_point23=    y = .5 - y1/z1*fac;
wave_3_per_point24=  ,gmegabuf(self+12) += 4*q30; a= 0; ); //#age prematurely ?);
wave_3_per_point25=
wave_3_per_point26=, a=0; ) ;
wave_3_per_point27=
wave_3_per_point28=t1 += 1;
shapecode_0_enabled=1
shapecode_0_sides=5
shapecode_0_additive=0
shapecode_0_thickOutline=0
shapecode_0_textured=0
shapecode_0_num_inst=700
shapecode_0_x=0.900
shapecode_0_y=0.900
shapecode_0_rad=0.19710
shapecode_0_ang=0.00000
shapecode_0_tex_ang=0.00000
shapecode_0_tex_zoom=2.51821
shapecode_0_r=1.000
shapecode_0_g=1.000
shapecode_0_b=1.000
shapecode_0_a=1.000
shapecode_0_r2=1.000
shapecode_0_g2=1.000
shapecode_0_b2=1.000
shapecode_0_a2=0.000
shapecode_0_border_r=0.000
shapecode_0_border_g=0.000
shapecode_0_border_b=1.000
shapecode_0_border_a=0.000
shape_0_per_frame1=self = instance*reg01;
shape_0_per_frame2=age = gmegabuf(self+12);
shape_0_per_frame3=max_age = reg02;
shape_0_per_frame4=size = gmegabuf(self+13);
shape_0_per_frame5=flim = gmegabuf(self+6);
shape_0_per_frame6=if (age > 0,
shape_0_per_frame7=  x0 = gmegabuf(self)-reg07;
shape_0_per_frame8=  y0 = gmegabuf(self+1)-reg08;
shape_0_per_frame9=  z0 = gmegabuf(self+2)-reg09;
shape_0_per_frame10=
shape_0_per_frame11=
shape_0_per_frame12=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
shape_0_per_frame13=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
shape_0_per_frame14=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
shape_0_per_frame15=
shape_0_per_frame16=
shape_0_per_frame17=  if (z1 > 0,
shape_0_per_frame18=    fac = reg19;;
shape_0_per_frame19=    x = .5 + x1/z1*fac*q31;
shape_0_per_frame20=    y = .5 - y1/z1*fac*q32;
shape_0_per_frame21=
shape_0_per_frame22=    megabuf(instance) = megabuf(instance)*.5 + .5*(rand(100)/100-.05);
shape_0_per_frame23=
shape_0_per_frame24=    bright = 1-pow(age/max_age,1);
shape_0_per_frame25=    bright =  min(8,max(0,2*bright*((1-flim)+.5*flim/megabuf(instance) - .5*megabuf(instance))));
shape_0_per_frame26=    a = .7;
shape_0_per_frame27=    rad = min(0.2,.001*size/z1*bright); 
shape_0_per_frame28=    
shape_0_per_frame29=    k1 = 1;
shape_0_per_frame30=    r=gmegabuf(self+9);
shape_0_per_frame31=    g=gmegabuf(self+10);
shape_0_per_frame32=    b=gmegabuf(self+11);
shape_0_per_frame33=
shape_0_per_frame34=
shape_0_per_frame35=    tmp = .3;
shape_0_per_frame36=    r2 = r*tmp; g2 = g*tmp; b2 = b*tmp; 
shape_0_per_frame37=    a2=0; 
shape_0_per_frame38=    ang = z1*1000;
shape_0_per_frame39=  ,gmegabuf(self+12) += q30; rad = 0; ); //#age prematurely ?);
shape_0_per_frame40=
shape_0_per_frame41=, a=0; rad =0;) 
shape_0_per_frame42=
shapecode_1_enabled=1
shapecode_1_sides=7
shapecode_1_additive=0
shapecode_1_thickOutline=0
shapecode_1_textured=0
shapecode_1_num_inst=800
shapecode_1_x=0.260
shapecode_1_y=0.200
shapecode_1_rad=0.01000
shapecode_1_ang=0.00000
shapecode_1_tex_ang=0.00000
shapecode_1_tex_zoom=0.93550
shapecode_1_r=1.000
shapecode_1_g=0.500
shapecode_1_b=0.000
shapecode_1_a=1.000
shapecode_1_r2=0.000
shapecode_1_g2=0.000
shapecode_1_b2=0.000
shapecode_1_a2=0.000
shapecode_1_border_r=0.000
shapecode_1_border_g=0.700
shapecode_1_border_b=0.800
shapecode_1_border_a=0.000
shape_1_per_frame1=self = instance*reg01 + reg13;
shape_1_per_frame2=
shape_1_per_frame3=age = gmegabuf(self+12);
shape_1_per_frame4=if (age > 0,
shape_1_per_frame5=  x0 = gmegabuf(self)-reg07;
shape_1_per_frame6=  y0 = gmegabuf(self+1)-reg08;
shape_1_per_frame7=  z0 = gmegabuf(self+2)-reg09;
shape_1_per_frame8=  size = gmegabuf(self+13);
shape_1_per_frame9=
shape_1_per_frame10=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
shape_1_per_frame11=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
shape_1_per_frame12=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
shape_1_per_frame13=
shape_1_per_frame14=  if (z1 > 0, 
shape_1_per_frame15=    fac = reg19;;
shape_1_per_frame16=    x = .5 + x1/z1*fac*q31;
shape_1_per_frame17=    y = .5 - y1/z1*fac*q32;
shape_1_per_frame18=    a = max(0,min(1,1-age/reg12)) ;
shape_1_per_frame19=   
shape_1_per_frame20=    rad = .0006/z1*size*(1+ pow(1-age,6)+4*age/reg12);
shape_1_per_frame21=  
shape_1_per_frame22=    rad = min(rad,.1);
shape_1_per_frame23=    r = min(1,a*4); g = a; b = pow(a,3); 
shape_1_per_frame24=    a = .2; a2 = a*.3;
shape_1_per_frame25=  ,gmegabuf(self+12)+=q30; rad= 0); //#age prematurely ?
shape_1_per_frame26=
shape_1_per_frame27=, a=0; rad =0);
shape_1_per_frame28=
shape_1_per_frame29=//if (instance == reg14-1, rad = .2, 0);
shape_1_per_frame30=
shapecode_2_enabled=1
shapecode_2_sides=3
shapecode_2_additive=0
shapecode_2_thickOutline=0
shapecode_2_textured=0
shapecode_2_num_inst=700
shapecode_2_x=0.390
shapecode_2_y=0.400
shapecode_2_rad=0.01000
shapecode_2_ang=0.00000
shapecode_2_tex_ang=0.00000
shapecode_2_tex_zoom=0.44790
shapecode_2_r=0.000
shapecode_2_g=0.300
shapecode_2_b=1.000
shapecode_2_a=0.500
shapecode_2_r2=1.000
shapecode_2_g2=1.000
shapecode_2_b2=1.000
shapecode_2_a2=0.000
shapecode_2_border_r=0.000
shapecode_2_border_g=0.000
shapecode_2_border_b=0.000
shapecode_2_border_a=0.000
shape_2_per_frame1=self = (instance+reg00/2)*reg01;
shape_2_per_frame2=age = gmegabuf(self+12);
shape_2_per_frame3=max_age = reg02;
shape_2_per_frame4=size = gmegabuf(self+13);
shape_2_per_frame5=flim = gmegabuf(self+6);
shape_2_per_frame6=if (age > 0,
shape_2_per_frame7=  x0 = gmegabuf(self)-reg07;
shape_2_per_frame8=  y0 = gmegabuf(self+1)-reg08;
shape_2_per_frame9=  z0 = gmegabuf(self+2)-reg09;
shape_2_per_frame10=
shape_2_per_frame11=
shape_2_per_frame12=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
shape_2_per_frame13=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
shape_2_per_frame14=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
shape_2_per_frame15=
shape_2_per_frame16=
shape_2_per_frame17=  if (z1 > 0,
shape_2_per_frame18=    fac = reg19;;
shape_2_per_frame19=    x = .5 + x1/z1*fac*q31;
shape_2_per_frame20=    y = .5 - y1/z1*fac*q32;
shape_2_per_frame21=
shape_2_per_frame22=    megabuf(instance) = megabuf(instance)*.5 + .5*(rand(100)/100-.05);
shape_2_per_frame23=
shape_2_per_frame24=    bright = 1-pow(age/max_age,1);
shape_2_per_frame25=    bright =  min(8,max(0,2*bright*((1-flim)+.5*flim/megabuf(instance) - .5*megabuf(instance))));
shape_2_per_frame26=    a = .7;
shape_2_per_frame27=    rad = min(0.2,.001*size/z1*bright); 
shape_2_per_frame28=    
shape_2_per_frame29=    k1 = 1;
shape_2_per_frame30=    r=gmegabuf(self+9);
shape_2_per_frame31=    g=gmegabuf(self+10);
shape_2_per_frame32=    b=gmegabuf(self+11);
shape_2_per_frame33=
shape_2_per_frame34=
shape_2_per_frame35=    tmp = .3;
shape_2_per_frame36=    r2 = r*tmp; g2 = g*tmp; b2 = b*tmp; 
shape_2_per_frame37=    a2=0; 
shape_2_per_frame38=//    ang = z1*1000;
shape_2_per_frame39=ang = (frame%2)*6.28/6+time+instance;
shape_2_per_frame40=  ,gmegabuf(self+12) += q30; rad = 0; ); //#age prematurely ?);
shape_2_per_frame41=
shape_2_per_frame42=, a=0; rad =0;) 
shape_2_per_frame43=
shapecode_3_enabled=1
shapecode_3_sides=6
shapecode_3_additive=0
shapecode_3_thickOutline=0
shapecode_3_textured=0
shapecode_3_num_inst=350
shapecode_3_x=0.650
shapecode_3_y=0.800
shapecode_3_rad=0.01000
shapecode_3_ang=0.00000
shapecode_3_tex_ang=0.00000
shapecode_3_tex_zoom=0.33570
shapecode_3_r=1.000
shapecode_3_g=0.000
shapecode_3_b=0.000
shapecode_3_a=1.000
shapecode_3_r2=0.000
shapecode_3_g2=0.000
shapecode_3_b2=0.000
shapecode_3_a2=0.000
shapecode_3_border_r=0.000
shapecode_3_border_g=0.000
shapecode_3_border_b=0.000
shapecode_3_border_a=0.000
shape_3_per_frame1=self = int(instance/num_inst*reg20)*reg01 + 100000; //#
shape_3_per_frame2=
shape_3_per_frame3=age = gmegabuf(self+12);
shape_3_per_frame4=if (age > 0,
shape_3_per_frame5=  max_age = reg22;
shape_3_per_frame6=  x0 = gmegabuf(self)-reg07;
shape_3_per_frame7=  y0 = gmegabuf(self+1)-reg08;
shape_3_per_frame8=  z0 = gmegabuf(self+2)-reg09;
shape_3_per_frame9=
shape_3_per_frame10=
shape_3_per_frame11=  x1 = x0*reg30 + y0*reg31 + z0*reg32;
shape_3_per_frame12=  y1 = x0*reg33 + y0*reg34 + z0*reg35;
shape_3_per_frame13=  z1 = x0*reg36 + y0*reg37 + z0*reg38;
shape_3_per_frame14=
shape_3_per_frame15=
shape_3_per_frame16=  if (z1 > 0,
shape_3_per_frame17=    rad = min(.1,.003/z1); //###
shape_3_per_frame18=   
shape_3_per_frame19=    r = gmegabuf(self+9);
shape_3_per_frame20=    g = gmegabuf(self+10);
shape_3_per_frame21=    b = gmegabuf(self+11);
shape_3_per_frame22=    r2 = r/3; b2 = b/3; g2 = g/3;
shape_3_per_frame23=    a = .17 * max(0,1-age/max_age);  a2 = 0;
shape_3_per_frame24=    fac = reg19;;
shape_3_per_frame25=    x = .5 + x1/z1*fac*q31;
shape_3_per_frame26=    y = .5 - y1/z1*fac*q32;
shape_3_per_frame27=  ,gmegabuf(self+12) += 4*q30; a= 0; rad=0); //#age prematurely ?);
shape_3_per_frame28=
shape_3_per_frame29=, a=0; rad=0;) ;
shape_3_per_frame30=
per_frame_init_1=//The camera tries to follow the head of the firework and look into its direction
per_frame_init_2=//Camera speed and rotational speed is limited, camera lags behind
per_frame_init_3=//Camera angle is forced back into horizontal position
per_frame_init_4=
per_frame_init_5=//-------------- BEGIN MAIN PARAMS ---------------
per_frame_init_6=//SPEEDS
per_frame_init_7=gSpeed = .65;   //global speed, affects all other speeds incl. particle lifetimes
per_frame_init_8=hSpeed = .03;  //firework head speed
per_frame_init_9=pSpeed = .06;   //speed of primary particles
per_frame_init_10=tSpeed = hspeed*3.5;  //speed of tail particles
per_frame_init_11=
per_frame_init_12=//CAMERA
per_frame_init_13=CamDist  = .03; //distance camera tries to stay behind firework 
per_frame_init_14=CamSpeed = .27;  //camera follower speed
per_frame_init_15=CamLock = 6;    //how fast does camera angle lock on firework
per_frame_init_16=HLock = .1;     //force camera angle back into horizontal view
per_frame_init_17=
per_frame_init_18=//OTHER PARAMS
per_frame_init_19=sharp = 40;    //sharpness of bass/treb triggered head direction changes
per_frame_init_20=g0 = .02;      //gravitation
per_frame_init_21=cw = 50;       //air drag
per_frame_init_22=
per_frame_init_23=//---------- END MAIN PARAMS -----------------
per_frame_init_24=
per_frame_init_25=n = 0; loop (150000,gmegabuf(n) = 0; n+=1);
per_frame_init_26=fac = .4; reg19 = fac;
per_frame_init_27=
per_frame_init_28=//SPARKS
per_frame_init_29=obj_num = 1400; reg00 = obj_num;
per_frame_init_30=obj_size = 16; reg01 = obj_size;
per_frame_init_31=max_age = 4.5; reg02 = max_age;
per_frame_init_32=head_ptr = 0; 
per_frame_init_33=free = 0;
per_frame_init_34=
per_frame_init_35=//SPARKS2
per_frame_init_36=num2 = 2048; reg20 = num2;
per_frame_init_37=free2 = 0;
per_frame_init_38=ptr2 = 0;
per_frame_init_39=mage2 = 1.5; reg22 = mage2;
per_frame_init_40=base2 = 100000;
per_frame_init_41=
per_frame_init_42=//TAIL
per_frame_init_43=t_num = 800; reg10 =t_num;
per_frame_init_44=t_age = 1; reg12 = t_age;
per_frame_init_45=tbase = obj_num*obj_size; reg13 = tbase;
per_frame_init_46=t_ptr = 0; 
per_frame_init_47=t_free = 0;
per_frame_init_48=
per_frame_init_49=
per_frame_init_50=x0 = (rand(10)-5)*.03; y0 = (rand(10)-5)*.03; z0 = (rand(10)-5)*.03;;
per_frame_init_51=xcam = 0; ycam = .0; zcam = -0;
per_frame_init_52=//Obj Structure - Index
per_frame_init_53=//0..2: x,y,z  3..5: vx,vy,vz  6..8: fx,fy,fz
per_frame_init_54=//9..11: rgb     12: age         13: size;
per_frame_init_55=
per_frame_init_56=
per_frame_init_57=//camera coordinate system
per_frame_init_58=  c1 = cos(0); c2 = cos(0); c3 = cos(0); 
per_frame_init_59=  s1 = sin(0); s2 = sin(0); s3 = sin(0);
per_frame_init_60=
per_frame_init_61=  reg30 = c2*c1;            reg31 = c2*s1;            reg32 = -s2;
per_frame_init_62=  reg33 = s3*s2*c1 - c3*s1; reg34 = s3*s2*s1 + c3*c1; reg35 = s3*c2;
per_frame_init_63=  reg36 = c3*s2*c1 + s3*s1; reg37 = c3*s2*s1 - s3*c1; reg38 = c3*c2;
per_frame_init_64=
per_frame_init_65=
per_frame_init_66=//head coordinate system
per_frame_init_67=  reg50 = c2*c1;            reg51 = c2*s1;            reg52 = -s2;
per_frame_init_68=  reg53 = s3*s2*c1 - c3*s1; reg54 = s3*s2*s1 + c3*c1; reg55 = s3*c2;
per_frame_init_69=  reg56 = c3*s2*c1 + s3*s1; reg57 = c3*s2*s1 - s3*c1; reg58 = c3*c2;
per_frame_init_70=
per_frame_init_71=tmp = rand(12);
per_frame_init_72=colr = 1-rand(100)/300; 
per_frame_init_73=colg = 1-rand(100)/300; 
per_frame_init_74=colb = 1-rand(100)/300; 
per_frame_init_75=
per_frame_init_76=posx = rand(1000)/100; posz = rand(1000)/100;
per_frame_init_77=
per_frame_init_78=n1= rand(10)/20; n2 = rand(10)/20; n3 = rand(10)/20; n4 = rand(10)/20;
per_frame_init_79=i1= rand(10)/20; i2 = rand(10)/20; i3 = rand(10)/20; i4 = rand(10)/20;
per_frame_init_80=
per_frame_init_81=index2 = int(rand(32));
per_frame_init_82=start = .9;
per_frame_init_83=//-----------------------------------------
per_frame_1=dt = gSpeed/fps; dt2 = dt ; 
per_frame_2=dec_s = exp(-.015*30/fps); dec_m = exp(-1.5/fps); dec_f = exp(-5/fps);
per_frame_3=vol_att = (bass + mid + treb)/3;
per_frame_4=avg = avg*dec_s + (1-dec_s)*vol_att*(1.5-.2/cal);
per_frame_5=
per_frame_6=is_beat = above(vol_att, 1.25*peak) * above (time, t0+.3);
per_frame_7=t0 = if(is_beat,time,t0);
per_frame_8=peak = peak*dec_m  + (1-dec_m)*vol_att;
per_frame_9=index = (index + is_beat) %16;
per_frame_10=index2 = (index2 + is_beat*bnot(index))%16;
per_frame_11=
per_frame_12=//HEAD MOVEMENT x0,y0,z0 based on z-move in HEAD Coords
per_frame_13=right = pow(bass_att-avg,1) * (bass_att > avg) *sharp*n1*sin(time*3)/cal; 
per_frame_14=up =  pow(treb_att-avg,1) * (treb_att > avg) * sharp*n2/cal; 
per_frame_15=
per_frame_16=cal = max(.2,cal*dec_s + (1-dec_s)*sqrt(up*up+right*right)/4);
per_frame_17=
per_frame_18=if ((index%6==0)*is_beat,
per_frame_19=  n1 = rand(100)/100-.5; n2 = rand(100)/100-.5; n3 = rand(100)/100-.5; n4 = pow(rand(100)/70,2)+.05;
per_frame_20=  i1 = 1+int(rand(6)); i2 = 1+int(rand(6)); i3 = 1+int(rand(6)); ,0);
per_frame_21=  
per_frame_22=sp0 = (.5+sqrt(vol_att*4))*hSpeed;
per_frame_23=dec = if(sp0 > speed,.5, dec_m); //checken
per_frame_24=speed =  speed*dec + (1-dec)*sp0;
per_frame_25=
per_frame_26=//HEAD COORD SYS
per_frame_27=c1 = cos(up*dt); c2 = cos(right*dt); c3 = 1; 
per_frame_28=s1 = sin(up*dt); s2 = sin(right*dt); s3 = 0;
per_frame_29=reg40 = c2*c3;            reg41 = c2*s3;            reg42 = -s2;
per_frame_30=reg43 = s1*s2*c3 - c1*s3; reg44 = s1*s2*s3 + c1*c3; reg45 = s1*c2;
per_frame_31=reg46 = c1*s2*c3 + s1*s3; reg47 = c1*s2*s3 - s1*c3; reg48 = c1*c2;
per_frame_32=
per_frame_33=q20 = reg40*reg50 + reg41*reg53 + reg42*reg56;
per_frame_34=q21 = reg40*reg51 + reg41*reg54 + reg42*reg57;
per_frame_35=q22 = reg40*reg52 + reg41*reg55 + reg42*reg58;
per_frame_36=q23 = reg43*reg50 + reg44*reg53 + reg45*reg56;
per_frame_37=q24 = reg43*reg51 + reg44*reg54 + reg45*reg57;
per_frame_38=q25 = reg43*reg52 + reg44*reg55 + reg45*reg58;
per_frame_39=q26 = reg46*reg50 + reg47*reg53 + reg48*reg56;
per_frame_40=q27 = reg46*reg51 + reg47*reg54 + reg48*reg57;
per_frame_41=q28 = reg46*reg52 + reg47*reg55 + reg48*reg58;
per_frame_42=
per_frame_43=reg50 = q20; reg51 = q21; reg52 = q22;
per_frame_44=reg53 = q23; reg54 = q24; reg55 = q25;
per_frame_45=reg56 = q26; reg57 = q27; reg58 = q28;
per_frame_46=vx0 = reg56*speed;
per_frame_47=vy0 = reg57*speed;
per_frame_48=vz0 = reg58*speed;
per_frame_49=x0 = x0 + vx0*dt ;          reg04 = x0; 
per_frame_50=y0 = (y0 + vy0*dt)* (1-y0*y0*dt) ; reg05 = y0; 
per_frame_51=z0 = z0 + vz0*dt ;          reg06 = z0; 
per_frame_52=
per_frame_53=ltest = 0;
per_frame_54=style = n1 > 0; 
per_frame_55=circles = (index2>=12); 
per_frame_56=//SPARK QUEUE - insert new objects
per_frame_57=if (style ==0, new = max(0,min(1200*dt*(mid>1.2),free)),0);
per_frame_58=if (style ==1, new = max(0,min(200*vol_att*(vol_att*200 > 50+obj_num-free),free*.8)),0);
per_frame_59=if (new < 16, new = 0, 0);
per_frame_60=n = 0; m = new; 
per_frame_61=dec = if (new > 0,0.3,dec_f); 
per_frame_62=new_ = new_*dec + (1-dec)*new;
per_frame_63=q29 = new_;
per_frame_64=if (new > 0,
per_frame_65=  if (index%5==3,
per_frame_66=    csum = sqrt(pow(bass_att,2) + pow(mid_att,2) + pow(treb_att,2)) ;
per_frame_67=    flim = min(max(0,2*pow(rand(100)/100,2)-.5),1);
per_frame_68=    colr = colr*.5 + .5* bass_att/csum;
per_frame_69=    colb = colb*.5 + .5* mid_att/csum;
per_frame_70=    colg = colg*.5 + .5* treb_att/csum;,0);
per_frame_71=  while (exec2 (
per_frame_72=    self = (head_ptr%obj_num)*obj_size;
per_frame_73=    if (gmegabuf(self+12) <= 0,
per_frame_74=      // for rad.sym use theta = 1.5, phi = 0..6
per_frame_75=      if (style==1,theta = 1.5 + 8*n3*sin(i2*6.28*n/new+time); phi = sin(i3*n/new*6.3)*6.3,
per_frame_76=                         theta = rand(12); phi = rand(12));
per_frame_77=      v0 = (1 + .1*(rand(100)/100-.5))*pSpeed * (1+4*(1-n3)*n2*cos(6.28*i1*n/new)); 
per_frame_78=      if (circles==0,
per_frame_79=        vx = sin(theta)*cos(phi)*v0;
per_frame_80=        vy = sin(theta)*sin(phi)*v0;
per_frame_81=        vz = cos(theta)*v0;,0);
per_frame_82=      vx1 = vx*reg50 + vy*reg53+ vz*reg56;
per_frame_83=      vy1 = vx*reg51 + vy*reg54+ vz*reg57;
per_frame_84=      vz1 = vx*reg52 + vy*reg55+ vz*reg58;
per_frame_85=      vx = vx1; vy = vy1; vz = vz1;
per_frame_86=      gmegabuf(self)   = x0;
per_frame_87=      gmegabuf(self+1) = y0;
per_frame_88=      gmegabuf(self+2) = z0;
per_frame_89=      gmegabuf(self+3) = vx+vx0;
per_frame_90=      gmegabuf(self+4) = vy+vy0;
per_frame_91=      gmegabuf(self+5) = vz+vz0;
per_frame_92=      gmegabuf(self+6) = flim;
per_frame_93=
per_frame_94=      gmegabuf(self+9) = colr;
per_frame_95=      gmegabuf(self+10) = colg;
per_frame_96=      gmegabuf(self+11) = colb;
per_frame_97=      gmegabuf(self+12) = dt2;
per_frame_98=      gmegabuf(self+13) = rand(100)/100+.5;//size
per_frame_99=      gmegabuf(self+14) = min(free2,vol_att* (n%8==0)) * (gmegabuf(self+13)>1);
per_frame_100=      ltest += 1;
per_frame_101=      n += 1; m -= 1;
per_frame_102=   ,0;);
per_frame_103=   head_ptr = (head_ptr+1)%obj_num;, m > 0))
per_frame_104=,0);
per_frame_105=
per_frame_106=//SPARK QUEUE - calc movement
per_frame_107=n = 0; free = 0;       
per_frame_108=att0 = att0*dec_m + (1-dec_m)*-.05 * n1*n2*n3; 
per_frame_109=if (att0>0, att0*=.5,0);
per_frame_110=att1 = -0.0005 * (index2%3==0);
per_frame_111=
per_frame_112=loop (obj_num,
per_frame_113=  self = n*obj_size;
per_frame_114=  age = gmegabuf(self+12);
per_frame_115=  if (age > 0, 
per_frame_116=    if (age > max_age, age = 0, age += dt2 + 2*dt2*(style==0)*(index2%2));
per_frame_117=      new = min (free2, gmegabuf(self+14));
per_frame_118=      if (new > 0,
per_frame_119=        while (exec2(  
per_frame_120=          self2 = (ptr2%num2)*obj_size+base2;
per_frame_121=          if (gmegabuf(self2+12) <= 0,
per_frame_122=            gmegabuf(self2)   = gmegabuf(self);
per_frame_123=            gmegabuf(self2+1) = gmegabuf(self+1);
per_frame_124=            gmegabuf(self2+2) = gmegabuf(self+2);
per_frame_125=            gmegabuf(self2+3) = gmegabuf(self+3)+pSpeed*(rand(100)/100-.5)*n4;
per_frame_126=            gmegabuf(self2+4) = gmegabuf(self+4)+pSpeed*(rand(100)/100-.5)*n4;
per_frame_127=            gmegabuf(self2+5) = gmegabuf(self+5)+pSpeed*(rand(100)/100-.5)*n4;
per_frame_128=            gmegabuf(self2+9) = pow(gmegabuf(self+9),1.5);
per_frame_129=            gmegabuf(self2+10) =pow(gmegabuf(self+10),1.5);
per_frame_130=            gmegabuf(self2+11) =pow(gmegabuf(self+11),1.5);
per_frame_131=            gmegabuf(self2+12) = dt2;
per_frame_132=            gmegabuf(self2+13) = rand(100)/200+.5;//size
per_frame_133=             ltest += 1;
per_frame_134=            new -=1; free2 -= 1;
per_frame_135=          ,0;);
per_frame_136=        ptr2 = (ptr2 + 1)%num2;, new > 0));
per_frame_137=      ,gmegabuf(self+14) = 0);      //#nochmal pruefen !
per_frame_138=      v2 = pow(gmegabuf(self+3),2)+pow(gmegabuf(self+4),2)+pow(gmegabuf(self+5),2);
per_frame_139=      brake = max(0.5,1-dt*cw*v2);
per_frame_140=      gmegabuf(self)   += gmegabuf(self+3)*dt;
per_frame_141=      gmegabuf(self+1) += gmegabuf(self+4)*dt;
per_frame_142=      gmegabuf(self+2) += gmegabuf(self+5)*dt;
per_frame_143=      gmegabuf(self+3) *= brake;
per_frame_144=      gmegabuf(self+4) *= brake;
per_frame_145=      gmegabuf(self+5) *= brake;
per_frame_146=    //head attraction
per_frame_147=      dist = (pow(gmegabuf(self)-x0,2) + pow(gmegabuf(self+1)-y0,2) + pow(gmegabuf(self+2)-z0,2));
per_frame_148=      ax = (att0*(gmegabuf(self)-x0)/dist);
per_frame_149=      ay = (att0*(gmegabuf(self+1)-y0)/dist);
per_frame_150=      az = (att0*(gmegabuf(self+2)-z0)/dist);
per_frame_151=      gmegabuf(self+3) += ax*dt;
per_frame_152=      gmegabuf(self+4) += ay*dt;
per_frame_153=      gmegabuf(self+5) += az*dt;
per_frame_154=
per_frame_155=    //cam induced turbulence
per_frame_156=      ax = atan(att1/(gmegabuf(self)-xcam));
per_frame_157=      ay = atan(att1/(gmegabuf(self+1)-ycam));
per_frame_158=      az = atan(att1/(gmegabuf(self+2)-zcam));
per_frame_159=      gmegabuf(self+3) += ax*dt;
per_frame_160=      gmegabuf(self+4) += ay*dt;
per_frame_161=      gmegabuf(self+5) += az*dt;
per_frame_162=
per_frame_163=    //Gravitation
per_frame_164=      gmegabuf(self+4) += g0*dt * gmegabuf(self+13); 
per_frame_165=  ,free += 1); //otherwise
per_frame_166=  gmegabuf(self+12) = age;
per_frame_167=  n += 1;);
per_frame_168=
per_frame_169=//2nd SPARK QUEUE - movement
per_frame_170=n = 0; free2 = 0;
per_frame_171=loop (num2,
per_frame_172=  self = n*obj_size + base2;
per_frame_173=  age = gmegabuf(self+12);
per_frame_174=  if (age > 0, 
per_frame_175=    if (age > mage2, age = 0, age +=dt2*rand(10)/5);
per_frame_176=    v2 = pow(gmegabuf(self+3),2)+pow(gmegabuf(self+4),2)+pow(gmegabuf(self+5),2);
per_frame_177=    brake = max(0.1,1-100*dt*cw*v2);
per_frame_178=    gmegabuf(self)   += gmegabuf(self+3)*dt;
per_frame_179=    gmegabuf(self+1) += gmegabuf(self+4)*dt;
per_frame_180=    gmegabuf(self+2) += gmegabuf(self+5)*dt;
per_frame_181=    gmegabuf(self+3) *= brake;
per_frame_182=    gmegabuf(self+4) *= brake;
per_frame_183=    gmegabuf(self+5) *= brake;
per_frame_184=    gmegabuf(self+4) += g0*dt; //Gravitation
per_frame_185=  ,free2 += 1);
per_frame_186=  gmegabuf(self+12) = age;
per_frame_187=  n += 1;);
per_frame_188=
per_frame_189=//TAIL
per_frame_190=new = int(t_free/8*vol_att); //# vol ?
per_frame_191=new = min (new, t_free);
per_frame_192=if (new > 1,
per_frame_193=  while (exec2 (
per_frame_194=    self = (t_ptr%t_num)*obj_size+tbase;
per_frame_195=    if (gmegabuf(self+12) <= 0,
per_frame_196=      v0 = (1 + .3*(rand(100)/100-.5))*-tSpeed; 
per_frame_197=      vx = .1*(rand(10)/10-.5)*v0;
per_frame_198=      vy = .1*(rand(10)/10-.5)*v0;
per_frame_199=      vz = v0;
per_frame_200=      vx1 = vx*reg50 + vy*reg53+ vz*reg56;
per_frame_201=      vy1 = vx*reg51 + vy*reg54+ vz*reg57;
per_frame_202=      vz1 = vx*reg52 + vy*reg55+ vz*reg58;
per_frame_203=      vx = vx1; vy = vy1; vz = vz1; ran = -v0*dt*rand(100)/100;
per_frame_204=      gmegabuf(self)   = x0 + ran*reg56;
per_frame_205=      gmegabuf(self+1) = y0 + ran*reg57;
per_frame_206=      gmegabuf(self+2) = z0 + ran*reg58;
per_frame_207=      gmegabuf(self+3) = vx+vx0;
per_frame_208=      gmegabuf(self+4) = vy+vy0;
per_frame_209=      gmegabuf(self+5) = vz+vz0;
per_frame_210=      gmegabuf(self+12) = dt2;
per_frame_211=      gmegabuf(self+13) = .5 + rand(100)/150;//size
per_frame_212=      ltest += 1;
per_frame_213=      new -= 1;
per_frame_214=   ,0;);
per_frame_215=  t_ptr = (t_ptr+1)%t_num;, new > 0))
per_frame_216=,0);
per_frame_217=
per_frame_218=//TAIL QUEUE - calc movement
per_frame_219=n = 0; t_free = 0;
per_frame_220=loop (t_num,
per_frame_221=  self = n*obj_size + tbase;
per_frame_222=  age = gmegabuf(self+12);
per_frame_223=  ltest += 1;
per_frame_224=  if (age > 0, 
per_frame_225=    if (age > t_age, age = 0, age +=dt2);
per_frame_226=    v2 = pow(gmegabuf(self+3),2)+pow(gmegabuf(self+4),2)+pow(gmegabuf(self+5),2);
per_frame_227=    brake = max(0.5,1-dt*cw*v2); 
per_frame_228=    gmegabuf(self)   += gmegabuf(self+3)*dt;
per_frame_229=    gmegabuf(self+1) += gmegabuf(self+4)*dt;
per_frame_230=    gmegabuf(self+2) += gmegabuf(self+5)*dt;
per_frame_231=    gmegabuf(self+3) *= brake;
per_frame_232=    gmegabuf(self+4) *= brake;
per_frame_233=    gmegabuf(self+5) *= brake;
per_frame_234=    gmegabuf(self+3) += sin(gmegabuf(self+1)*444)*dt*.04;
per_frame_235=    gmegabuf(self+4) += sin(gmegabuf(self+2)*444)*dt*.04;
per_frame_236=    gmegabuf(self+5) += sin(gmegabuf(self+0)*444)*dt*.04;
per_frame_237=
per_frame_238=    gmegabuf(self+4) += g0*dt; //Gravitation
per_frame_239=  ,t_free += 1); //otherwise
per_frame_240=  gmegabuf(self+12) = age;
per_frame_241=  n += 1;
per_frame_242=);
per_frame_243=
per_frame_244=//SPARK and HEAD COORD for use in comp shader
per_frame_245=
per_frame_246=ranpt = if (rand(10)/7<vol_att,((head_ptr+obj_num-int(rand(obj_num/2)))%obj_num)*obj_size, ranpt);
per_frame_247=point = ranpt;
per_frame_248=x0_ = gmegabuf(point)-reg07; y0_ = gmegabuf(point+1)-reg08; z0_ = gmegabuf(point+2)-reg09;
per_frame_249=x1 = x0_*reg30 + y0_*reg31 + z0_*reg32;
per_frame_250=y1 = x0_*reg33 + y0_*reg34 + z0_*reg35;
per_frame_251=z1 = x0_*reg36 + y0_*reg37 + z0_*reg38;
per_frame_252=q11 = .5 + x1/z1*fac;
per_frame_253=q12 = .5 + y1/z1*fac;
per_frame_254=age = gmegabuf(point+12);
per_frame_255=q13 = if (z1>0,1/z1,0) * (age > 0)*(1-age/max_age) * sqrt(treb)*.0008;
per_frame_256=q13 = max(0,q13*(.5+flim));
per_frame_257=
per_frame_258=x0_ = x0-reg07; y0_ = y0-reg08; z0_ = z0-reg09;
per_frame_259=x1 = x0_*reg30 + y0_*reg31 + z0_*reg32;
per_frame_260=y1 = x0_*reg33 + y0_*reg34 + z0_*reg35;
per_frame_261=z1 = x0_*reg36 + y0_*reg37 + z0_*reg38;
per_frame_262=q14 = .5 + x1/z1*fac;
per_frame_263=q15 = .5 + y1/z1*fac;
per_frame_264=q16 = if (z1>0, 1/z1* q29/3+20 + 40*vol_att,0) ;
per_frame_265=q16 = max(0,q16/4) ;
per_frame_266=
per_frame_267=
per_frame_268=//FOLLOW WITH CAMERA
per_frame_269=reg07 = xcam; reg08 = ycam; reg09 = zcam;
per_frame_270=dxcam = (x0-xcam)*dt*CamSpeed; dycam = (y0-ycam-.0)*dt*CamSpeed; dzcam = (z0-zcam-CamDist)*dt*CamSpeed; 
per_frame_271=xcam += dxcam; ycam += dycam; zcam += dzcam; 
per_frame_272=
per_frame_273=//ROTATE VIEPOINT
per_frame_274=x1 = (x0-XCam)*reg30 + (y0-yCam) *reg31 + (z0-zCam)*reg32;
per_frame_275=y1 = (x0-XCam)*reg33 + (y0-YCam) *reg34 + (z0-zCam)*reg35;
per_frame_276=dist = sqrt(pow(x0-xcam,2) + pow(y0-ycam,2) + pow(z0-zcam,2));
per_frame_277=k1 = dt/max(dist,.02)*CamLock;
per_frame_278=v1 =  -k1*(y1); v2 = k1*(x1); v3 = -reg31*k1*HLock;
per_frame_279=
per_frame_280=c1 = cos(v1); c2 = cos(v2); c3 = cos(v3); 
per_frame_281=s1 = sin(v1); s2 = sin(v2); s3 = sin(v3);
per_frame_282=reg40 = c2*c3; reg41 = c2*s3; reg42 = -s2;
per_frame_283=reg43 = s1*s2*c3 - c1*s3; reg44 = s1*s2*s3 + c1*c3; reg45 = s1*c2;
per_frame_284=reg46 = c1*s2*c3 + s1*s3; reg47 = c1*s2*s3 - s1*c3; reg48 = c1*c2;
per_frame_285=
per_frame_286=q20 = reg40*reg30 + reg41*reg33 + reg42*reg36;
per_frame_287=q21 = reg40*reg31 + reg41*reg34 + reg42*reg37;
per_frame_288=q22 = reg40*reg32 + reg41*reg35 + reg42*reg38;
per_frame_289=q23 = reg43*reg30 + reg44*reg33 + reg45*reg36;
per_frame_290=q24 = reg43*reg31 + reg44*reg34 + reg45*reg37;
per_frame_291=q25 = reg43*reg32 + reg44*reg35 + reg45*reg38;
per_frame_292=q26 = reg46*reg30 + reg47*reg33 + reg48*reg36;
per_frame_293=q27 = reg46*reg31 + reg47*reg34 + reg48*reg37;
per_frame_294=q28 = reg46*reg32 + reg47*reg35 + reg48*reg38;
per_frame_295=reg30 =q20; reg31 =q21; reg32 =q22; 
per_frame_296=reg33 =q23; reg34 =q24; reg35 =q25;
per_frame_297=reg36 =q26; reg37 =q27; reg38 =q28;
per_frame_298=
per_frame_299=//Fake altitude
per_frame_300=q10 = (1.3-ycam);
per_frame_301=
per_frame_302=//TEXTURE GND MOVEMENT
per_frame_303=q18 = zcam*4; 
per_frame_304=q19 = -xcam*4;
per_frame_305=
per_frame_306=//CLOUDS MOVEMENT
per_frame_307=crot = crot + v3;
per_frame_308=cfwd = cfwd + (dxcam*reg36 + dycam*reg37 + dzcam*reg38);
per_frame_309=
per_frame_310=q1 = cos(crot);q2 = sin(crot);
per_frame_311=cmovx += -v1 * q1 + v2 * q2;
per_frame_312=cmovy +=  v1 * q2 + v2 * q1;
per_frame_313=q5 = cmovx*.1;
per_frame_314=q6 = cmovy*.1;
per_frame_315=q7 = cfwd*8;
per_frame_316=
per_frame_317=q30 = dt2;
per_frame_318=q31 = aspectx;
per_frame_319=q32 = aspecty;
per_frame_320=
per_frame_321=q17 = int(colr*10) + int(colg*10)*10 + int(colb*10)*100;
per_frame_322=dx = -v2*.5; dy = v1*.5;
per_frame_323=rot = v3;
per_frame_324=zoom = 1+(dxcam*reg36 + dycam*reg37 + dzcam*reg38);
per_frame_325=
per_frame_326=start = max(0,start-dt2);
per_frame_327=q3 = start;
per_frame_328=if (ltest > 2000, fail = 1, 0);
warp_1=`#define sat saturate
warp_2=`float3 Get1 (float2 uvi) {return lerp (GetPixel(uvi), GetBlur1(uvi), .2);}
warp_3=`shader_body
warp_4=`{
warp_5=`
warp_6=`uv = 0.5 + (1.0 - abs( frac( uv * 0.5 ) * 2 - 1.0 )-.5); // Eo.S. mirror code
warp_7=`
warp_8=`ret = Get1(uv);
warp_9=`uv = (uv*2+uv_orig)/3;
warp_10=`ret =+ max(0,Get1 (uv));
warp_11=`uv = (uv+uv_orig*2)/3;
warp_12=`ret += max(0,Get1 (uv));
warp_13=`
warp_14=`ret = ret/3 * 0.5 - 0.004;
warp_15=`}
warp_16=`
comp_1=`#define sat saturate
comp_2=`#define sampler_test sampler_moss1
comp_3=`sampler sampler_pw_noise_lq;
comp_4=`sampler sampler_test;
comp_5=`float inten, z, tmp, lprof, gnd, ncloud;
comp_6=`float2 dz, uv1,uv2, uv3, uv4;
comp_7=`float3 back, back2, sky, ret1, ret2, rs, rs1, cloud, fcol, forest;
comp_8=`static const float3 t = float3(q20,q23,q26);
comp_9=`static const float3 s = float3(q22,q25,q28);
comp_10=`static const float3 ts = cross(t,s);
comp_11=`static const float2 movxz = float2(q18,q19);
comp_12=`static const float3 col = pow(float3((q17%10.0)/10,((q17/10.0)%10)/10.0,int(q17/100.0)/10.0),.8);
comp_13=`static const float hlim = 10;
comp_14=`float3 screen;
comp_15=`
comp_16=`float3 lavcol (float t) { return pow(.5,2*t*slow_roam_cos);}
comp_17=`
comp_18=`float aTan2(float y, float x) {float angle;	 float abs_y = abs(y);
comp_19=`if (x >= 0) {float r = (x - abs_y) / (x + abs_y); angle = 1-r;} 
comp_20=`else {float r = (x + abs_y) / (abs_y - x); angle = 3-r; }	
comp_21=`angle = angle * .25;
comp_22=`return y < 0 ? -angle : angle;}
comp_23=`
comp_24=`float3 project  (float dist) {float z; 
comp_25=`  z = dist/mul(ts,screen); z = clamp(z,-hlim,hlim);
comp_26=`  return float3((mul(float2x3(t,s),cross(ts,screen))*z+movxz),-z);}
comp_27=`
comp_28=`float noise4 (float2 uvi) { float n1,n2,zv; zv = 0.008*time;
comp_29=`  n1 = lum(tex2D(sampler_noise_hq, (uvi)));
comp_30=`  n2 = lum(tex2D(sampler_noise_hq, (uvi*2+zv)));
comp_31=`  return n1 + n2/2 ;}
comp_32=`
comp_33=`shader_body {
comp_34=`uv1 = (uv-.5)*aspect.xy+.5;
comp_35=`screen = float3 ((uv-float2(.5,.5+.0*pow((uv.x-.5),2)))*aspect.xy,.6);
comp_36=`
comp_37=`//CLOUDS
comp_38=`uv2 = mul(uv1*float2(1,1),float2x2(q1,q2,-q2,q1));
comp_39=`float anz = 3.0; float t_rel = q7;
comp_40=`cloud = 0;
comp_41=`for (int n=1;n<=anz;n++) {
comp_42=`    z = 1-frac(1.0*n/anz-1.0*frac(-t_rel/anz)); 
comp_43=`    inten =  (1-z)*z*2;
comp_44=`    uv2 = z*uv2*.2 + float2(q6,q5); //?
comp_45=`    tmp = sat(lum(tex2D (sampler_noise_hq,uv2 +.01*noise4(uv2*4))-.6));
comp_46=`    cloud = cloud + tmp*inten;}
comp_47=`ncloud = 1-cloud;
comp_48=`fcol = tex2D(sampler_test,(uv2)*.2)*1.6;
comp_49=`cloud *= (.2+col);
comp_50=`
comp_51=`//SKY AND GROUND
comp_52=`rs = project (q10); float3 rs0 = rs;
comp_53=`float3 noise = tex2D (sampler_noise_hq,rs.xy*.1);
comp_54=`gnd = .3*(noise.z-.5)/rs.z;
comp_55=`
comp_56=`forest = 0;
comp_57=`for (int m = 1; m <= 2; m++)
comp_58=`{ rs = project(q10+gnd);
comp_59=`  rs.xy += .015*(tex2D (sampler_noise_hq,float2(rs.xy/2+time*.01))-.5);; //wind
comp_60=`  rs1 = rs;
comp_61=`  rs1.xy = 0.5 + (1.0 - abs( frac( rs.xy * 0.5 ) * 2 - 1.0 )-.5); // Eo.S. mirror code 
comp_62=`  back = tex2D (sampler_test,rs1.xy);;
comp_63=`  lprof =  back.g;
comp_64=`  tmp =  1-(saturate(1.8*lprof-.3*(2-m))); 
comp_65=`  forest += back * saturate(lprof*1)*.12 ;
comp_66=`  gnd += tmp/pow(rs.z,2)*.3; 
comp_67=`}
comp_68=`forest *= 1-noise.x+lprof;
comp_69=`forest += (.2/length(abs(noise.xy-.2-forest.g/2)))/rs.z * (.5+slow_roam_sin)/4 ;
comp_70=`back = forest/pow(rs.z,1) * (rs.z>0) * (rs.z < hlim);
comp_71=`
comp_72=`float k1 = saturate(1-10/abs(pow(rs.z,1.8)));
comp_73=`back = lerp(back,.12*lavcol(k1), k1) ;;
comp_74=`
comp_75=`ret1 = lerp(tex2D(sampler_main,uv),2*GetBlur1(uv),.0) *3 * ncloud;
comp_76=`ret2 = (GetBlur2(uv) + GetBlur3(uv))*2.0;
comp_77=`ret1 = lerp (ret1, ret2, 2*cloud);;
comp_78=`ret = back*ncloud + ret1 + cloud/3;
comp_79=`
comp_80=`
comp_81=`uv2 = uv1-float2(q11,q12);
comp_82=`float flash = q13/(length(uv2));
comp_83=`flash *= flash/(abs(frac(q12*32+min(6,int(1+treb_att))*aTan2(uv2.x,uv2.y))-.5)+.14);
comp_84=`
comp_85=`uv2 = uv1-float2(q14,q15);
comp_86=`float head = pow(.0001/(length(uv2)),.8)*q16;
comp_87=`ret += pow(head+flash,ncloud)*saturate(col*2-0.8);
comp_88=`
comp_89=`ret += GetBlur3((uv-.5)/2+.5)/pow(rs.z,2)*(rs.z>0)*lprof*2;
comp_90=`
comp_91=`
comp_92=`}
comp_93=`
comp_94=`//-------------------------------------------
comp_95=`//Written by martin
comp_96=`
