docs/architecture/fog-shader-spec.md — updated to reflect Sprint 22 architecture
Notes
Blocked by #569 (client fog architecture fix, still in progress) — merge #569 first per joint briefing merge order
Needs sign-off from Stig (client team) before merge
Zone tint visibility depends on server sending zone_id per tile; defaults to neutral dark without zone metadata
## Summary
- Tune fog shader alpha to D-059 spec: light fog 0.25-0.35 (was 0.25-0.55), deep fog 0.55-0.70 (was 0.78-0.90)
- Add zone temperature tint to deep fog: bar=warm amber-dark, hub=cool blue-dark, corridor=neutral dark (D-059/D-046/D-077)
- Wire `zone_tint_tex` population per-tile from server `zone_id` in `fog_state.gd` with preservation across texture resizes
- Separate Perlin noise breathing cycles: 8-10s light fog, 15-20s deep fog
## Tickets
- #563: Fog shader too opaque — tune alpha for semi-transparent layers per D-059
## Files changed
- `client/shaders/fog.gdshader` — alpha tuning, deep/light fog distinction, zone tint sampling
- `client/scripts/autoloads/fog_state.gd` — ZONE_TINTS dictionary, per-tile tint writing, tint byte preservation
- `docs/architecture/fog-shader-spec.md` — updated to reflect Sprint 22 architecture
## Notes
- Blocked by #569 (client fog architecture fix, still in progress) — merge #569 first per joint briefing merge order
- Needs sign-off from Stig (client team) before merge
- Zone tint visibility depends on server sending `zone_id` per tile; defaults to neutral dark without zone metadata
Ticket #563. Light fog alpha tuned to 0.25-0.35 range (was 0.25-0.55),
deep fog alpha set to 0.55-0.70 with zone temperature tint from
zone_tint_tex (bar=warm #2a1f15, hub=cool #1a1f2e, corridor=neutral
#1a1a1a). Two Perlin noise cycles: 8-10s light, 15-20s deep.
Zone tint texture now populated per-tile from server zone_id in
fog_state.gd with preservation across texture resizes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zone_tint_tex uses filter_nearest — sharp zone boundary color step may read as artifact
5
CHANGELOG.md:19
suggestion
Unrelated connector entry mixed in from main
Araminta (Art Direction): REQUEST_CHANGES
Palette choices are correct, implementation is structurally sound. Two documentation issues.
#
File
Severity
Issue
1
docs/architecture/fog-shader-spec.md:20-21
warning
Spec alpha ranges stale after #563 tuning — shader is correct, spec is wrong
2
docs/architecture/fog-shader-spec.md:129-138
warning
Pseudocode uses one-sided noise (noise * amp) instead of symmetric breathing ((noise*2-1) * amp) — will mislead if copy-pasted
3
fog.gdshader:67-69
suggestion
"6-8 tile" claim in comments — math gives 3-4 tile radius, comment should match
4
fog_state.gd:175-199
suggestion
Neutral default doubles as corridor tint — fine, just worth noting
Verdict: CHANGES REQUESTED
Both reviewers flagged the same core issue: fog-shader-spec.md is stale — alpha ranges and pseudocode don't match the shader after #563 tuning. The shader itself is correct. Fix the spec doc and the missing // markers, then this is good to merge.
## Review: visual → main (type: visual)
### Hoshe (QA): REQUEST_CHANGES
Solid zone tint implementation, but spec doc is stale and has syntax errors.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | `docs/architecture/fog-shader-spec.md:20-21` | warning | Alpha values in spec (0.26-0.34 / 0.54-0.70) don't match shader (0.25-0.35 / 0.55-0.70) |
| 2 | `docs/architecture/fog-shader-spec.md:139,146` | warning | Missing `//` comment markers in GLSL code sample — copy-paste artifact |
| 3 | `client/scripts/autoloads/fog_state.gd:56` | warning | `_tint_bytes` initialization subtlety — add comment noting first-call guard behavior |
| 4 | `fog.gdshader:15` | suggestion | `zone_tint_tex` uses `filter_nearest` — sharp zone boundary color step may read as artifact |
| 5 | `CHANGELOG.md:19` | suggestion | Unrelated connector entry mixed in from main |
### Araminta (Art Direction): REQUEST_CHANGES
Palette choices are correct, implementation is structurally sound. Two documentation issues.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | `docs/architecture/fog-shader-spec.md:20-21` | warning | Spec alpha ranges stale after #563 tuning — shader is correct, spec is wrong |
| 2 | `docs/architecture/fog-shader-spec.md:129-138` | warning | Pseudocode uses one-sided noise (`noise * amp`) instead of symmetric breathing (`(noise*2-1) * amp`) — will mislead if copy-pasted |
| 3 | `fog.gdshader:67-69` | suggestion | "6-8 tile" claim in comments — math gives 3-4 tile radius, comment should match |
| 4 | `fog_state.gd:175-199` | suggestion | Neutral default doubles as corridor tint — fine, just worth noting |
### Verdict: CHANGES REQUESTED
Both reviewers flagged the same core issue: **fog-shader-spec.md is stale** — alpha ranges and pseudocode don't match the shader after #563 tuning. The shader itself is correct. Fix the spec doc and the missing `//` markers, then this is good to merge.
Sync fog-shader-spec.md with actual shader values after #563 tuning:
light fog 0.25-0.35 (was 0.26-0.34), deep fog 0.55-0.70 (was 0.54-0.70).
Pseudocode now uses symmetric noise remapping (noise*2-1)*amp to match
the shader. Added first-call guard comment on _tint_bytes in fog_state.gd.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 7x7 Gaussian kernel (sigma 2.0) produces a 3-4 tile radius
gradient, not 6-8 tiles. Header comment now matches the function
comment and actual math.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GLSL sample comments now say ±0.05 / ±0.075 matching the code and
spec table. Implementation notes gradient radius updated from 6-8
to 3-4 tiles.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Round 2 issues (noise amplitudes, gradient radius wording) are confirmed fixed. However, deeper spec audit found three more stale sections in fog-shader-spec.md that still reference the pre-simplification 5-layer/peripheral-sector design.
#
File
Severity
Issue
1
fog-shader-spec.md:63-64,205
warning
Data flow diagram still shows visibility_sectors parameter and lifecycle calls FogState.update_visibility(..., visibility_sectors) — peripheral sectors were removed in Sprint 22. Stale pseudocode will mislead future implementers.
2
fog-shader-spec.md:82
warning
Uniform list includes uniform vec2 player_pos which doesn't exist in the shader — cone center is implicit in visibility texture.
3
fog-shader-spec.md:231
warning
"Files to Create" table still says "5-layer fog" — should be "3-layer fog (clear / explored / unexplored)".
Araminta (Art Direction): APPROVE
The fog implementation faithfully delivers D-059 and D-011. Alpha ranges (0.25-0.35 light, 0.55-0.70 deep) keep the world visible as a perceptual filter. Zone temperature tints match D-046 palette. The Hopper test passes — bar reads warm-dark through deep fog.
#
File
Severity
Issue
1
fog.gdshader:8
suggestion
Header comment conflates exploration texture and visibility — could be clearer
2
fog.gdshader:15
suggestion
filter_nearest on zone_tint_tex is correct but undocumented — add comment explaining why
3
fog_state.gd:18
suggestion
Zone tint comment should note low-saturation is intentional per D-045
4
fog.gdshader:80-83
suggestion
Spec could document spatial meaning of vis 0.0-0.3 threshold
Verdict: CHANGES REQUESTED
All 3 warnings are in fog-shader-spec.md — stale references to the old 5-layer/peripheral-sector design. Shader and GDScript implementation are clean.
## Review: visual → main (type: visual, round 3)
### Hoshe (QA): REQUEST_CHANGES
Round 2 issues (noise amplitudes, gradient radius wording) are confirmed fixed. However, deeper spec audit found three more stale sections in `fog-shader-spec.md` that still reference the pre-simplification 5-layer/peripheral-sector design.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | fog-shader-spec.md:63-64,205 | warning | Data flow diagram still shows `visibility_sectors` parameter and lifecycle calls `FogState.update_visibility(..., visibility_sectors)` — peripheral sectors were removed in Sprint 22. Stale pseudocode will mislead future implementers. |
| 2 | fog-shader-spec.md:82 | warning | Uniform list includes `uniform vec2 player_pos` which doesn't exist in the shader — cone center is implicit in visibility texture. |
| 3 | fog-shader-spec.md:231 | warning | "Files to Create" table still says "5-layer fog" — should be "3-layer fog (clear / explored / unexplored)". |
### Araminta (Art Direction): APPROVE
The fog implementation faithfully delivers D-059 and D-011. Alpha ranges (0.25-0.35 light, 0.55-0.70 deep) keep the world visible as a perceptual filter. Zone temperature tints match D-046 palette. The Hopper test passes — bar reads warm-dark through deep fog.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | fog.gdshader:8 | suggestion | Header comment conflates exploration texture and visibility — could be clearer |
| 2 | fog.gdshader:15 | suggestion | `filter_nearest` on zone_tint_tex is correct but undocumented — add comment explaining why |
| 3 | fog_state.gd:18 | suggestion | Zone tint comment should note low-saturation is intentional per D-045 |
| 4 | fog.gdshader:80-83 | suggestion | Spec could document spatial meaning of vis 0.0-0.3 threshold |
### Verdict: CHANGES REQUESTED
All 3 warnings are in `fog-shader-spec.md` — stale references to the old 5-layer/peripheral-sector design. Shader and GDScript implementation are clean.
Round 3 review fixes — thorough spec cleanup:
- Remove visibility_sectors from data flow (peripheral removed in #569)
- Remove player_pos uniform (cone center implicit in visibility_tex)
- Update FogState pseudocode: remove sector step, add zone tint step
- Update lifecycle diagram to match single update_from_state() call
- Fix "5-layer fog" → "3-state fog" in Files to Create and impl notes
- Mark zone tint open question as resolved (Sprint 22, D-077)
- Document filter_nearest rationale on zone_tint_tex (D-073 hard zones)
- Note low-saturation tint is intentional per D-046 Hopper test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Round 3 issues #2 (player_pos uniform) and #3 ("5-layer" label) are fixed. Two stale references remain.
#
File
Severity
Issue
1
fog_state.gd:11
warning
VIS_PERIPHERAL = 180 is dead code from removed peripheral-sector model. Never read by shader. Remove or mark deprecated.
2
fog-shader-spec.md:14
warning
Status table row label still says "Light fog (peripheral sector)" — should say "Light fog (cone gradient)" to match simplified model.
3
fog-shader-spec.md:127
suggestion
Spec says "8-10s" cycle, shader comment says "~9s" — minor discrepancy, not blocking.
Araminta (Art Direction): APPROVE
No shader code changed in latest commit — pure documentation cleanup. All numeric values match between spec and shader. D-059, D-011, D-046 all upheld.
#
File
Severity
Issue
1
fog_state.gd:11
suggestion
VIS_PERIPHERAL dead code — suggest follow-up ticket to remove and audit tests.
Verdict: CHANGES REQUESTED
Two items: remove VIS_PERIPHERAL dead constant, fix one remaining "peripheral sector" label in spec status table.
## Review: visual → main (type: visual, round 4)
### Hoshe (QA): REQUEST_CHANGES
Round 3 issues #2 (player_pos uniform) and #3 ("5-layer" label) are fixed. Two stale references remain.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | fog_state.gd:11 | warning | `VIS_PERIPHERAL = 180` is dead code from removed peripheral-sector model. Never read by shader. Remove or mark deprecated. |
| 2 | fog-shader-spec.md:14 | warning | Status table row label still says "Light fog (peripheral sector)" — should say "Light fog (cone gradient)" to match simplified model. |
| 3 | fog-shader-spec.md:127 | suggestion | Spec says "8-10s" cycle, shader comment says "~9s" — minor discrepancy, not blocking. |
### Araminta (Art Direction): APPROVE
No shader code changed in latest commit — pure documentation cleanup. All numeric values match between spec and shader. D-059, D-011, D-046 all upheld.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | fog_state.gd:11 | suggestion | `VIS_PERIPHERAL` dead code — suggest follow-up ticket to remove and audit tests. |
### Verdict: CHANGES REQUESTED
Two items: remove `VIS_PERIPHERAL` dead constant, fix one remaining "peripheral sector" label in spec status table.
Round 4 review: mark VIS_PERIPHERAL as deprecated (peripheral sector
removed in #569, constant retained for test compatibility). Fix spec
status table row from "peripheral sector" to "cone gradient".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full numeric consistency sweep — every value matches between spec and shader. Both round 4 warnings resolved: VIS_PERIPHERAL marked deprecated with explanation, spec table label updated to "Light fog (cone gradient)". All prior round fixes intact.
Araminta (Art Direction): APPROVE
No shader behavior changes. D-059, D-011, D-046 all pass. Zone tints verified against palette.
Verdict: APPROVED
## Review: visual → main (type: visual, round 5)
### Hoshe (QA): APPROVE
Full numeric consistency sweep — every value matches between spec and shader. Both round 4 warnings resolved: `VIS_PERIPHERAL` marked deprecated with explanation, spec table label updated to "Light fog (cone gradient)". All prior round fixes intact.
### Araminta (Art Direction): APPROVE
No shader behavior changes. D-059, D-011, D-046 all pass. Zone tints verified against palette.
### Verdict: APPROVED
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
zone_tint_texpopulation per-tile from serverzone_idinfog_state.gdwith preservation across texture resizesTickets
Files changed
client/shaders/fog.gdshader— alpha tuning, deep/light fog distinction, zone tint samplingclient/scripts/autoloads/fog_state.gd— ZONE_TINTS dictionary, per-tile tint writing, tint byte preservationdocs/architecture/fog-shader-spec.md— updated to reflect Sprint 22 architectureNotes
zone_idper tile; defaults to neutral dark without zone metadataReview: visual → main (type: visual)
Hoshe (QA): REQUEST_CHANGES
Solid zone tint implementation, but spec doc is stale and has syntax errors.
docs/architecture/fog-shader-spec.md:20-21docs/architecture/fog-shader-spec.md:139,146//comment markers in GLSL code sample — copy-paste artifactclient/scripts/autoloads/fog_state.gd:56_tint_bytesinitialization subtlety — add comment noting first-call guard behaviorfog.gdshader:15zone_tint_texusesfilter_nearest— sharp zone boundary color step may read as artifactCHANGELOG.md:19Araminta (Art Direction): REQUEST_CHANGES
Palette choices are correct, implementation is structurally sound. Two documentation issues.
docs/architecture/fog-shader-spec.md:20-21docs/architecture/fog-shader-spec.md:129-138noise * amp) instead of symmetric breathing ((noise*2-1) * amp) — will mislead if copy-pastedfog.gdshader:67-69fog_state.gd:175-199Verdict: CHANGES REQUESTED
Both reviewers flagged the same core issue: fog-shader-spec.md is stale — alpha ranges and pseudocode don't match the shader after #563 tuning. The shader itself is correct. Fix the spec doc and the missing
//markers, then this is good to merge.Re-review: visual → main (round 2)
Hoshe (QA): REQUEST_CHANGES
Original warnings resolved. Two new issues in fix commits:
fog-shader-spec.md:129,131±0.04/±0.08but spec table and shader both use±0.05/±0.075— stale noise amplitudesfog-shader-spec.md:255b9b9c92fixAraminta (Art Direction): APPROVE
All original issues resolved. D-059 alignment confirmed. Line 255 flagged as non-blocking suggestion.
Verdict: CHANGES REQUESTED
Two stale values in the spec's GLSL code sample comments. One-line fixes each.
Review: visual → main (type: visual, round 3)
Hoshe (QA): REQUEST_CHANGES
Round 2 issues (noise amplitudes, gradient radius wording) are confirmed fixed. However, deeper spec audit found three more stale sections in
fog-shader-spec.mdthat still reference the pre-simplification 5-layer/peripheral-sector design.visibility_sectorsparameter and lifecycle callsFogState.update_visibility(..., visibility_sectors)— peripheral sectors were removed in Sprint 22. Stale pseudocode will mislead future implementers.uniform vec2 player_poswhich doesn't exist in the shader — cone center is implicit in visibility texture.Araminta (Art Direction): APPROVE
The fog implementation faithfully delivers D-059 and D-011. Alpha ranges (0.25-0.35 light, 0.55-0.70 deep) keep the world visible as a perceptual filter. Zone temperature tints match D-046 palette. The Hopper test passes — bar reads warm-dark through deep fog.
filter_neareston zone_tint_tex is correct but undocumented — add comment explaining whyVerdict: CHANGES REQUESTED
All 3 warnings are in
fog-shader-spec.md— stale references to the old 5-layer/peripheral-sector design. Shader and GDScript implementation are clean.Review: visual → main (type: visual, round 4)
Hoshe (QA): REQUEST_CHANGES
Round 3 issues #2 (player_pos uniform) and #3 ("5-layer" label) are fixed. Two stale references remain.
VIS_PERIPHERAL = 180is dead code from removed peripheral-sector model. Never read by shader. Remove or mark deprecated.Araminta (Art Direction): APPROVE
No shader code changed in latest commit — pure documentation cleanup. All numeric values match between spec and shader. D-059, D-011, D-046 all upheld.
VIS_PERIPHERALdead code — suggest follow-up ticket to remove and audit tests.Verdict: CHANGES REQUESTED
Two items: remove
VIS_PERIPHERALdead constant, fix one remaining "peripheral sector" label in spec status table.Review: visual → main (type: visual, round 5)
Hoshe (QA): APPROVE
Full numeric consistency sweep — every value matches between spec and shader. Both round 4 warnings resolved:
VIS_PERIPHERALmarked deprecated with explanation, spec table label updated to "Light fog (cone gradient)". All prior round fixes intact.Araminta (Art Direction): APPROVE
No shader behavior changes. D-059, D-011, D-046 all pass. Zone tints verified against palette.
Verdict: APPROVED
Pull request closed