#version 420 core
uniform float fGlobalTime;
uniform vec2 v2Resolution;
uniform float fFrameTime;
uniform float uFocusDist;
uniform float uDofAperture;
uniform float uMbShutter;
uniform float uCameraMotionBlur;
uniform float uLightMotionBlur;
uniform float uGlowInner;
uniform float uGlowOuter;
uniform float uBloomStrength;
uniform float uBulbFill;
uniform float uVignette;
uniform float uBulbLayoutMode;
uniform float uCameraMode;
uniform vec3 uCameraPos;
uniform vec3 uCameraTarget;
uniform float uBulbPower[5];
uniform float uBulbPowerMode[5];
uniform float uSkyThreshold;
layout(location = 0) out vec4 out_color;

                                           const float PI=3.14159265359;const float bx=20.;const
                                     float aq=.0008;const int ci=80;const int N=8;const int bG=6;const
                                  int ax=5;const int O=8;const float bj=1.00029;const float bm=1.5;const vec3
                               T=vec3(0.,.515,0.);const float ac=.1;const vec3 I=vec3(1.,.46,.1);float j;float Q
                             ;float aS;float ak;float aT;float ad;float af;float aU;float aV;float at;float aF;
                          float bo;void aC(float t){aS=uFocusDist;ak=uDofAperture;aT=uMbShutter;ad=uCameraMotionBlur
                         ;af=uLightMotionBlur;aU=uGlowInner;aV=uGlowOuter;at=uBloomStrength;aF=uBulbFill;bo=uVignette;
                       }float R(vec2 p){vec3 p3=fract(vec3(p.xyx)*vec3(.1012,.1001,.1031));p3+=dot(p3,p3.yzx+33.33);
                     return fract((p3.x+p3.y)*p3.z);}vec2 cI(vec2 p){vec3 p3=fract(vec3(p.xyx)*vec3(.1012,.1001,.1031));
                    p3+=dot(p3,p3.yzx+33.33);return vec2(fract((p3.x+p3.y)*p3.z),fract((p3.x+p3.z)*p3.y));}vec3 bH(vec2 Z){
                  float dt=max(fFrameTime,1./240.);float cB=mod(floor(fGlobalTime/dt),64.);vec2 cy=Z+vec2(cB*17.,cB*59.);
                 return vec3(R(cy+vec2(1.7,9.2)),R(cy+vec2(13.5,47.1)),R(cy+vec2(71.3,3.4)));}struct J{float d;int au;int l;}
                ;J F(float d,int au,int l){J h;h.d=d;h.au=au;h.l=l;return h;}J cf(J a,J b){return(a.d<b.d)?a:b;}struct U{float
               cx;vec3 bc;int l;};U bV(float cx,vec3 bc,int l){U m;m.cx=cx;m.bc=bc;m.l=l;return m;}float bW(U ah[N],int sp){
              return(sp>0)?ah[sp-1].cx:bj;}vec3 bp(U ah[N],int sp){return(sp>0)?ah[sp-1].bc:vec3(0.);}bool bX(inout U ah[N],inout
             int sp,U m){if(sp>=N)return false;ah[sp]=m;sp++;return true;}float cE(U ah[N],int sp,int l){if(sp>0&&ah[sp-1].l==l)
            return(sp>1)?ah[sp-2].cx:bj;return bj;}void cj(inout U ah[N],inout int sp,int l){if(sp>0&&ah[sp-1].l==l)sp--;}float aY(
           float aL,float bR,float bS){float r0=(bR-bS)/(bR+bS);r0*=r0;return r0+(1.-r0)*pow(1.-aL,5.);}mat2 eg(float a){float c=
          cos(a),s=sin(a);return mat2(c,s,-s,c);}float by(vec3 p,float r){return length(p)-r;}float aK(vec3 p,vec3 r){float k0=
         length(p/r);float k1=length(p/(r*r));return k0*(k0-1.)/k1;}float o(vec3 p,float h,float r){vec2 d=abs(vec2(length(p.xz),p.y)
         )-vec2(r,h);return min(max(d.x,d.y),0.)+length(max(d,0.));}float as(vec3 p,vec3 a,vec3 b,float r){vec3 pa=p-a;vec3 ba=b-a;
        float h=clamp(dot(pa,ba)/dot(ba,ba),0.,1.);return length(pa-ba*h)-r;}float cr(vec3 p,vec2 t){vec2 q=vec2(length(p.xz)-t.x,p.y);
       return length(q)-t.y;}float aA(float a,float b,float k){float h=clamp(.5+.5*(b-a)/k,0.,1.);return mix(b,a,h)-k*h*(1.-h);}float
       aE(vec3 p,float r1,float r2,float h){vec2 q=vec2(length(p.xz),p.y);float b=(r1-r2)/h;float a=sqrt(max(1.-b*b,0.));float k=dot(q,
      vec2(-b,a));if(k<0.)return length(q)-r1;if(k>a*h)return length(q-vec2(0.,h))-r2;return dot(q,vec2(a,b))-r1;}float bI(vec3 p){float
      cg=aK(p-vec3(0.,.705,0.),vec3(.294,.305,.294));float aM=aE(p-vec3(0.,.29,0.),.143,.258,.245);float cz=o(p-vec3(0.,.3,0.),.14,.143);
     float d=aA(cg,aM,.069);return aA(d,cz,.025);}float bJ(vec3 p){float cg=aK(p-vec3(0.,.705,0.),vec3(.282,.293,.282));float aM=aE(p-vec3
    (0.,.282,0.),.131,.246,.253);float cz=o(p-vec3(0.,.295,0.),.15,.131);float d=aA(cg,aM,.06);return aA(d,cz,.022);}float bK(vec3 p){
    float d=max(bI(p),-bJ(p));return max(d,.245-p.y);}float aZ(float x,float bE){return mod(x+.5*bE,bE)-.5*bE;}float aP(vec3 p,float be,
    float cC,float bt){float r=length(p.xz);float cY=atan(p.z,p.x);float k=cC/(2.*PI);float cZ=aZ(p.y-k*cY,cC);float rr=max(r,1e-5);float
   dv=cZ/sqrt(1.+(k*k)/(rr*rr));return length(vec2(r-be,dv))-bt;}float bL(vec3 p){float d=o(p-vec3(0.,.15,0.),.1,.124);d=min(d,o(p-vec3(0.,
   .253,0.),.018,.145));d=min(d,cr(p-vec3(0.,.23,0.),vec2(.132,.008)));const float bu=.034;vec3 ph=p;ph.y-=.07;float bF=aP(ph,.13,bu,.009);
  float bY=max(.07-p.y,p.y-.22);bF=max(bF,bY);d=min(d,bF);d=min(d,o(p-vec3(0.,.052,0.),.023,.106));d=min(d,o(p-vec3(0.,.029,0.),.012,.086));
  return d;}float aQ(vec3 p){vec3 q=p-vec3(0.,.006,0.);q.y*=1.6;return length(q)-.041;}float bM(vec3 p){float d=1e20;d=min(d,as(p,vec3(0.,
  .292,0.),vec3(0.,.435,0.),.024));d=min(d,by(p-vec3(0.,.435,0.),.027));d=min(d,o(p-vec3(0.,.497,0.),.064,.013));return d;}vec3 S(float t){
 float x=mix(-.112,.112,t);float dp=.0105*sin(PI*t);float dP=.006*exp(-pow((t-.56)/.13,2.));float dq=.0018*sin(2.*PI*t+.6);float y=.65+dp-dP+
 dq;return vec3(x,y,0.);}float bZ(vec3 p){float d=1e20;for(int i=0;i<O;++i){float t0=float(i)/float(O);float t1=float(i+1)/float(O);d=min(d,
 as(p,S(t0),S(t1),.0018));}return d;}float aD(vec3 p){vec3 ca=vec3(-.04,.435,0.);vec3 bN=vec3(.04,.435,0.);float dl=as(p,ca,S(0.),.0024);float
 dr=as(p,bN,S(1.),.0024);return min(dl,dr);}struct A{vec3 ao;mat3 ch;mat3 bz;float ai;float bA;float aj;float av;};mat3 da(float a){float c=
 cos(a),s=sin(a);return mat3(vec3(1.,0.,0.),vec3(0.,c,s),vec3(0.,-s,c));}mat3 db(float a){float c=cos(a),s=sin(a);return mat3(vec3(c,0.,-s),
vec3(0.,1.,0.),vec3(s,0.,c));}mat3 cD(float a){float c=cos(a),s=sin(a);return mat3(vec3(c,s,0.),vec3(-s,c,0.),vec3(0.,0.,1.));}mat3 cb(vec3 a)
{return cD(a.z)*db(a.y)*da(a.x);}A E(vec3 ao,vec3 dQ,float ai,float aj,float av){A b;b.ao=ao;b.ch=cb(dQ);b.bz=transpose(b.ch);b.ai=max(ai,1e-4
);b.bA=1./b.ai;b.aj=aj;b.av=av;return b;}A u[ax];vec3 G(int id){float f=float(id);float jx=R(vec2(f+11.,3.))-.5;float jy=R(vec2(f+23.,7.))-.5;
float jz=R(vec2(f+41.,13.))-.5;return vec3((f-2.)*1.38+.26*jx,.26*jy,.48*jz);}vec3 H(int id){float f=float(id);return vec3((R(vec2(f+53.,17.))-
.5)*1.1,(R(vec2(f+67.,19.))-.5)*1.5,(R(vec2(f+79.,29.))-.5)*1.2);}float C(int id){float f=float(id);return.88+.18*R(vec2(f+97.,31.));}void cc()
{float cJ=smoothstep(.05,1.95,.5+.5*sin(Q*15.7));float cK=smoothstep(.05,1.95,.5+.5*sin(Q*17.3+1.2));float cL=smoothstep(.05,1.95,.5+.5*sin(Q*
23.9+2.4));float cM=smoothstep(.05,1.95,.5+.5*sin(Q*35.5+3.6));float cN=smoothstep(.05,1.95,.5+.5*sin(Q*66.1+4.8));float p0=(uBulbPowerMode[0]<
.5)?max(uBulbPower[0],0.):cJ;float p1=(uBulbPowerMode[1]<.5)?max(uBulbPower[1],0.):cK;float p2=(uBulbPowerMode[2]<.5)?max(uBulbPower[2],0.):cL;
float p3=(uBulbPowerMode[3]<.5)?max(uBulbPower[3],0.):cM;float p4=(uBulbPowerMode[4]<.5)?max(uBulbPower[4],0.):cN;if(uBulbLayoutMode<.5){u[0]=E
(G(0),H(0),C(0),p0,1.);u[1]=E(G(1),H(1),C(1),p1,1.);u[2]=E(G(2),H(2),C(2),p2,1.);u[3]=E(G(3),H(3),C(3),p3,1.);u[4]=E(G(4),H(4),C(4),p4,1.);
return;}u[0]=E(2.*vec3(-1.45,-.02+.45*sin(j*1.43),.15),4.*vec3(.08,.18+.18*sin(j*1.55),.16),.92,p0,1.);u[1]=E(2.*vec3(-.72,.06+.34*sin(j*2.51+
1.),-.05),4.*vec3(-.1*j,-.36+.16*sin(j*1.67),-.8*j),.86,p1,1.);u[2]=E(2.*vec3(0.+.56*sin(j*1.1+5.2),0.+.25*sin(j*1.47+2.),.02+.55*sin(j*1.25+1.
)),4.*vec3(.02*j,.12*sin(j*1.73),.6*j),1.,p2,1.);u[3]=E(2.*vec3(.74+.44*sin(j*1.19+3.),-.05+.54*sin(j*1.59+2.),-.25+.64*sin(j*1.89+5.)),4.*vec3
(.14*j,.44+.14*sin(j*1.61),.3*j),1.05,p3,1.);u[4]=E(2.*vec3(1.5,.05+.25*sin(j*1.41+4.),-.12),4.*vec3(-.12*j,-.52+.18*sin(j*1.49),-.14*j),.9,p4
,1.);}vec3 L(int id,vec3 p){A b=u[id];return b.bz*(p-b.ao)*b.bA+T;}vec3 bO(int id,vec3 p){A b=u[id];return b.ao+b.ch*((p-T)*b.ai);}J al(vec3 p
,int l){J ap=F(1e20,0,l);ap=cf(ap,F(bK(p),1,l));ap=cf(ap,F(bL(p),2,l));ap=cf(ap,F(aQ(p),3,l));ap=cf(ap,F(bM(p),4,l));ap=cf(ap,F(aD(p),5,l));ap
 =cf(ap,F(bZ(p),6,l));return ap;}float bP(vec3 p){return by(p-vec3(0.,.5,0.),.62);}J cs(vec3 p){float aJ=1e20;float V=1e20;int ay=-1;int W=-1;
 for(int i=0;i<ax;++i){if(u[i].av<.5)continue;vec3 q=L(i,p);float bd=bP(q)*u[i].ai;if(bd<aJ){V=aJ;W=ay;aJ=bd;ay=i;}else if(bd<V){V=bd;W=i;}}if
 (ay<0)return F(1e20,0,-1);if(aJ>=ac)return F(aJ,0,-1);vec3 q0=L(ay,p);J ap=al(q0,ay);ap.d*=u[ay].ai;if(W>=0){if(V<ac){vec3 q1=L(W,p);J h=al(
 q1,W);h.d*=u[W].ai;ap=cf(ap,h);}else if(V<ap.d){ap=F(V,0,-1);}}return ap;}float D(vec3 p,int l){vec3 q=L(l,p);return al(q,l).d*u[l].ai;}bool
  ct(vec3 ro,vec3 rd,out vec3 ao,out J X,out float t){t=0.;X=F(1e20,0,-1);for(int i=0;i<ci;++i){ao=ro+rd*t;X=cs(ao);float d=abs(X.d);if(d<aq)
  {if(X.au!=0)return true;t+=aq*2.;continue;}t+=max(d*.95,aq);if(t>bx)break;}return false;}vec3 aW(vec3 p,int l){const float e=.0008;vec3 n=
  vec3(1.,-1.,-1.)*D(p+vec3(1.,-1.,-1.)*e,l)+vec3(-1.,-1.,1.)*D(p+vec3(-1.,-1.,1.)*e,l)+vec3(-1.,1.,-1.)*D(p+vec3(-1.,1.,-1.)*e,l)+vec3(1.,
   1.,1.)*D(p+vec3(1.,1.,1.)*e,l);return normalize(n);}vec3 M(){return vec3(0.,.655,0.);}float am(float d2,float be){float x=d2/max(be*be,
   1e-8);float a=1./(1.+x);return a*a;}vec3 aR(vec3 ro,vec3 rd){vec3 dk=vec3(0.);for(int i=0;i<ax;++i){A b=u[i];if(b.av<.5||b.aj<=.001)
   continue;vec3 cO=bO(i,M());vec3 v=cO-ro;float z=dot(v,rd);if(z<=0.||z>=bx)continue;vec3 cS=v-rd*z;float d2=dot(cS,cS);float s=b.ai;float
    dc=am(d2,.06*s);float dd=am(d2,.18*s);float de=am(d2,.38*s);float ck=1./(1.+.035*z*z);dk+=I*b.aj*ck*(aU*dc+aV*dd+at*de);}return dk;}
    vec3 bq(int l,vec3 p){A b=u[l];if(b.aj<=.001)return vec3(0.);vec3 q=L(l,p);vec3 d=(q-M())/vec3(.16,.1,.07);float d2=dot(d,d);float bh=
     1./(1.+2.5*d2);bh*=bh;return I*(b.aj*aF*bh);}vec3 aH(int l,vec3 ao,vec3 n,vec3 rd){A b=u[l];if(b.aj<=.001)return vec3(0.);vec3 q=L(l,
     ao);vec3 d=(q-M())/vec3(.22,.16,.12);float d2=dot(d,d);float bh=1./(1.+1.8*d2);bh*=bh;float ds=pow(1.-max(dot(-rd,n),0.),3.);return
      I*(b.aj*aF*bh*(.35+.65*ds));}vec3 aI(int au){if(au==1)return vec3(.58,.68,.78);if(au==2)return vec3(.55);if(au==3)return vec3(.035)
      ;if(au==4)return vec3(.62,.7,.76);if(au==5)return vec3(.1);if(au==6)return vec3(1.,.38,.045);return vec3(1.,0.,1.);}vec3 cl(vec3 d
       ){float x=d.x,y=d.y,z=d.z;vec3 c=vec3(0.);c+=vec3(.62,.72,.92)*.282095;c+=vec3(.18,.22,.3)*(.488603*y);c+=vec3(-.02,-.03,-.05)*(
        .488603*z);c+=vec3(-.08,-.1,-.14)*(.488603*x);c+=vec3(.01,.02,.03)*(1.092548*x*y);c+=vec3(.03,.04,.06)*(1.092548*y*z);c+=vec3(-
        .1,-.13,-.18)*(.315392*(3.*z*z-1.));c+=vec3(.02,.03,.04)*(1.092548*x*z);c+=vec3(.01,.01,.02)*(.546274*(x*x-y*y));return.7*max(
         c,vec3(0.));}vec3 cd(vec3 d,out vec2 uv){vec3 a=abs(d);if(a.x>=a.y&&a.x>=a.z){if(d.x>0.){uv=vec2(-d.z,d.y)/a.x;return vec3(
          1.,0.,0.);}else{uv=vec2(d.z,d.y)/a.x;return vec3(-1.,0.,0.);}}if(a.y>=a.z){if(d.y>0.){uv=vec2(d.x,-d.z)/a.y;return vec3(0.,
           1.,0.);}else{uv=vec2(d.x,d.z)/a.y;return vec3(0.,-1.,0.);}}if(d.z>0.){uv=vec2(d.x,d.y)/a.z;return vec3(0.,0.,1.);}uv=vec2
            (-d.x,d.y)/a.z;return vec3(0.,0.,-1.);}vec3 bv(vec3 rd){vec2 uv;vec3 cA=cd(rd,uv);uv=uv*.5+.5;const vec2 cm=vec2(14.,4.
            )+floor(9*cI(2.5*int(j*5.)+cA.xy*27.));vec2 du=floor(uv*cm);vec2 f=fract(uv*cm);vec3 bs=vec3(.02);float dw=min(min(f.x
             ,1.-f.x),min(f.y,1.-f.y));float eh=1.-smoothstep(.015,.08,dw);float h=R(2.5*int(j*5.)+du+cA.xy*37.+cA.zz*71.);if(h>
              .75)bs+=vec3(1.,1.2,1.25);return bs;}float ae(vec3 p){p=fract(p*.1031);p+=dot(p,p.yzx+33.33);return fract((p.x+p.y
               )*p.z);}float noise3(vec3 p){vec3 i=floor(p);vec3 f=fract(p);f=f*f*(3.-2.*f);float dx=ae(i+vec3(0,0,0));float dy
                 =ae(i+vec3(1,0,0));float dz=ae(i+vec3(0,1,0));float dA=ae(i+vec3(1,1,0));float dB=ae(i+vec3(0,0,1));float dC=
                  ae(i+vec3(1,0,1));float dD=ae(i+vec3(0,1,1));float dE=ae(i+vec3(1,1,1));float dR=mix(dx,dy,f.x);float dS=
                   mix(dz,dA,f.x);float dT=mix(dB,dC,f.x);float dU=mix(dD,dE,f.x);float y0=mix(dR,dS,f.y);float y1=mix(dT,
                     dU,f.y);return mix(y0,y1,f.z);}float cT(vec3 p){float v=0.;float a=.55;for(int i=0;i<4;++i){v+=a*
                      noise3(p);p=p*2.03+vec3(17.1,9.2,13.7);a*=.5;}return v;}vec3 cu(vec3 rd){vec3 p=rd*1.5;float n=cT(
                        p+vec3(0.,fGlobalTime*.05,0.));float n2=cT(p*1.7+vec3(5.2,1.3,7.1));float cP=smoothstep(.42,.72
                          ,n);float cQ=.2+.4*n2;vec3 dF=vec3(.015,.025,.055);vec3 df=vec3(.4,.62,1.);return mix(dF,df
                            ,cP*cQ);}vec3 aN(vec3 rd){if(mod(j,2.)<uSkyThreshold){return bv(rd);}else{vec3 co=
                              normalize(vec3(.7,.9,.4));vec3 cX=cu(rd);float dV=pow(max(dot(rd,co),0.),512.);
                              float cF=pow(max(dot(rd,co),0.),32.);cX+=vec3(6.,5.4,4.8)*dV;cX+=vec3(.8,.7,.5)*cF;
                                return cX;}}vec3 dg(vec3 ro,vec3 rd,vec3 ao,J X){vec3 n=aW(ao,X.l);vec3 bw=aI(X
                                  .au);A b=u[X.l];vec3 bB=vec3(0.);if(X.au==6)bB=b.aj*vec3(10.,3.2,.65);vec3
                                   cU=normalize(vec3(.7,.9,.4));float dG=max(dot(n,cU),0.);vec3 h=normalize
                                     (cU-rd);float bT=pow(max(dot(n,h),0.),64.);vec3 aw=.05*bw*cl(n);vec3
                                       az=.95*dG*bw;vec3 K=vec3(0.);vec3 P=bq(X.l,ao);if(X.au==2){K=vec3
                                         (.8)*bT*.8;K+=.05*P;az+=.1*bw*P;}else if(X.au==4){az*=.3;aw*=
                                           .35;K=vec3(.9)*bT*.7;aw+=.2*bw*P;az+=.45*bw*P;K+=.06*P;}
                                            else if(X.au==5){K=vec3(.35)*bT*.25;aw+=.08*P;az+=.2*
                                              bw*P;K+=.04*P;}else if(X.au==6){az*=.2;aw*=.1;K=
                                                vec3(1.,.8,.4)*bT*.2;}else{K=vec3(.35)*bT*.25;}
                                                  return aw+az+K+bB;}mat3 aX(vec3 ro,vec3 ta,
                                                    float cV){vec3 ww=normalize(ta-ro);vec3
                                                uu=normalize(cross(ww,vec3(sin(cV),cos(cV),0.)
                                               ));vec3 vv=normalize(cross(uu,ww));return mat3(uu
                                               ,vv,ww);}void main(void){vec2 Z=gl_FragCoord.xy;
                                               vec2 dW=vec2(Z.x/v2Resolution.x,Z.y/v2Resolution.
                                                y);vec2 uv=dW-.5;uv/=vec2(v2Resolution.y/
                                                 v2Resolution.x,1.);uv*=2.;vec3 dm=bH(Z);aC(
                                                   fGlobalTime);j=fGlobalTime+(dm.x-.5)*max(
                                                   aT,0.);Q=mix(fGlobalTime,j,clamp(af,0.,
                                                    1.));cc();float bk=mix(fGlobalTime,j,
                                                   clamp(ad,0.,1.));vec3 ro;vec3 ta;mat3 cq;
                                                  if(uCameraMode<.5){ro=uCameraPos;ta=
                                                uCameraTarget;cq=aX(ro,ta,0.);}else{float an=
                                               .9*bk;float bn=.2*bk;float cn=.3*bk;float aG=2.;
                                               ro=vec3(aG*sin(an)*cos(bn),aG*sin(an)*sin(bn),aG*
                                               cos(an));ta=.9*vec3(.9*sin(cn),.9*cos(cn),.8*sin(
                                                .3*cn));cq=aX(ro,ta,0.)*cD(.4*j+.8*smoothstep(
                                                 0.,1.,noise3(vec3(j,0.,0.))));}vec3 rd=
                                                  normalize(cq*vec3(uv,1.));if(ak>1e-6){vec2
                                                   cW=ak*(dm.yz*2.-1.);vec3 cv=cq[0];vec3
                                                    dh=cq[1];vec3 cR=cq[2];float tf=aS/max(
                                                   dot(rd,cR),1e-4);vec3 cw=ro+rd*tf;ro+=cv
                                                  *cW.x+dh*cW.y;rd=normalize(cw-ro);}vec3 bs
                                                 =aR(ro,rd);vec3 B=vec3(1.);U bi[N];int sp=0;
                                                vec3 bD=ro;vec3 Y=rd;bool aB=false;for(int cp=0
                                               ;cp<bG;++cp){vec3 ao;J X;float t;if(!ct(bD,Y,ao,X
                                               ,t)){bs+=B*aN(Y);aB=true;break;}B*=exp(-bp(bi,sp)
                                               *t);if(X.au!=1){bs+=B*dg(bD,Y,ao,X);aB=true;
                                                break;}vec3 n=aW(ao,X.l);bool aO=dot(Y,n)<0.;
                                                  vec3 nn=aO?n:-n;float bR=bW(bi,sp);float bS
                                                   =aO?bm:cE(bi,sp,X.l);float aL=max(dot(-Y,
                                                    nn),0.);float Fr=aY(aL,bR,bS);vec3 bU=
                                                   reflect(Y,nn);vec3 bl=refract(Y,nn,bR/bS
                                                   );if(dot(bl,bl)<1e-8){bD=ao+nn*(aq*5.);Y=
                                                 bU;continue;}bs+=B*Fr*aN(bU);bs+=B*(1.-Fr)*
                                                    aH(X.l,ao,nn,Y);B*=(1.-Fr);if(max(B.r,
                                                     max(B.g,B.b))<.001){aB=true;break;}if
                                                      (aO){bX(bi,sp,bV(bm,vec3(.01,.004,
                                                      .001),X.l));}else{cj(bi,sp,X.l);}
                                                       bD=ao-nn*(aq*4.);Y=bl;}if(!aB)bs
                                                       +=B*aN(Y);float r2=dot(uv*.78,uv
                                                        *.78);float dn=clamp(1.-bo*r2,
                                                        0.,1.);bs*=dn*dn;out_color=
                                                         vec4(max(bs,vec3(0.)),1.);}
