Compare commits

...
7 Commits
Author SHA1 Message Date
jpmschweitzer dd0de2ff04 Merge remote-tracking branch 'origin/visual' 2026-02-27 21:50:36 +01:00
jpmschweitzerandClaude Opus 4.6 e28be513cd fix(assets): review fixes — fog noise speed and kernel UV clamping
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>
2026-02-27 21:48:39 +01:00
jpmschweitzerandClaude Opus 4.6 93c9d2dcb4 fix(client): bump protocol version to 17 after server merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 21:36:32 +01:00
jpmschweitzerandClaude Opus 4.6 df1d9c8990 fix(assets): add Gaussian blur to fog visibility for soft cone edge
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>
2026-02-27 19:40:49 +01:00
jpmschweitzerandClaude Opus 4.6 8934a8201d fix(assets): tune fog shader alpha and clean cone edge per D-059
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>
2026-02-27 19:33:47 +01:00
jpmschweitzer bb91b0acf0 Merge remote-tracking branch 'origin/main' into visual
# Conflicts:
#	docs/design/wireframes/menus/v01-save-load.png
2026-02-27 19:29:17 +01:00
jpmschweitzerandClaude Opus 4.6 8e77a72a98 chore(assets): re-export wireframes without watermarks
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>
2026-02-25 10:40:13 +01:00
21 changed files with 44 additions and 9 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class_name Protocol
## Protocol version — must match server PROTOCOL_VERSION in bridge/types.rs.
## Reject snapshots where version != this value.
const PROTOCOL_VERSION: int = 16
const PROTOCOL_VERSION: int = 17
# -- Decode: bytes from server → GDScript types --------------------------------
+43 -8
View File
@@ -22,10 +22,35 @@ uniform float time; // Seconds since start
const vec3 UNEXPLORED_COLOR = vec3(0.071, 0.078, 0.102); // #12141a
const vec3 DARK_OVERLAY = vec3(0.02, 0.02, 0.05);
// D-059 thresholds (after bilinear filtering)
// D-059 thresholds
// Forward tiles = 1.0, Peripheral = 0.706 (180/255), not-visible = 0.0
const float CLEAR_THRESHOLD = 0.85; // Above this: fully clear
const float PERIPHERAL_LOW = 0.55; // Below this: transition to deep/unexplored
// Lowered from 0.55 to capture blur-extended gradient tiles in the peripheral
// branch. The 7x7 Gaussian (sigma 2.0) produces values down to ~0.08 at
// 3 tiles from the LOS boundary — together with bilinear interpolation this
// yields the 6-8 sim tile soft edge specified by D-059/D-066.
const float PERIPHERAL_LOW = 0.08;
// D-059: Soft gradient via 7x7 Gaussian blur on visibility (sigma 2.0).
// The visibility texture is 1 texel per sim tile with discrete values
// (0 / 180 / 255). Bilinear filtering alone only smooths across ~1 tile.
// This blur spreads the LOS boundary into a 3-4 tile radius gradient;
// combined with smoothstep transitions, produces 6-8 tile soft edge.
// 49 taps from a tiny (~128x128) fully-cached texture — well under 1ms.
float sample_visibility(vec2 uv) {
vec2 t = 1.0 / map_size;
float sum = 0.0;
float weight = 0.0;
for (float dy = -3.0; dy <= 3.0; dy += 1.0) {
for (float dx = -3.0; dx <= 3.0; dx += 1.0) {
float w = exp(-(dx * dx + dy * dy) / 8.0);
vec2 sample_uv = clamp(uv + vec2(dx, dy) * t, vec2(0.0), vec2(1.0));
sum += texture(visibility_tex, sample_uv).r * w;
weight += w;
}
}
return sum / weight;
}
void fragment() {
// Map UV (0-1 across ColorRect) to world pixels, then to tile coordinates
@@ -39,31 +64,41 @@ void fragment() {
if (tex_uv.x < 0.0 || tex_uv.x > 1.0 || tex_uv.y < 0.0 || tex_uv.y > 1.0) {
COLOR = vec4(UNEXPLORED_COLOR, 1.0);
} else {
float vis = texture(visibility_tex, tex_uv).r;
float vis_raw = texture(visibility_tex, tex_uv).r;
float vis = sample_visibility(tex_uv);
float explored = texture(exploration_tex, tex_uv).r;
// Don't bleed gradient into never-explored tiles — keep them Layer 5
if (explored < 0.01 && vis_raw < 0.01) {
vis = 0.0;
}
if (vis > PERIPHERAL_LOW) {
// In or near vision cone
if (vis > CLEAR_THRESHOLD) {
// Layer 1: Clear — soft edge gradient
// Alpha matches Layer 2 at boundary (coverage=1.0 → 0.25) for continuity
float edge = smoothstep(CLEAR_THRESHOLD, 1.0, vis);
COLOR = vec4(0.0, 0.0, 0.0, 1.0 - edge);
COLOR = vec4(DARK_OVERLAY, 0.25 * (1.0 - edge));
} else {
// Layer 2: Light fog (peripheral + forward edge)
// D-059: animated Perlin noise, 8-10s cycle
float noise_val = texture(noise_tex, tile * 0.03 + vec2(time * 0.11, time * 0.07)).r;
float coverage = smoothstep(PERIPHERAL_LOW, CLEAR_THRESHOLD, vis);
// Blend from heavy fog (alpha ~0.55) to lighter fog near clear edge
float alpha = mix(0.55, 0.25, coverage) + noise_val * 0.1;
// Blend from heavy fog (alpha ~0.38) to lighter fog near clear edge
// Taper noise to zero near the clear boundary — preserves breathing in deep
// peripheral but keeps the Layer 1/2 transition clean (no curly edge)
float noise_weight = 1.0 - smoothstep(0.5, 1.0, coverage);
float alpha = mix(0.38, 0.25, coverage) + noise_val * 0.05 * noise_weight;
COLOR = vec4(DARK_OVERLAY, alpha);
}
} else if (explored > 0.3) {
// Layer 3: Deep fog (previously explored, no longer in LOS)
// D-059: near-monochrome, ~10% zone temperature tint, 15-20s breathing cycle
vec3 zone_tint = texture(zone_tint_tex, tex_uv).rgb;
float noise_val = texture(noise_tex, tile * 0.015 + vec2(time * 0.045, time * 0.03)).r;
float noise_val = texture(noise_tex, tile * 0.015 + vec2(time * 0.06, time * 0.045)).r;
vec3 tint_color = mix(vec3(0.04), zone_tint, 0.1);
float alpha = mix(0.78, 0.90, noise_val); // Fog breathes
float alpha = mix(0.62, 0.76, noise_val); // Fog breathes
COLOR = vec4(tint_color, alpha);
} else {
// Layer 5: Unexplored, no maps — information zero
Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 96 KiB