       //renderTarget = vec4(HDR(groundColor), 1.0); 
       //renderTarget = vec4(groundColor, 1.0); 
       //renderTarget = vec4(HDR(sunColor), 1.0); 
+      //renderTarget = vec4(HDR(sunColor), 1.0); 
       renderTarget = vec4(HDR(inscatterColor + groundColor + inscatterColor), 1.0);       
       
     } else {

    float muSun           = dot(n, s);
    // Is direct Sun light arriving at x0? If not, there is no direct light from Sun (shadowed)
    vec3  transmittanceL0 = muSun < -sqrt(1.0f - ((Rg * Rg) / (r0 * r0))) ? vec3(0.0f) : transmittanceLUT(r0, muSun);
    //return transmittanceL0;
    // E[L*] at x0
    vec3 irradianceReflected = irradiance(irradianceTexture, r0, muSun);
    return irradianceReflected;
    // Adding clouds texture
    //vec4 clouds = vec4(0.85)*texture(cloudsTexture, vs_st);


  if (t > 0.0f) {
    return vec3(0.0f);
  } else {
    vec3 transmittance = (r <= Rt) ? 
          (mu < -sqrt(1.0f - (Rg/r)/(Rg/r)) ? vec3(0.0f) : transmittanceLUT(r, mu)) :
          vec3(1.0f);
    float sunColor = step(cos(M_PI / 180.0), dot(v, s)) * sunRadiance; 

    return transmittance * sunColor;
    }
}

/*
