From a2697faa005337c4d8e8e6376d9e57edadf63f44 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 22 Mar 2026 20:31:45 +0100 Subject: docs+feat(cnn_v3): compact context, re-enable shadow in GBufDeferredEffect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TODO/PROJECT_CONTEXT updated to reflect operational pipeline state - GBufDeferredEffect: shadow re-enabled (albedo * (ambient + diffuse * shadow)) feat_tex1 binding restored for shadow channel debugging handoff(Gemini): shadow pass live again — investigate why shadow looks broken. --- TODO.md | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 66cbe76..e855384 100644 --- a/TODO.md +++ b/TODO.md @@ -14,7 +14,7 @@ Procedural spectrogram tool: 50-100× compression (5 KB .spec → ~100 bytes C++ ## Priority 2: Test Infrastructure Maintenance [ONGOING] -**Status:** 35/35 tests passing +**Status:** 38/38 tests passing **Outstanding TODOs:** @@ -62,32 +62,18 @@ Ongoing shader code hygiene for granular, reusable snippets. ## CNN v3 — U-Net + FiLM [IN PROGRESS] -U-Net architecture with FiLM conditioning. Runtime style control via beat/audio. -Richer G-buffer input (normals, depth, material IDs). Per-pixel testability across -PyTorch / HTML WebGPU / C++ WebGPU. - -**Design:** `cnn_v3/docs/CNN_V3.md` - -**Phases:** -1. ✅ G-buffer: `GBufferEffect` integrated. SDF/shadow placeholder (shadow=1, transp=0). -2. ✅ Training infrastructure: `blender_export.py`, `pack_blender_sample.py`, `pack_photo_sample.py` -3. ✅ WGSL shaders: cnn_v3_common (snippet), enc0, enc1, bottleneck, dec1, dec0 -4. ✅ C++ `CNNv3Effect`: 5 compute passes, FiLM uniform upload, `set_film_params()` API - - Params alignment fix: WGSL `vec3u` align=16 → C++ structs 64/96 bytes - - Weight offsets as explicit formulas (e.g. `20*4*9+4`) - - FiLM γ/β: identity defaults; real values require trained MLP (see below) -5. ✅ Parity validation: test vectors + `test_cnn_v3_parity.cc`. max_err=4.88e-4 (≤1/255). - - Key fix: intermediate nodes at fractional resolutions (W/2, W/4) via `NodeRegistry::default_width()/default_height()` - -6. ✅ Training script: `train_cnn_v3.py` + `cnn_v3_utils.py` written - - ✅ `export_cnn_v3_weights.py` — convert trained `.pth` → `.bin` (f16) -7. ✅ Validation tools: - - `GBufViewEffect` — C++ 4×5 channel grid (all 20 G-buffer channels) - - Web tool "Load sample directory" — G-buffer pack → CNN inference → PSNR - - See `cnn_v3/docs/HOWTO.md` §9 - -**Next: run a real training pass** -- See `cnn_v3/docs/HOWTO.md` §3 for training commands +**Design:** `cnn_v3/docs/CNN_V3.md` | All phases 1–7 complete. Runtime pipeline operational. + +**Current pipeline:** `GBufferEffect` → `GBufDeferredEffect` → sink (debug view: albedo×diffuse) + +**Active work:** +- [ ] Fix/validate shadow pass (`gbuf_shadow.wgsl`) — currently disabled in deferred +- [ ] Re-enable shadow in `GBufDeferredEffect` once validated +- [ ] Run first real training pass — see `cnn_v3/docs/HOWTO.md` §3 + +**Pending (lower priority):** +- [ ] GBufferEffect: Pass 3 transparency (transp=0 placeholder) +- [ ] GBufferEffect: `resize()` support ## Future: CNN v3 "2D Mode" (G-buffer-free) -- cgit v1.2.3