diff --git a/shader.glsl b/shader.glsl index 3fc752c..bda7fe9 100644 --- a/shader.glsl +++ b/shader.glsl @@ -251,9 +251,9 @@ float rayMarch(vec3 ro, vec3 rd, int a) { // Raymarching for (int i = 0; i < 100; i++) { d = map(ro + rd * t, 0).x; // Get distance to objects + if (a==0) glow += 0.05/(1.0 + 10.*pow(map(ro + rd * t, 0).z, .5)); t += d; // "march" the ray - if (a==0) glow += 0.03/(1.0 + 2.*pow(map(ro + rd * t, 0).z, 6.3)); - if (d < 1e-4 || t > 400.) break; + if (d < 1e-4 || t > 600.) break; } return t; } @@ -412,11 +412,11 @@ vec3 sceneGate(vec2 uv) if(mat==4.) col *= vec3(0.0, 0.08, 0.11) + addSpecular(n,rd,0.3,0.7); if(mat ==5.) - col = chevronColor * pow(cl(1. -dot(n, -rd), 0., 1.), .4); + col = chevronColor*0.4;// * pow(cl(1. -dot(n, -rd), 0., 1.), .3); if(mat == 6.) col *= vec3(0.01, 0.04, 0.06) + addSpecular(n,rd,.1, 2.5); } - col += glow * chevronColor; + col += glow * chevronColor*3.0; return postProcess(colorFlashesAnim(applyFog(col, d, rd, vec3(0., -.1, -1.), .01))); } diff --git a/shader_minified.h b/shader_minified.h index e58012d..7e77dcf 100644 --- a/shader_minified.h +++ b/shader_minified.h @@ -64,7 +64,7 @@ const char *__temp_cleaned_shader_glsl = "return max(m.z-y.y,max(m.x*.866025+v.y*.5,-v.y)-y.x*.5);" "}" "float z=0.;" - "vec3 d=vec3(1.5,1.4,0),i=vec3(-1.5,1.4,0),a=vec3(.49,.18,.49),p=vec3(.93,.37,.16),c=vec3(.29,.28,.33),l=vec3(.82,.5,.9),r=vec3(.79,.66,.43),k=vec3(.46,0,.9),C=vec3(0,.1,.3),F=vec3(.11,.16,.18);" + "vec3 d=vec3(1.5,1.4,0),i=vec3(-1.5,1.4,0),a=vec3(.49,.18,.49),p=vec3(.93,.37,.16),c=vec3(.29,.28,.33),l=vec3(.82,.5,.9),r=vec3(.79,.66,.43),C=vec3(.46,0,.9),F=vec3(0,.1,.3),K=vec3(.11,.16,.18);" "float s(vec3 v)" "{" "return min((y-v.y)*v.z,v.x*m);" @@ -106,17 +106,17 @@ const char *__temp_cleaned_shader_glsl = "c=min(c,l);" "l=n(abs(length(v.xy)-1.75)-.08,abs(v.z-.1)-.04,.005);" "c=n(max(-l,c),abs(v.z)-.1,.02);" - "vec3 k=x(v),F=k;" + "vec3 C=x(v),K=C;" "r=m/16.;" - "F.xy=n(floor(atan(k.y,k.x)/r+.5)*r)*F.xy;" - "l=n(F.xyz-vec3(1.75,0,0),vec3(.04,.14,.05))-.02;" + "K.xy=n(floor(atan(C.y,C.x)/r+.5)*r)*K.xy;" + "l=n(K.xyz-vec3(1.75,0,0),vec3(.04,.14,.05))-.02;" "c=min(c,l);" "if(c==l)" "z=6.;" "l=1e3;" - "float C=1.5,e=0.,b,g=4.,E=.6,D=.2;" + "float F=1.5,e=0.,b,g=4.,E=.6,D=.2;" "for(int i=0;i<4;i++)" - "p=n(vec3(v.x,v.y+C+.05,v.z),vec3(2,.2,C))-.05,l=min(l,p),C+=.2;" + "p=n(vec3(v.x,v.y+F+.05,v.z),vec3(2,.2,F))-.05,l=min(l,p),F+=.2;" "l+=x(v.xz*50.+2e2,.01,0);" "c=min(c,l);" "if(c==l)" @@ -170,10 +170,10 @@ const char *__temp_cleaned_shader_glsl = "for(int c=0;c<100;c++)" "{" "m=x(v+y*i,0).x;" - "i+=m;" "if(f==0)" - "z+=.03/(1.+2.*pow(x(v+y*i,0).z,6.3));" - "if(m<1e-4||i>4e2)" + "z+=.05/(1.+10.*pow(x(v+y*i,0).z,.5));" + "i+=m;" + "if(m<1e-4||i>6e2)" "break;" "}" "return i;" @@ -199,7 +199,7 @@ const char *__temp_cleaned_shader_glsl = "}" "vec3 s(vec3 v,vec3 y,vec3 f,vec3 m)" "{" - "return C+pow(dot(y,f)*.4+.6,60.)*F*.3+vec3(n(y,f,m,60.))*.2;" + "return F+pow(dot(y,f)*.4+.6,60.)*K*.3+vec3(n(y,f,m,60.))*.2;" "}" "vec3 t(vec2 v,vec3 y,vec3 i,float m)" "{" @@ -242,7 +242,7 @@ const char *__temp_cleaned_shader_glsl = "if(y>10.75)" "{" "float f=smoothstep(-1.,.8,sin(s(vec3(.8,10.75,8))*2.));" - "v=mix(v,f*1.4*k,f*.76);" + "v=mix(v,f*1.4*C,f*.76);" "}" "return v;" "}" @@ -253,10 +253,10 @@ const char *__temp_cleaned_shader_glsl = "vec3 e(vec2 v)" "{" "vec3 m=f(),i=t(v,m,n(),f((28.-y)*-2.,2.,25.)),d=vec3(0);" - "float F=t(m,i,0),g=0.;" - "if(F<2e2)" + "float K=t(m,i,0),g=0.;" + "if(K<2e2)" "{" - "vec3 v=m+i*F,y=w(v);" + "vec3 v=m+i*K,y=w(v);" "g=x(v,0).y;" "d+=l*f(v,vec3(10,15,25),.2,y);" "d+=r*f(v,vec3(4,2,-15),1.,y);" @@ -272,12 +272,12 @@ const char *__temp_cleaned_shader_glsl = "if(g==4.)" "d*=vec3(0,.08,.11)+h(y,i,.3,.7);" "if(g==5.)" - "d=k*pow(f(1.-dot(y,-i),0.,1.),.4);" + "d=C*.4;" "if(g==6.)" "d*=vec3(.01,.04,.06)+h(y,i,.1,2.5);" "}" - "d+=z*k;" - "return smoothstep(0.,1.,pow(h(mix(d,mix(a,p,pow(max(dot(i,vec3(0,-.1,-1)),0.),8.)),1.-exp(-F*.01)))*vec3(.9,.8,.7),vec3(.45)))+1.2-vec3(f((32.-y)*.35,0.,1.2));" + "d+=z*C*3.;" + "return smoothstep(0.,1.,pow(h(mix(d,mix(a,p,pow(max(dot(i,vec3(0,-.1,-1)),0.),8.)),1.-exp(-K*.01)))*vec3(.9,.8,.7),vec3(.45)))+1.2-vec3(f((32.-y)*.35,0.,1.2));" "}" "void main()" "{"