 uniform mat4 proMat;
 
 uniform vec3 cloudBias;
+uniform float Coverage;
+uniform float Precipitation = 1.0f;
 
 const float PLANET_RADIUS = 6500000.0f;
 const vec3 PLANET_CENTER = vec3(0.0f, -PLANET_RADIUS, 0.0f);
 const float MIN_CLOUD_ALTITUDE = 1500.0f;
-const float MAX_CLOUD_ALTITUDE = 4000.0f;
+const float MAX_CLOUD_ALTITUDE = 6000.0f;
 const float CLOUD_HEIGHT = MAX_CLOUD_ALTITUDE - MIN_CLOUD_ALTITUDE;
 const float CLOUD_HEIGHT_INV = 1.0f / CLOUD_HEIGHT;
 

	vec4 sf = StratusFactor * (1.0f - clamp(weather.b * 2.0f, 0.0f, 1.0f));
	vec4 cf = CumulusFactor * (1.0f - abs(weather.b - 0.5f) * 2.0f);
	vec4 cbf = CumulonumbisFactor * clamp(weather.b - 0.5f, 0.0f, 1.0f) * 2.0f;
	float typeGrad = GetCloudTypeGradient(heightF, sf + cf + cbf);	
	lfFbm *= typeGrad;

	float coverage = weather.r * min((1.0f - heightF) + 0.2, 1.0f);
	lfFbm = Remap(lfFbm, coverage, 1.0f, 0.0f, 1.0f);
	lfFbm *= coverage;

	if (!useCheapWay)
	{
		//do curl
		//vec4 curlNoise = texture2D(curlMap, uvw.xy);
		//uvw.xy += curlNoise.xy * (1.0f - heightGrad) * 1.0f;

		noise = textureLod(worleyMap, uvw * 0.1f, mipmap);
		float hfFbm = noise.r * 0.625f + noise.g * 0.25f + noise.b * 0.125f;
		hfFbm = mix(hfFbm, 1.0f - hfFbm, clamp(heightF * 10.0f, 0.0f, 1.0f));
		lfFbm = Remap(lfFbm, hfFbm * 0.2f, 1.0f, 0.0f, 1.0f);
	}

	return clamp(lfFbm, 0.0f, 1.0f);


const vec4 StratusFactor = vec4(0.0f, 0.1f, 0.2f, 0.3f);
const vec4 CumulusFactor =vec4(0.05f, 0.25f, 0.45f, 0.65f);
const vec4 CumulonumbisFactor = vec4(0.0f, 0.05f, 0.95f, 1.0f);

float Remap(float value, float oldMin, float oldMax, float newMin, float newMax)
{
