diff --git a/assets/voxygen/shaders/include/sky.glsl b/assets/voxygen/shaders/include/sky.glsl index c53a156493..c3a5ae900f 100644 --- a/assets/voxygen/shaders/include/sky.glsl +++ b/assets/voxygen/shaders/include/sky.glsl @@ -6,11 +6,13 @@ const vec3 SKY_DAY_TOP = vec3(0.1, 0.2, 0.9); const vec3 SKY_DAY_MID = vec3(0.02, 0.08, 0.8); const vec3 SKY_DAY_BOT = vec3(0.02, 0.01, 0.3); const vec3 DAY_LIGHT = vec3(1.2, 1.0, 1.0); +const vec3 SUN_HALO_DAY = vec3(0.35, 0.35, 0.0); const vec3 SKY_DUSK_TOP = vec3(0.06, 0.1, 0.20); const vec3 SKY_DUSK_MID = vec3(0.35, 0.1, 0.15); const vec3 SKY_DUSK_BOT = vec3(0.0, 0.1, 0.13); const vec3 DUSK_LIGHT = vec3(3.0, 1.0, 0.3); +const vec3 SUN_HALO_DUSK = vec3(0.6, 0.1, 0.0); const vec3 SKY_NIGHT_TOP = vec3(0.001, 0.001, 0.0025); const vec3 SKY_NIGHT_MID = vec3(0.001, 0.005, 0.02); @@ -54,7 +56,7 @@ void get_sun_diffuse(vec3 norm, float time_of_day, out vec3 light, out vec3 diff vec3 sun_chroma = sun_color * sun_light; light = sun_chroma + PERSISTENT_AMBIANCE; - diffuse_light = sun_chroma * (dot(-norm, sun_dir) * 0.5 + 0.6) + PERSISTENT_AMBIANCE; + diffuse_light = sun_chroma * (dot(-norm, sun_dir) * 0.5 + 0.5) + PERSISTENT_AMBIANCE; ambient_light = vec3(SUN_AMBIANCE * sun_light); } @@ -137,12 +139,17 @@ vec3 get_sky_color(vec3 dir, float time_of_day, bool with_stars) { max(dir.z, 0) ); + vec3 sun_halo_color = mix( + SUN_HALO_DUSK, + SUN_HALO_DAY, + max(-sun_dir.z, 0) + ); + // Sun - const vec3 SUN_HALO_COLOR = vec3(1.5, 0.65, 0.0) * 0.3; const vec3 SUN_SURF_COLOR = vec3(1.5, 0.9, 0.35) * 200.0; - vec3 sun_halo = pow(max(dot(dir, -sun_dir) + 0.1, 0.0), 8.0) * SUN_HALO_COLOR; + vec3 sun_halo = pow(max(dot(dir, -sun_dir) + 0.1, 0.0), 8.0) * sun_halo_color; vec3 sun_surf = pow(max(dot(dir, -sun_dir) - 0.0045, 0.0), 1000.0) * SUN_SURF_COLOR; vec3 sun_light = (sun_halo + sun_surf) * clamp(dir.z * 10.0, 0, 1); diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 93087eeffa..df5cbe63d7 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -699,7 +699,7 @@ fn handle_lantern(server: &mut Server, entity: EcsEntity, args: String, action: .write_storage::() .get_mut(entity) { - light.strength = s.max(0.1).min(20.0); + light.strength = s.max(0.1).min(10.0); server.clients.notify( entity, ServerMsg::private(String::from("You played with flame strength.")), @@ -727,9 +727,9 @@ fn handle_lantern(server: &mut Server, entity: EcsEntity, args: String, action: offset: Vec3::new(0.5, 0.2, 0.8), col: Rgb::new(1.0, 0.75, 0.3), strength: if let Some(s) = opt_s { - s.max(0.0).min(20.0) + s.max(0.0).min(10.0) } else { - 6.0 + 3.0 }, }, );