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

    // After removing the initial path from camera pos to top of atmosphere or the
    // current camera position if inside atmosphere, t > 0
    if (t > 0.0) {
      // Calculate the zenith angles for x0 and v, s:
      vec3  x0     = x + t * v;
      float r0     = length(x0);

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

    // E[L*] at x0
    vec3 irradianceReflected = irradiance(irradianceTexture, r0, muSun);
    
    // Adding clouds texture
    //vec4 clouds = vec4(0.85)*texture(cloudsTexture, vs_st);

