uniform sampler3D m[2];float v,y=gl_TexCoord[0].x*.87-10.,z=.7,a=83.;vec2 x,f=gl_FragCoord.xy*.0028-vec2(1.8,1),t=vec2(0);vec3 D,w=vec3(92),c=vec3(0,0,y*.7),n=vec3(-.28,.92,-.28),o=normalize(vec3(f,2));vec4 s,d=vec4(0),g=d,i=d;float h(vec3 y){return(texture3D(m[0],y).x*.8+texture3D(m[0],y*=2.).x*.4+texture3D(m[0],y*=2.).x*.2+texture3D(m[0],y*=2.).x*.1+texture3D(m[0],y*=2.).x*.05)*.0234;}float D(vec3 y,vec3 o){return length(min(y=o-abs(y),0.))-max(min(min(y.x,y.y),y.z),0.);}float D(vec3 y,float o){return length(min(y=o-abs(y),0.).xy)-max(min(y.x,y.y),0.);}float o(vec3 y){return min(length(abs(y.xy)-.006)-.0007,length(vec2(sqrt(sqrt(length(x*=x*=x=y.xy)))-.0075,mod(y.z,.01)-.005))-.0007);}float u(vec3 z){vec3 f,i,d=z;d.xz=abs(d.xz);d.xz=(d.z<d.x?d.xz:d.zx)*mat2(.383,-.924,.924,.383)+vec2(1,2.3);v=length(z-w)-.1;x=floor(d.xz*.5);i=vec3(mod(d.xz,2.)-1.,d.y);float t,c,n,u,r,s,l,b=-max(D(i,1.39),-D(i,vec3(.61,.61,floor(min(texture3D(m[0],vec3(x*.2,0)).x*4.+20./dot(x,x),14.)*10.)*.1+.06))),e=min(min(b,z.y),v);return e<.01?f=mod(d+.1,vec3(.2,.1,.2))-vec3(.1,.05,.1),u=h(z),r=z.y+u*.5+h(z*.1)*4.,l=h(z*.1)*10.,s=l-max(b+.1,.2),n=max(min(min(o(f),o(f.xzy)),o(f.yzx)),s-.02),t=max(max(.016-u,min(min(D(f,.01),D(f.xzy,.01)),D(f.yzx,.01))),s),c=h(z*20.),g=(length(z-vec3(3.5,1,0))+u*10.+l*30.<y-a?vec4(.08,.3+sin(l*800.)*.05+c*8.,.1,0):r<.002?vec4(.07,.05,.03,0):t<.0015?vec4(.25+c*3.):n<.002?vec4(.18,.17,.16,0):vec4(.3))-max(1.-v,0.)*.4,min(min(max(b,min(t,n)),r),v):e;}mat2 o(float y){return mat2(cos(y),-sin(y),sin(y),cos(y));}float u(float y){return y*y*.1;}float b(float y){return y*2.-y*y*.1;}void main(){float v=1.,x=y<0.?2.:-1.,r=v,l,e=0.,C,F=10.,q=0.;D=y<10.?vec3(-10.1+b(y),13.7,-3):y<20.?o.xy*=o(min(u(y-10.)*.4,3.14)),o.yz*=o(b(y-10.)*.157),vec3(-.1,13.7-u(y-10.),min(y*.2,3.)-5.):y<30.?o.xy*=o(3.14),o.yz*=o(min(y*.4-6.43,3.14)),o.xz*=o(min(y*.2-4.,.39)),y>25.?q=u(y-25.),l=5.-b(y-20.):l=-u(y-20.),vec3(-.1-l*.35,3.7-b(b(b(y-20.)))*.25-q*.4,l*.923-2.):y<40.?o.yz*=o(.7),t=vec2(-.28,.62),x=0.,vec3(3,5.,y*.4-18.):y<50.?o.xz*=o(-.39),t=vec2(-.28,.62),x=1.,vec3(-.52,y*.2-1.,-1.5):y<60.?x=3.5,r=2.,vec3(2,4,-6.-y*.1):y<70.?o.yz*=o(1.2),o.xz*=o(7.3-y*.1),w=y<65.?vec3(y*.8-47.7,1,y*.4-30.3):vec3(y*.4-21.7,1,y*.8-56.3),vec3(4.5,3.5,-4.5):y<80.?o.yz*=o(1.),o.xz*=o(-1.57),a-=10.,w=y<75.?vec3(3.5,1,b(y-65.)-10.):vec3(3.5,1,u(y-75.)),vec3(2,3,0):y<90.?o.yz*=o(.7),a-=10.,vec3(3,5,15.-y*.3):y<105.?o.yz*=o(.5),o.xz*=o(1.18-max(min(y*.5-46.,.785),0.)),w=y<91.5?vec3(112.42-y*1.235,1,.39*y-31.71):vec3(44.97-y*.498,1,y*1.2-105.82),y<95.?vec3(8.938-b(y-85.)*.923,2,.7+b(y-85.)*.3):vec3(-.292-u(y-95.)*.498,2,3.7+u(y-95.)*1.2):y<120.?o.yz*=o(.5),o.xz*=o(.395+max(min(y*.5-57.,1.57),0.)),w=y<117.5?y<111.3?vec3(44.97-y*.498,1,y*1.2-105.82):vec3(123.1-y*1.2,1,83.15-y*.498):vec3(y*3.-370.36,y*.36-41.3,y*1.195-115.75),y<115.?vec3(-5.271-b(y-105.)*.498,2,15.7+b(y-105.)*1.2):vec3(-10.25,2,27.7):y<130.?x=6.,r=3.,w:w;for(l=0.;e<20.&&l<20.&&v>.0005;l+=.1,C=v,v=u(D),F=min(F,q=length(D-w)-.1),q<.5?o=normalize(mix(o,cross(o,w-D),min(q-.4,0.)*.25)):o,d.w<.95?D.y>5.?D.y<15.?v=min(v,.2),q=max(h((D+c)*.02)*80.-1.5,0.)*min(D.y*.3-1.5,1.)*min(7.5-D.y*.5,1.),d+=vec4(mix(vec3(.7),vec3(0),q),1.)*q*v*3.*(1.-d.w),v:v*o.y+D.y<15.?v=min(v,max((D.y-15.)/o.y,.02)):v:v*o.y+D.y>5.?v=min(v,max((5.-D.y)/o.y,.02)):v:v,q=length(D-vec3(3.5,1,0))-(y-75.)*(y-75.)*(y-75.),q>0.?D.y<4.?v=min(v,.2),d+=vec4(.3,.3,.3,1)*max(h((D+c)*.1)*80.-1.5,0.)*min(1.-D.y*.25,1.)*v*(1.-d.w),v:v*o.y+D.y<4.?v=min(v,max((D.y-4.)/o.y,.02)):v:q>-.1&&D.y<4.?v=min(v,.2),d+=vec4(.3,.3,.3,1)*(.1+q)*v*10.,v:v,e+=v,D+=v*o);v<C?D+=o*(C*(v-.0005)/(C-v)-v),e+=v=u(D),D+=v*o:D;s=g;vec3 p=normalize(vec3(u(D+vec3(.01,0,0))-u(D-vec3(.01,0,0)),u(D+vec3(0,.01,0))-u(D-vec3(0,.01,0)),u(D+vec3(0,0,.01))-u(D-vec3(0,0,.01))));C=o.y;float Z=e,Y=min((u(D+p*.0005)-v)*190.-.1,0.);D+=p*.01+n*.02;o=n;v=1.;e=.01;for(l=0.;e<10.&&l<10.&&v>.01;l+=.1,e+=v=u(D),D+=v*o,z=min(q=5.*v/e,z));F*=F=max(.55-F*(1.-abs(sin(y*9.))*.15),0.);i=.14*r<abs(f.y-.04+t.y)?i:texture3D(m[1],vec3((f+t+vec2(2,-.48+x*-.293))*vec2(.25,-.25),0));gl_FragColor=mix(mix(Z<20.?mix(max((s+max(vec4(dot(p,n)),0.)*.2)*(e<10.?.4:z+.4)+Y,0.),vec4(.2),max(min(Z*.1,1.),0.)):mix(vec4(.2),vec4(.1,.2,.32,0),max(C*5.,0.)),d/d.w,d.w)*1.3-vec4(F,F*.7,F,0),i,i.w*max(min(mod(y,10.)*mod(-y,10.)*.1-1.,1.),0.))*(y>-5.&&y<25.||y>95.?1.:min(mod(y,10.)*mod(-y,10.)*.1,1.));}