summaryrefslogtreecommitdiff
path: root/doc/COMPLETED.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/COMPLETED.md')
-rw-r--r--doc/COMPLETED.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/COMPLETED.md b/doc/COMPLETED.md
index a3a988c..203c27a 100644
--- a/doc/COMPLETED.md
+++ b/doc/COMPLETED.md
@@ -36,6 +36,10 @@ Completed task archive. See `doc/archive/` for detailed historical documents.
## March 2026
+- [x] **CNN v3 training bug fixes (2026-03-27)** — Two bugs blocking convergence:
+ 1. **dec0 ReLU before sigmoid**: `sigmoid(relu(x))` constrains output to [0.5,1.0] — network could never produce dark pixels. Removed `F.relu` in `train_cnn_v3.py` and `max(0.0,…)` in `cnn_v3_dec0.wgsl`. Output range now [0,1]. Test vectors regenerated via `gen_test_vectors.py --header`. 36/36 tests pass, parity max_err=4.88e-4.
+ 2. **FiLM MLP not used at inference**: `set_film_params()` used hardcoded heuristics instead of the trained MLP. Added `CNNv3FilmMlp` struct + `load_film_mlp()` to `cnn_v3_effect.h/.cc`. MLP auto-loaded from `ASSET_WEIGHTS_CNN_V3_FILM_MLP` at construction; `set_film_params()` runs `Linear(5→16)→ReLU→Linear(16→72)` CPU-side. Falls back to identity if not loaded.
+
- [x] **CNN v3 shadow pass debugging** — Fixed 5 independent bugs in `gbuf_shadow.wgsl` + `gbuffer_effect.cc`:
1. **Camera Y-inversion**: `mat4::perspective` negates Y for post-process chain; fixed with `proj.m[5] = -proj.m[5]` in `upload_scene_data` + `WGPUFrontFace_CCW` on raster pipeline.
2. **Shadow formula**: replaced `shadowWithStoredDistance` (20 steps, bounded) with 64-step IQ soft shadow (`res = min(res, 8.0*d/t)`, unbounded march).