Tweaked sun radius

This commit is contained in:
Michaël Lemaire 2015-12-29 22:34:05 +01:00
parent 391f1a7f41
commit 06cd5e31fd
3 changed files with 3 additions and 3 deletions

View file

@ -106,7 +106,7 @@ void AtmosphereDefinition::applyPreset(AtmospherePreset preset, RandomGenerator
sun_color.g = 0.95;
sun_color.b = 0.9;
sun_color.a = 1.0;
sun_radius->setValue(0.5);
sun_radius->setValue(0.8);
moon_radius = 1.0;
moon_theta = 0.3;
moon_phi = 0.5;

View file

@ -90,7 +90,7 @@ 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) */
float d = _limit(r, mu);
radius *= (1.0 + 25.0 * d / Rt); /* Inflating due to lens effect near horizon */
radius *= (1.0 + 15.0 * d / Rt); /* Inflating due to lens effect near horizon */
float isun = step(cos(radius * M_PI / 180.0), dot(v, s)) * ISun; /* Lsun */
transmittance.r *= isun;
transmittance.g *= isun;

View file

@ -866,7 +866,7 @@ 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 + 25.0 * d / Rt); /* Inflating due to lens effect near horizon */
radius *= (1.0 + 15.0 * d / Rt); /* Inflating due to lens effect near horizon */
double isun = step(cos(radius * M_PI / 180.0), v.dotProduct(s)) * ISun; /* Lsun */
transmittance.r *= isun;
transmittance.g *= isun;