 out vec4 output_color;
 
 vec4 march_params = vec4(0.3, 0.0, 0.7, 0.009);
-vec3 L=normalize(vec3(2.,.5,-1.));
-float l = uniform_array[9].y;
+vec3 light_direction = normalize(vec3(2.0, 0.5, -1.0));
+float destruction = uniform_array[9].y;
 bool w = 1.0 < abs(uniform_array[7].z);
 
 float f(vec3 p)

  }
  h = p - uniform_array[8].xyz;
  a=length(h);
  if(a<l)return c+l-a;
  return c;
}


  n = T(p, d, march_params.w, P, N);
  if(.0<n)
  {
    if(w)
    {
      q = max(dot(light_direction, N), 0.0) * mix(vec3(0.3, 0.6, 0.9), vec3(1), smoothstep(-24.0, 9.0, P.y)) + pow(max(dot(d, reflect(light_direction, N)), 0.0), 7.0) * 0.11;
    }
    else
    {
      e =T(P + light_direction * 0.5, light_direction, march_params.w * 3.0, q, q);
      q = (1.0 - e) * (max(dot(light_direction, N), 0.0) * mix(vec3(0.8, 0.6, 0.4), vec3(1), smoothstep(-24.0, 9.0, P.y)) + pow(max(dot(d, reflect(light_direction, N)), 0.0), 7.0) * 0.11);
    }
    r = P - uniform_array[8];
    e = destruction + 0.5 - length(r);
    if(0<e)q+=vec3((dot(Q(P*.009),normalize(r))*.1)+.1,-.05,-.05)*smoothstep(.0,.5,e);
  }
  vec3 s=mix(vec3(.9,.8,.8),vec3(.8,.8,.9),d.y*111.*.02)*(dot(Q(p*.006+d*.1),d)*smoothstep(-.2,.5,-d.y)*.2+.8);
  if(w)
  {
    n = smoothstep(0.0, 0.4, n);
  }
  output_color = vec4(mix(mix(s, vec3(1), pow(max(dot(d, light_direction), 0.0), 7.0)), q, n), 1.0) - (int(gl_FragCoord.y * 0.5) % 2 + 0.1) * (max(max(smoothstep(0.98, 1.0, uniform_array[7].y), smoothstep(-0.02 * uniform_array[9].x, 0.0, -uniform_array[7].y) * uniform_array[9].x), 0.1) + destruction * 0.02) * dot(c, c);
  r=p;
  e = C(r, d, uniform_array[8], destruction + 0.2);
  if(0.0 < e)
  {
    output_color.xyz -= clamp(1.0 - (dot(r - p, r - p) - dot(P - p, P - p)) * 0.003, 0.0, 1.0) * (1.0 - pow(e / destruction, 5)) * (dot(Q((r - uniform_array[8]) * 0.009), d) * 0.1 + 0.9);
  }
}
