     // we will subtract the attenuated scattering light from that path in the
     // current path.
     vec4 inscatterRadiance = max(texture4D(inscatterTexture, r, mu, muSun, nu), 0.0);
-<<<<<<< HEAD
-    
-=======
       
->>>>>>> master
     // After removing the initial path from camera pos to top of atmosphere (for an
     // observer in the space) we test if the light ray is hitting the atmosphere
     vec3  x0     = fragPosObj;

        double offset      = 0.0;   // in Km
        double maxLength   = 0.0;   // in Km  

<<<<<<< HEAD
        for (int i = 0; i < nSamples; i++) {
            // Color from G-Buffer
            //vec4 color = texelFetch(mainColorTexture, fragCoords, i);
            vec4 color = colorArray[i];
=======
        bool  intersectATM = false;

        intersectATM = dAtmosphereIntersection(planetPositionObjectCoords.xyz, ray,  
                                                Rt - (ATM_EPSILON * 0.001), insideATM, offset, maxLength);
>>>>>>> master
            
        if ( intersectATM ) {
            // Now we check is if the atmosphere is occluded, i.e., if the distance to the pixel 

    if (abs(mu - muHorizon) < INTERPOLATION_EPS) {
        // We want an interpolation value close to 1/2, so the
        // contribution of each radiance value is almost the same
        // or it has a heavy weight if from above or below horizon
        float interpolationValue = ((mu - muHorizon) + INTERPOLATION_EPS) / (2.0f * INTERPOLATION_EPS);

        //float t2 = t * t;
