Removed sun inflating near horizon

This is only a popular belief and a psychologically
perceived illusion (not optical).
This commit is contained in:
Michaël Lemaire 2016-01-18 19:45:02 +01:00
parent 1e22d778e1
commit 7ded0a6b6f
2 changed files with 0 additions and 4 deletions

View file

@ -90,8 +90,6 @@ vec4 _transmittanceWithShadow(float r, float mu)
vec4 _sunTransmittance(vec3 v, vec3 s, float r, float mu, float radius) vec4 _sunTransmittance(vec3 v, vec3 s, float r, float mu, float radius)
{ {
vec4 transmittance = r <= Rt ? _transmittanceWithShadow(r, mu) : vec4(1.0); /* T(x,xo) */ vec4 transmittance = r <= Rt ? _transmittanceWithShadow(r, mu) : vec4(1.0); /* T(x,xo) */
float d = _limit(r, mu);
radius *= (1.0 + 15.0 * d / Rt); /* Inflating due to lens effect near horizon */
float isun = step(cos(radius), dot(v, s)) * ISun; /* Lsun */ float isun = step(cos(radius), dot(v, s)) * ISun; /* Lsun */
transmittance.r *= isun; transmittance.r *= isun;
transmittance.g *= isun; transmittance.g *= isun;

View file

@ -860,8 +860,6 @@ static Color _getInscatterColor(Vector3 *_x, double *_t, Vector3 v, Vector3 s, d
/* direct sun light for ray x+tv, when sun in direction s (=L0) */ /* direct sun light for ray x+tv, when sun in direction s (=L0) */
static Color _sunColor(Vector3 v, Vector3 s, double r, double mu, double radius) { 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) */ Color transmittance = r <= Rt ? _transmittanceWithShadow(r, mu) : COLOR_WHITE; /* T(x,xo) */
double d = _limit(r, mu);
radius *= (1.0 + 15.0 * d / Rt); /* Inflating due to lens effect near horizon */
double isun = step(cos(radius), v.dotProduct(s)) * ISun; /* Lsun */ double isun = step(cos(radius), v.dotProduct(s)) * ISun; /* Lsun */
transmittance.r *= isun; transmittance.r *= isun;
transmittance.g *= isun; transmittance.g *= isun;