Fixed day horizon bug

This commit is contained in:
Joshua Barretto 2019-06-29 15:18:13 +01:00
parent 905b3d6f45
commit b5648f736d

View File

@ -83,8 +83,8 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
// Sky color // Sky color
const vec3 SKY_DAY_TOP = vec3(0.2, 0.3, 0.9); const vec3 SKY_DAY_TOP = vec3(0.2, 0.3, 0.9);
const vec3 SKY_DAY_MID = vec3(0.1, 0.15, 0.7); const vec3 SKY_DAY_MID = vec3(0.15, 0.2, 0.8);
const vec3 SKY_DAY_BOT = vec3(0.025, 0.15, 0.35); const vec3 SKY_DAY_BOT = vec3(0.02, 0.1, 0.3);
const vec3 SKY_DUSK_TOP = vec3(0.1, 0.15, 0.3); const vec3 SKY_DUSK_TOP = vec3(0.1, 0.15, 0.3);
const vec3 SKY_DUSK_MID = vec3(0.9, 0.3, 0.2); const vec3 SKY_DUSK_MID = vec3(0.9, 0.3, 0.2);
@ -122,7 +122,7 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
SKY_NIGHT_BOT, SKY_NIGHT_BOT,
clamp(sun_dir.z, 0, 1) clamp(sun_dir.z, 0, 1)
), ),
SKY_DAY_MID, SKY_DAY_BOT,
clamp(-sun_dir.z, 0, 1) clamp(-sun_dir.z, 0, 1)
); );