fix(assets): review fixes — fog noise speed and kernel UV clamping
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user