Fix shoreline water tint continuity

This commit is contained in:
Alexander Sellite 2026-08-19 10:02:33 -04:00
parent f8e02e3844
commit 4a78ab3d3e
2 changed files with 8 additions and 4 deletions

View file

@ -368,6 +368,10 @@ func _validate_environment_presentation() -> void:
assert("weather_fog_near_amount" in water_shader.code)
assert("float weather_fog_alpha = mix(" in water_shader.code)
assert("ALPHA = clamp(water_alpha, 0.1, weather_fog_alpha)" in water_shader.code)
assert(
"water_alpha *= mix(0.82, 1.0, contact_stability);"
in water_shader.code
)
assert(is_zero_approx(float(
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
)))

View file

@ -515,10 +515,10 @@ void fragment() {
water_alpha + shoreline_foam * shoreline_opacity_boost,
0.98
);
// The authored water-body height is also the casting authority. Fade the
// visual layer completely at exact terrain contact so dry land cannot look
// fishable while the stable sub-surface water remains visible.
water_alpha *= contact_stability;
// Keep the water tint visually continuous across authored terrain contact.
// Fully fading here exposes the raised sand edge as a broken tan seam; the
// fishing resolver, rather than this presentation shader, owns castability.
water_alpha *= mix(0.82, 1.0, contact_stability);
float surface_mottle = value_noise(
world_position.xz * surface_mottle_scale