 
 #define FOUR_PI 12.566370614359173
 
-#define INNER_INTEGRAL_DIVS 10
-#define OUTER_INTEGRAL_DIVS 10
+#define INNER_INTEGRAL_DIVS 5
+#define OUTER_INTEGRAL_DIVS 5
 
-#define SCATTER_CONST_RAYLEIGH 1.0
+#define SCATTER_CONST_RAYLEIGH 0.02
 
 #define ATMOSPHERE_THICKNESS 0.1
 #define SCALE_HEIGHT 0.25
 
-#define SUN_BRIGHTNESS 1.0
+#define SUN_BRIGHTNESS 10.0
 
 uniform vec3 u_CamPos;
 uniform vec3 u_LightDirection; //must be normalized!

    vec3 differential = dist / float(INNER_INTEGRAL_DIVS);
    vec3 samplePoint = pointA + (differential * 0.5);
    for (int i = 0; i < INNER_INTEGRAL_DIVS; i++) {
//        outerIntegral += (density(samplePoint) *
//            exp(-outScatter_rayleigh(samplePoint, pointC, wavelength) -
//                outScatter_rayleigh(samplePoint, u_CamPos, wavelength)));
        outerIntegral += 0.001;
        samplePoint += differential;
    }
    outerIntegral *= length(dist);
    outerIntegral = length(dist) * 0.1;
//    float theta; TODO
    return SUN_BRIGHTNESS * scatterCoef_rayleigh(wavelength)/* * phase_rayleigh(theta)*/ * outerIntegral;
}

    }
    vec3 lightRayEntryPoint = intersectRaySphere(surfacePoint, u_LightDirection,
        vec3(0.0) /*TODO*/, ATMOSPHERE_CEILING).far;
    return inScatter_rayleigh(wavelength, camRayIntersection.near, surfacePoint, lightRayEntryPoint) +
        (reflectedLight * exp(-outScatter_rayleigh(camRayIntersection.near, surfacePoint, wavelength)));
}
