From fe008df92f7a68d81c9bedb4328da7001e0775f0 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 21 Mar 2026 08:52:53 +0100 Subject: feat(cnn_v3): Phase 4 complete — CNNv3Effect C++ + FiLM uniform upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cnn_v3/src/cnn_v3_effect.{h,cc}: full Effect subclass with 5 compute passes (enc0→enc1→bottleneck→dec1→dec0), shared weights storage buffer, per-pass uniform buffers, set_film_params() API - Fixed WGSL/C++ struct alignment: vec3u has align=16, so CnnV3Params4ch is 64 bytes and CnnV3ParamsEnc1 is 96 bytes (not 48/80) - Weight offsets computed as explicit formulas (e.g. 20*4*9+4) for clarity - Registered in CMake, shaders.h/cc, demo_effects.h, test_demo_effects.cc - 35/35 tests pass handoff(Gemini): CNN v3 Phase 5 next — parity validation (Python ref vs WGSL) --- cnn_v3/docs/HOWTO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cnn_v3/docs') diff --git a/cnn_v3/docs/HOWTO.md b/cnn_v3/docs/HOWTO.md index ad71f1f..22266d3 100644 --- a/cnn_v3/docs/HOWTO.md +++ b/cnn_v3/docs/HOWTO.md @@ -201,7 +201,7 @@ The CNN v3 design requires exact parity between PyTorch, WGSL (HTML), and C++. | 1 — G-buffer (SDF + shadow passes) | TODO | Placeholder in place | | 2 — Training infrastructure | ✅ Done | blender_export.py, pack_*_sample.py | | 3 — WGSL U-Net shaders | ✅ Done | 5 compute shaders + cnn_v3/common snippet | -| 4 — C++ CNNv3Effect | TODO | FiLM uniform upload | +| 4 — C++ CNNv3Effect | ✅ Done | FiLM uniform upload, 35/35 tests pass | | 5 — Parity validation | TODO | Test vectors, ≤1/255 | --- -- cgit v1.2.3