Unify foggy water presentation and remove shoreline ribbons

This commit is contained in:
Alexander Sellite 2026-08-13 16:25:43 -04:00
parent 3576daba16
commit 405bdaa2d2
8 changed files with 209 additions and 10 deletions

View file

@ -7,6 +7,8 @@ uniform vec4 sky_horizon_color : source_color = vec4(0.663, 0.843, 0.847, 1.0);
uniform vec4 ground_bottom_color : source_color = vec4(0.157, 0.361, 0.439, 1.0);
uniform vec4 ground_horizon_color : source_color = vec4(0.549, 0.749, 0.765, 1.0);
uniform float horizon_blend_width : hint_range(0.005, 0.15, 0.005) = 0.01;
uniform vec4 fog_horizon_color : source_color = vec4(0.13, 0.21, 0.32, 1.0);
uniform float fog_horizon_occlusion : hint_range(0.0, 1.0) = 0.0;
uniform vec3 sun_direction = vec3(0.0, 1.0, 0.0);
uniform vec4 sun_color : source_color = vec4(1.0, 0.86, 0.46, 1.0);
@ -86,6 +88,14 @@ void sky() {
base_color, moon_color.rgb, moon_disc * moon_visible_strength
);
base_color = apply_weather_clouds(base_color, view_direction);
// Compatibility fog does not fully erase the color split between a custom
// sky's upper and lower hemispheres. Dense low-light fog supplies one
// uniform sky color here so that split cannot masquerade as an ocean edge.
base_color = mix(
base_color,
fog_horizon_color.rgb,
fog_horizon_occlusion
);
COLOR = base_color;
}

View file

@ -15,6 +15,8 @@ shader_parameter/sky_horizon_color = Color(0.663, 0.843, 0.847, 1)
shader_parameter/ground_bottom_color = Color(0.157, 0.361, 0.439, 1)
shader_parameter/ground_horizon_color = Color(0.549, 0.749, 0.765, 1)
shader_parameter/horizon_blend_width = 0.01
shader_parameter/fog_horizon_color = Color(0.13, 0.21, 0.32, 1)
shader_parameter/fog_horizon_occlusion = 0.0
shader_parameter/sun_direction = Vector3(0, 1, 0)
shader_parameter/sun_color = Color(1, 0.86, 0.46, 1)
shader_parameter/sun_visibility = 1.0