From e28be513cd787fbbab0274cf2ef609490b62b909 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Fri, 27 Feb 2026 21:48:39 +0100 Subject: [PATCH] =?UTF-8?q?fix(assets):=20review=20fixes=20=E2=80=94=20fog?= =?UTF-8?q?=20noise=20speed=20and=20kernel=20UV=20clamping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deep fog noise scroll speed 0.045/0.03 → 0.06/0.045 to match D-059 15-20s breathing cycle spec. Clamp sample_visibility() UV coordinates to [0,1] to prevent sticky gradient at map edges. Co-Authored-By: Claude Opus 4.6 --- client/shaders/fog.gdshader | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/shaders/fog.gdshader b/client/shaders/fog.gdshader index 27c11df8b..c64bb31f9 100644 --- a/client/shaders/fog.gdshader +++ b/client/shaders/fog.gdshader @@ -44,7 +44,8 @@ float sample_visibility(vec2 uv) { for (float dy = -3.0; dy <= 3.0; dy += 1.0) { for (float dx = -3.0; dx <= 3.0; dx += 1.0) { float w = exp(-(dx * dx + dy * dy) / 8.0); - sum += texture(visibility_tex, uv + vec2(dx, dy) * t).r * w; + vec2 sample_uv = clamp(uv + vec2(dx, dy) * t, vec2(0.0), vec2(1.0)); + sum += texture(visibility_tex, sample_uv).r * w; weight += w; } } @@ -95,7 +96,7 @@ void fragment() { // Layer 3: Deep fog (previously explored, no longer in LOS) // D-059: near-monochrome, ~10% zone temperature tint, 15-20s breathing cycle vec3 zone_tint = texture(zone_tint_tex, tex_uv).rgb; - float noise_val = texture(noise_tex, tile * 0.015 + vec2(time * 0.045, time * 0.03)).r; + float noise_val = texture(noise_tex, tile * 0.015 + vec2(time * 0.06, time * 0.045)).r; vec3 tint_color = mix(vec3(0.04), zone_tint, 0.1); float alpha = mix(0.62, 0.76, noise_val); // Fog breathes COLOR = vec4(tint_color, alpha);