fix(visual): tune fog shader alpha and soft cone edge per D-059 #76

Closed
jpmschweitzer wants to merge 0 commits from visual into main
Owner

Summary

  • Fog alpha tuning (#564): Layer 2 (peripheral) peak alpha 0.55→0.38, noise 0.1→0.05. Layer 3 (deep fog) alpha range 0.78-0.90→0.62-0.76 so zone temperature tint breathes through. Layer 5 unchanged.
  • Cone edge gradient: Added sample_visibility() — 7x7 Gaussian blur (sigma 2.0) on the visibility texture. The binary per-tile LOS (0/180/255) produced hard stair-stepped edges; the blur spreads the boundary into a 3-4 tile radius gradient matching D-059/D-066 spec (6-8 sim tile soft edge). Lowered PERIPHERAL_LOW from 0.55→0.08 so gradient tiles enter the peripheral fog branch. Fixed Layer 1/2 alpha discontinuity at CLEAR_THRESHOLD.
  • Noise tapering: noise_weight = 1.0 - smoothstep(0.5, 1.0, coverage) kills noise at the clear boundary, keeping the fade clean while preserving breathing in deep peripheral.
  • Wireframes: Re-exported all wireframe PNGs without watermarks.

Decisions

  • D-059: Fog layers (5-layer, shader-based, knowledge-graph-driven)
  • D-066: Dual-scale grid (6-8 sim tile gradient edge)
  • D-011: Fog of perception non-negotiable

Test plan

  • Run game, check Fog Theater gauntlet room — cone edge should be smooth gradient, not stair-stepped
  • Entities in peripheral zone dimmed but identifiable (D-033 colours readable)
  • Deep fog shows faint zone temperature tint (warm/cool/neutral)
  • Unexplored tiles remain fully black
  • make ci-client passes (no shader compilation regressions)
  • Verify <1ms/frame fog overhead (D-059 perf budget)
## Summary - **Fog alpha tuning (#564):** Layer 2 (peripheral) peak alpha 0.55→0.38, noise 0.1→0.05. Layer 3 (deep fog) alpha range 0.78-0.90→0.62-0.76 so zone temperature tint breathes through. Layer 5 unchanged. - **Cone edge gradient:** Added `sample_visibility()` — 7x7 Gaussian blur (sigma 2.0) on the visibility texture. The binary per-tile LOS (0/180/255) produced hard stair-stepped edges; the blur spreads the boundary into a 3-4 tile radius gradient matching D-059/D-066 spec (6-8 sim tile soft edge). Lowered `PERIPHERAL_LOW` from 0.55→0.08 so gradient tiles enter the peripheral fog branch. Fixed Layer 1/2 alpha discontinuity at `CLEAR_THRESHOLD`. - **Noise tapering:** `noise_weight = 1.0 - smoothstep(0.5, 1.0, coverage)` kills noise at the clear boundary, keeping the fade clean while preserving breathing in deep peripheral. - **Wireframes:** Re-exported all wireframe PNGs without watermarks. ## Decisions - D-059: Fog layers (5-layer, shader-based, knowledge-graph-driven) - D-066: Dual-scale grid (6-8 sim tile gradient edge) - D-011: Fog of perception non-negotiable ## Test plan - [ ] Run game, check Fog Theater gauntlet room — cone edge should be smooth gradient, not stair-stepped - [ ] Entities in peripheral zone dimmed but identifiable (D-033 colours readable) - [ ] Deep fog shows faint zone temperature tint (warm/cool/neutral) - [ ] Unexplored tiles remain fully black - [ ] `make ci-client` passes (no shader compilation regressions) - [ ] Verify <1ms/frame fog overhead (D-059 perf budget)
jpmschweitzer added 4 commits 2026-02-27 21:37:41 +01:00
Re-rendered all 19 wireframe PNGs via Frame0 paid license,
removing trial watermarks. JSON sources unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	docs/design/wireframes/menus/v01-save-load.png
Layer 2 (peripheral): reduce peak alpha 0.55→0.38, noise 0.1→0.05,
taper noise to zero near clear boundary for a clean gradient edge.
Layer 3 (deep fog): reduce alpha range 0.78-0.90→0.62-0.76 so zone
temperature tint breathes through. Layer 5 unchanged (alpha 1.0).

Ticket: #564

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The visibility texture has binary per-tile values (0/180/255) — bilinear
filtering alone only smooths ~1 tile, producing hard stair-stepped edges
at the LOS boundary instead of the 6-8 sim tile gradient D-059 specifies.

Add sample_visibility() with 7x7 Gaussian kernel (sigma 2.0) that
spreads the LOS boundary into a 3-4 tile radius gradient. Lower
PERIPHERAL_LOW from 0.55 to 0.08 so gradient tiles enter the peripheral
fog branch. Fix Layer 1/2 alpha discontinuity at CLEAR_THRESHOLD.
Guard against gradient bleed into unexplored tiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Review: CHANGES REQUESTED. See details below.

Review: CHANGES REQUESTED. See details below.
Author
Owner

Hoshe (QA): REQUEST_CHANGES — (1) deep fog noise speed exceeds D-059 15-20s spec (~22-33s actual, use time*0.06/0.045), (2) sample_visibility kernel taps not clamped at map boundary (causes sticky gradient). Araminta (Art Direction): APPROVE — alpha values and blur approach are correct. Also document Layer 2/3 threshold gap (explored<=0.3 tiles fall to solid).

Hoshe (QA): REQUEST_CHANGES — (1) deep fog noise speed exceeds D-059 15-20s spec (~22-33s actual, use time*0.06/0.045), (2) sample_visibility kernel taps not clamped at map boundary (causes sticky gradient). Araminta (Art Direction): APPROVE — alpha values and blur approach are correct. Also document Layer 2/3 threshold gap (explored<=0.3 tiles fall to solid).
jpmschweitzer added 1 commit 2026-02-27 21:48:44 +01:00
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>
Author
Owner

Re-review round 2: APPROVED. Noise speed now 0.06/0.045 (~16.7s, within D-059 spec). Kernel taps clamped at UV boundaries. Both fixes verified. Clean to merge.

Re-review round 2: APPROVED. Noise speed now 0.06/0.045 (~16.7s, within D-059 spec). Kernel taps clamped at UV boundaries. Both fixes verified. Clean to merge.
jpmschweitzer closed this pull request 2026-02-27 21:52:15 +01:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpmschweitzer/settled-reach#76