 vec3 ConeTracingLight(vec3 pos, float density, float heightF, vec3 lightRay, vec3 viewRay, vec3 weatherData, float mipmapLev)
 {
 	vec3 lightSamplePos;
+	vec3 sColor = clamp(sunColor * 3.0f, 0.0f, 1.0f);
 	float lightRayDensity = 0.0f;
-			
+	
 	for (int j = 0; j < 4; j++)
 	{
 		vec3 bias = randomV[j];
 		bias = normalize(bias);
-		lightSamplePos = pos + lightRay * pow(2.0f, (j + 0)) + bias * (j+1) * 2.0f;
-		float heightF = GetHeightGradient(lightSamplePos);
-
-		lightRayDensity += SampleCloudDensity(lightSamplePos, weatherData, heightF, mipmapLev + 1.0f, false);//lightRayDensity >= 0.3f);
+		lightSamplePos = pos + lightRay * 128.0f + bias * (j+1) * 2.0f;
+		float h = GetHeightGradient(lightSamplePos);
+
+		lightRayDensity += SampleCloudDensity(lightSamplePos, weatherData, h, mipmapLev + 4.0f, false);
 
 		if (lightRayDensity >= 1.0f) break;
 	}
 
-	float pb0 = PowderBeers(lightRayDensity + density, weatherData.g);
+	float pb0 = PowderBeers(lightRayDensity, weatherData.g);
 	float pb1 = PowderBeers(density, weatherData.g);
 	float hg = HG(-viewRay, normalize(-wsSunPos));
-	vec3 sampleColor = sunColor * pb0 * pb0 * hg * 3.0f;
-	
-	//ambient
-	vec3 ambientColor = sunColor * heightF;
-	ambientColor = ambientColor * pb1 * pb1;
-	sampleColor += ambientColor * 2.0f;
+	vec3 sampleColor = sColor * pb0 * pb1 * hg * 6.0f;
 	
 	return sampleColor;
 }

		weatherData.g = mix(3.0f, 5.0f, weatherData.g); 
		weatherData.g *= Precipitation;

		//weatherData.r = 0.1f;
		weatherData.g = 4.0f;
		weatherData.b = 1.0f;
		float mipmapLev = 0.0f;
		
		if (densityTest > 0.0f)
		{
			float sampleDensity = SampleCloudDensity(samplePos, weatherData, heightF, mipmapLev, false);


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)
{
