From 159ca2ca19345515cdfebed9fd88646730492cd2 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 22 Mar 2026 16:21:25 +0100 Subject: feat(cnn_v3): add G-buffer visualizer + web sample loader (Phase 7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++ GBufViewEffect: renders all 20 feature channels from feat_tex0/feat_tex1 in a 4×5 tiled grid. Custom BGL with WGPUTextureSampleType_Uint; bind group rebuilt per frame via wgpuRenderPipelineGetBindGroupLayout. Web tool: "Load sample directory" button — webkitdirectory picker, FULL_PACK_SHADER compute (matches gbuf_pack.wgsl packing), runFromFeat() skips photo-pack step, computePSNR() readback + comparison vs target.png side-by-side. 36/36 tests pass. Docs updated: HOWTO.md §9, README, PROJECT_CONTEXT, TODO, COMPLETED. handoff(Gemini): CNN v3 Phase 7 done. Next: run train_cnn_v3.py (see HOWTO §3). --- TODO.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 4f38740..66cbe76 100644 --- a/TODO.md +++ b/TODO.md @@ -79,9 +79,14 @@ PyTorch / HTML WebGPU / C++ WebGPU. 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()` -**Next: export + real training run** -- `train_cnn_v3.py` + `cnn_v3_utils.py` written (Phase 6 training script done) -- ✅ `export_cnn_v3_weights.py` — convert trained `.pth` → `.bin` (f16) +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 ## Future: CNN v3 "2D Mode" (G-buffer-free) -- cgit v1.2.3