diff --git a/client/scripts/autoloads/fog_state.gd b/client/scripts/autoloads/fog_state.gd index 612cf9abb..67f6ecdda 100644 --- a/client/scripts/autoloads/fog_state.gd +++ b/client/scripts/autoloads/fog_state.gd @@ -53,7 +53,7 @@ func _ready() -> void: func _resize(bounds: Rect2i) -> void: var old_bounds := map_bounds var old_exp := _exp_bytes - var old_tint := _tint_bytes + var old_tint := _tint_bytes # empty on first call (_ready); guard at line 104 skips copy var old_w := _width var old_h := _height diff --git a/docs/architecture/fog-shader-spec.md b/docs/architecture/fog-shader-spec.md index af831f8b4..54b68af07 100644 --- a/docs/architecture/fog-shader-spec.md +++ b/docs/architecture/fog-shader-spec.md @@ -12,13 +12,13 @@ The fog system was simplified from the original 5-layer spec in Sprint 22 (#569) |----------------------|------------------|-------| | 1. Clear (forward cone) | Implemented | Soft Gaussian gradient (7x7, sigma 2.0) | | 2. Light fog (peripheral sector) | Simplified — merged into gradient | Peripheral sector removed from server; gradient provides soft transition | -| 3. Deep fog (previously explored) | Implemented — EXP_EXPLORED | Alpha 0.54-0.70 with zone temperature tint (#563) | +| 3. Deep fog (previously explored) | Implemented — EXP_EXPLORED | Alpha 0.55-0.70 with zone temperature tint (#563) | | 4. Unexplored + maps app | Deferred | v0.1.2+, requires mapped_tiles in ObserverSnapshot | | 5. Unexplored (no maps) | Implemented | Solid near-black #12141a | **Alpha values (Sprint 22, #563):** -- Light fog zone (near cone gradient, vis 0.0-0.3): alpha 0.26-0.34, breathing ±0.04 (8-10s) -- Deep fog zone (EXP_EXPLORED, vis≈0): alpha 0.54-0.70, breathing ±0.08 (15-20s) +- Light fog zone (near cone gradient, vis 0.0-0.3): alpha 0.25-0.35, breathing ±0.05 (8-10s) +- Deep fog zone (EXP_EXPLORED, vis≈0): alpha 0.55-0.70, breathing ±0.075 (15-20s) - Zone temperature tint active in deep fog zone (D-059/D-046/D-077) ## Overview @@ -131,10 +131,10 @@ float noise_fast = texture(noise_tex, tile * 0.03 + vec2(time * 0.11, time * 0.0 // Deep fog noise — slow cycle (15-20s), more pronounced ±0.08 breathing float noise_slow = texture(noise_tex, tile * 0.02 + vec2(time * 0.05, time * 0.035)).r; -// Light fog: alpha 0.26-0.34 (near cone gradient) -float light_fog_alpha = 0.30 + noise_fast * 0.04; -// Deep fog: alpha 0.54-0.70 (far from cone, EXP_EXPLORED) -float deep_fog_alpha = 0.62 + noise_slow * 0.08; +// Light fog: alpha 0.25-0.35 (near cone gradient) +float light_fog_alpha = 0.30 + (noise_fast * 2.0 - 1.0) * 0.05; +// Deep fog: alpha 0.55-0.70 (far from cone, EXP_EXPLORED) +float deep_fog_alpha = 0.625 + (noise_slow * 2.0 - 1.0) * 0.075; // Blend deep <-> light fog by proximity to cone: // vis=0 (far from cone) → deep_factor=1 → deep fog color + alpha