Fix shoreline water tint continuity
This commit is contained in:
parent
f8e02e3844
commit
4a78ab3d3e
2 changed files with 8 additions and 4 deletions
|
|
@ -368,6 +368,10 @@ func _validate_environment_presentation() -> void:
|
||||||
assert("weather_fog_near_amount" in water_shader.code)
|
assert("weather_fog_near_amount" in water_shader.code)
|
||||||
assert("float weather_fog_alpha = mix(" 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("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(
|
assert(is_zero_approx(float(
|
||||||
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
||||||
)))
|
)))
|
||||||
|
|
|
||||||
|
|
@ -515,10 +515,10 @@ void fragment() {
|
||||||
water_alpha + shoreline_foam * shoreline_opacity_boost,
|
water_alpha + shoreline_foam * shoreline_opacity_boost,
|
||||||
0.98
|
0.98
|
||||||
);
|
);
|
||||||
// The authored water-body height is also the casting authority. Fade the
|
// Keep the water tint visually continuous across authored terrain contact.
|
||||||
// visual layer completely at exact terrain contact so dry land cannot look
|
// Fully fading here exposes the raised sand edge as a broken tan seam; the
|
||||||
// fishable while the stable sub-surface water remains visible.
|
// fishing resolver, rather than this presentation shader, owns castability.
|
||||||
water_alpha *= contact_stability;
|
water_alpha *= mix(0.82, 1.0, contact_stability);
|
||||||
|
|
||||||
float surface_mottle = value_noise(
|
float surface_mottle = value_noise(
|
||||||
world_position.xz * surface_mottle_scale
|
world_position.xz * surface_mottle_scale
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue