diff --git a/src/rendering/atmosphere/atm_bruneton.c b/src/rendering/atmosphere/atm_bruneton.c index 64f93ab..1549948 100644 --- a/src/rendering/atmosphere/atm_bruneton.c +++ b/src/rendering/atmosphere/atm_bruneton.c @@ -922,6 +922,8 @@ static Color _getInscatterColor(Vector3* _x, double* _t, Vector3 v, Vector3 s, d static Color _sunColor(Vector3 v, Vector3 s, double r, double mu, double radius) { Color transmittance = r <= Rt ? _transmittanceWithShadow(r, mu) : COLOR_WHITE; /* T(x,xo) */ + double d = _limit(r, mu); + radius *= (1.0 + 10.0 * d / Rt); /* Inflating due to lens effect near horizon */ double isun = step(cos(radius * M_PI / 180.0), v3Dot(v, s)) * ISun; /* Lsun */ transmittance.r *= isun; transmittance.g *= isun;