Merge branch 'zesterer/small-fixes' into 'master'

Stopped stars appearing in the day, better slerping

See merge request veloren/veloren!406
This commit is contained in:
Joshua Barretto 2019-08-04 15:00:15 +00:00
commit fcc54f0476
2 changed files with 8 additions and 4 deletions

View File

@ -120,7 +120,11 @@ impl<'a> System<'a> for Sys {
&& (ori.0.normalized() - Vec3::from(ori_dir).normalized()).magnitude_squared()
> 0.001
{
ori.0 = vek::ops::Slerp::slerp(ori.0, ori_dir.into(), 15.0 * dt.0);
ori.0 = vek::ops::Slerp::slerp(
ori.0,
ori_dir.into(),
if a.on_ground { 12.0 } else { 2.0 } * dt.0,
);
}
}

View File

@ -96,13 +96,13 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
vec3 sky_top = mix(
mix(
SKY_DUSK_TOP,
SKY_NIGHT_TOP,
SKY_DUSK_TOP + star,
SKY_NIGHT_TOP + star,
max(sun_dir.z, 0)
),
SKY_DAY_TOP,
max(-sun_dir.z, 0)
) + star;
);
vec3 sky_mid = mix(
mix(