summaryrefslogtreecommitdiff
path: root/PROJECT_CONTEXT.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-11 07:07:29 +0100
committerskal <pascal.massimino@gmail.com>2026-02-11 07:07:29 +0100
commit3915a5e1c8c904f8f2154845cb99223a598653ee (patch)
treecb0e75dea7f8aa729d3b440a5e81b3ac811f8f04 /PROJECT_CONTEXT.md
parent01e640be66f9d72c22417403eb88e18d6747866f (diff)
feat: Add CNN shader testing tool with GPU texture readback
Core GPU Utility (texture_readback): - Reusable synchronous texture-to-CPU readback (~150 lines) - STRIP_ALL guards (0 bytes in release builds) - Handles COPY_BYTES_PER_ROW_ALIGNMENT (256-byte alignment) - Refactored OffscreenRenderTarget to use new utility CNN Test Tool (cnn_test): - Standalone PNG→3-layer CNN→PNG/PPM tool (~450 lines) - --blend parameter (0.0-1.0) for final layer mixing - --format option (png/ppm) for output format - ShaderComposer integration for include resolution Build Integration: - Added texture_readback.cc to GPU_SOURCES (both sections) - Tool target with STB_IMAGE support Testing: - All 36 tests pass (100%) - Processes 64×64 and 555×370 images successfully - Ground-truth validation setup complete Known Issues: - BUG: Tool produces black output (uninitialized input texture) - First intermediate texture not initialized before layer loop - MSE 64860 vs Python ground truth (expected <10) - Fix required: Copy input to intermediate[0] before processing Documentation: - doc/CNN_TEST_TOOL.md - Full technical reference - Updated PROJECT_CONTEXT.md and COMPLETED.md handoff(Claude): CNN test tool foundation complete, needs input init bugfix Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'PROJECT_CONTEXT.md')
-rw-r--r--PROJECT_CONTEXT.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md
index fb876e5..8b84cde 100644
--- a/PROJECT_CONTEXT.md
+++ b/PROJECT_CONTEXT.md
@@ -35,7 +35,8 @@
- **Audio:** Sample-accurate sync. Zero heap allocations per frame. Variable tempo. Comprehensive tests.
- **Shaders:** Parameterized effects (UniformHelper, .seq syntax). Modular WGSL composition.
- **3D:** Hybrid SDF/rasterization with BVH. Binary scene loader. Blender pipeline.
-- **Effects:** CNN post-processing foundation (single-layer, modular snippets, ready for training integration).
+- **Effects:** CNN post-processing foundation (3-layer architecture, modular snippets, validation tool).
+- **Tools:** CNN test tool for offline shader validation. Texture readback utility for GPU-to-CPU operations.
- **Build:** Asset dependency tracking. Size measurement. Hot-reload (debug-only).
- **Testing:** **36/36 passing (100%)**
@@ -57,7 +58,7 @@ See `TODO.md` for current priorities and active tasks.
**Technical Reference:**
- Core: `ASSET_SYSTEM.md`, `SEQUENCE.md`, `TRACKER.md`, `3D.md`, `CNN_EFFECT.md`
- Formats: `SCENE_FORMAT.md`, `MASKING_SYSTEM.md`
-- Tools: `BUILD.md`, `WORKSPACE_SYSTEM.md`, `SIZE_MEASUREMENT.md`
+- Tools: `BUILD.md`, `WORKSPACE_SYSTEM.md`, `SIZE_MEASUREMENT.md`, `CNN_TEST_TOOL.md`
**History:**
- `doc/COMPLETED.md` - Completed tasks archive