fix(client): fix fog system — blocky edges and zero explored visibility (#569)
Root cause: update_from_state() used visible_tiles (always empty in live server mode) instead of visible_positions for bounds calculation. Bounds never grew beyond 64x64, so tiles outside that area rendered as solid unexplored black. Fix: new _grow_bounds_from_positions() method reads visible_positions (always populated from server snapshots). Shader fix: removed the (explored < 0.01 && vis_raw < 0.01) guard that cut off the Gaussian gradient at unexplored tile boundaries. Doubled blur step size for D-066 compliant 6-8 tile soft gradient. Added debug_exploration mode for diagnostic rendering of the exploration texture. 19 acceptance tests covering exploration persistence, bounds grow-only invariant, gradient margin, Forward-only visibility writes, and exploration data surviving texture resize. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,3 +69,4 @@ func update_fog() -> void:
|
||||
_shader_mat.set_shader_parameter("map_offset", Vector2(FogState.map_bounds.position))
|
||||
_shader_mat.set_shader_parameter("map_size", Vector2(FogState.map_bounds.size))
|
||||
_shader_mat.set_shader_parameter("time", Time.get_ticks_msec() / 1000.0)
|
||||
_shader_mat.set_shader_parameter("debug_exploration", FogState.debug_exploration)
|
||||
|
||||
Reference in New Issue
Block a user