| Age | Commit message (Collapse) | Author |
|
- 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)
|
|
5 compute shaders + cnn_v3/common snippet:
enc0: Conv(20→4,3×3) + FiLM + ReLU full-res
enc1: AvgPool + Conv(4→8,3×3) + FiLM + ReLU half-res
bottleneck: AvgPool + Conv(8→8,1×1) + ReLU quarter-res
dec1: NearestUp + cat(enc1) + Conv(16→4) + FiLM half-res
dec0: NearestUp + cat(enc0) + Conv(8→4) + FiLM + Sigmoid full-res
Parity rules: zero-pad conv, AvgPool down, NearestUp, FiLM after
conv+bias, skip=concat, OIHW weights+bias layout. Matches PyTorch
train_cnn_v3.py forward() exactly.
Registered in workspaces/main/assets.txt + src/effects/shaders.cc.
Weight layout + Params struct documented in cnn_v3/docs/HOWTO.md §7.
Next: Phase 4 — C++ CNNv3Effect + FiLM uniform upload.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Wire GBufferEffect into demo build: assets.txt, DemoSourceLists.cmake,
demo_effects.h, shaders.h/cc. ShaderComposer::Compose() applied to
gbuf_raster.wgsl (resolves #include "common_uniforms").
- Add GBufferEffect construction test. 35/35 passing.
- Write cnn_v3/docs/HOWTO.md: G-buffer wiring, training data prep,
training plan, per-pixel validation workflow, phase status table,
troubleshooting guide.
- Add project hooks: remind to update HOWTO.md on cnn_v3/ edits;
warn on direct str_view(*_wgsl) usage bypassing ShaderComposer.
- Update PROJECT_CONTEXT.md and TODO.md: Phase 1 done,
Phase 3 (WGSL U-Net shaders) is next active.
handoff(Gemini): CNN v3 Phase 3 is next - WGSL enc/dec/bottleneck/FiLM
shaders in cnn_v3/shaders/. See cnn_v3/docs/CNN_V3.md Architecture
section and cnn_v3/docs/HOWTO.md section 3 for spec. GBufferEffect
outputs feat_tex0 + feat_tex1 (rgba32uint, 20ch, 32 bytes/pixel).
C++ CNNv3Effect (Phase 4) takes those as input nodes.
|