Lowered horizon

This commit is contained in:
Joshua Barretto 2019-06-19 01:15:43 +01:00
parent 5e96e29ff1
commit 04893338cd

View File

@ -73,6 +73,7 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
float brightess = (sky_brightness + PERSISTENT_AMBIANCE);
vec3 sky_top = SKY_TOP * brightess;
vec3 sky_middle = SKY_MIDDLE * brightess;
if (objects) {
// Clouds
// vec3 p = vec3(pos2d + time_of_day * 0.0002, time_of_day * 0.00003);
@ -81,13 +82,14 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
if (objects) {
sky_top += sun_light;
sky_middle += sun_light;
}
vec3 sky_color = mix(
mix(
SKY_MIDDLE * brightess,
sky_middle,
sky_top,
clamp(dir.z * 3.0, 0, 1)
clamp(dir.z * 1.0, 0, 1)
),
SKY_BOTTOM * brightess,
clamp(-dir.z * 3.0, 0, 1)