Fog of war: wider fades and a grainy edge instead of stepped lines (t17)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 12:39:13 -04:00
co-authored by Claude Opus 5.5
parent 1f56d27ded
commit a18dcda8a4
7 changed files with 43 additions and 17 deletions
+2
View File
@@ -49,6 +49,8 @@ function drawWorld() {
const a = fog[fr + j], b = fog[fr + j1], c = fog[fn + j], d = fog[fn + j1];
if ((a & b & c & d) !== 255) fv = (a + (b - a) * t) * (1 - ft) + (c + (d - c) * t) * ft;
if (!fv) { px[row + bx] = OUT; if (sm) { bpx[row + bx] = 0x000a0a0c; tpx[row + bx] = 0; fpx[row + bx] = 0xff; } continue; }
// Stable grain noise breaks up the half-resolution fog's stepped edges.
if (fv < 255) fv = Math.max(1, Math.min(255, fv + (noiseB[yw + x] - 128) * (40 / 128)));
}
const i = yw + x, m = mat[i], nz = noiseB[i] - 128;
const T = temp[i];