 	float specular = 0.5*grounddiffuse + 0.5*exp(-1. + dot(sun, reflect(vec3(0., 0., -1.), normal)));
 
 
-	vec4 ground = vec4(mix(grounddiffuse * vec3(0.22, 0.37, 0.05), specular * vec3(0.05, 0.25, 0.75), color), 1.0);
-	vec4 cloudcolor = vec4(diffuse * vec3(cloud), 1.0);
+	vec4 ground = vec4(mix(grounddiffuse * u_ground_color, specular * u_sea_color, color), 1.0);
+	vec4 cloudcolor = vec4(u_cloud_brightness * diffuse * vec3(cloud), 1.0);
 	gl_FragColor = mix(ground, cloudcolor, smoothstep(u_cloud_limit-0.1, u_cloud_limit+0.5, cloud));
+	if (u_explosion_limit != 1.0) {
+		gl_FragColor += clamp((rng-u_explosion_limit) / (1.0 - u_explosion_limit), 0., 1.) * vec4(0.9, 0.5, 0.1, 0.0);
+	}
 }
 

uniform sampler2D u_texture;
uniform sampler2D u_textureClouds;
uniform float u_sun_offset;

const float u_mercator_fov = 2.5;
const float u_cloud_limit = 0.4;


vec2 to_tex(float lat, float lon) {

	pos = 1.2 * pos;
	if (length(pos) > 1.2)
		discard;
	vec3 sun = vec3(0., cos(-u_rotation + u_sun_offset), sin(-u_rotation + u_sun_offset));
	if (length(pos) > 1.0) {
		float len = length(pos);
		pos = pos / len;
		float bright = clamp(dot(sun, vec3(pos, 0.0)), 0.1., 0.8);
		gl_FragColor = mix(bright * vec4(0.4, 0.9, 1.0, 0.9), vec4(0.), (len - 1.0) / 0.2);
		return;
	}
	vec3 normal = vec3(pos, sqrt(1.-dot(pos, pos)));
