void main() { //Resolution for scaling vec3 r = vec3(u_resolution, 1), //Camera Position (approximately vec3(8,3,4.5)) p = 13.5/r, //Absolute position a; //Iterate 30 times and set color for(;r.z++<4e1;) //Raymarch with box and sphere SDF p += vec3(gl_FragCoord.xy*2.-r.xy,-r)/r.x * (1.-max(a=abs(p),max(a.y,-p.z)).x); //Top light gl_FragColor = vec4((.01/length(max(a.xz/.2-p.y,.01))+vec3(.2,.2,.3))*(cos(u_time/.1+cos(u_time*17.))+1.)/dot(p,p),9); } //created by firstuser at shadergrounds.com