summaryrefslogtreecommitdiff
path: root/TODO.md
diff options
context:
space:
mode:
Diffstat (limited to 'TODO.md')
-rw-r--r--TODO.md53
1 files changed, 52 insertions, 1 deletions
diff --git a/TODO.md b/TODO.md
index 105be30..5fcad5d 100644
--- a/TODO.md
+++ b/TODO.md
@@ -4,6 +4,16 @@ This file tracks prioritized tasks with detailed attack plans.
## Recently Completed (February 6, 2026)
+- [x] **Critical Shader Bug Fixes & Test Infrastructure** (February 6, 2026)
+ - [x] **Shader Validation Errors**: Fixed three critical WGSL bugs causing demo64k and test_3d_render crashes:
+ - Removed dead code using non-existent `inverse()` function in renderer_3d.wgsl
+ - Fixed `get_normal_basic()` signature mismatch in sdf_utils.wgsl and lighting.wgsl (obj_type: f32 → obj_params: vec4<f32>)
+ - Fixed scene_query_linear.wgsl incorrectly declaring binding 2 (BVH buffer) - was identical to BVH version due to copy-paste error
+ - [x] **Root Cause**: Linear shader mode expected no binding 2, but shader declared it, causing pipeline/shader mismatch
+ - [x] **New Test Coverage**: Created `test_shader_compilation.cc` that compiles all production shaders through WebGPU, tests both BVH and Linear composition modes, validates WGSL syntax/bindings/types
+ - [x] **Test Gap Analysis**: Existing test_shader_assets only checked keywords, not actual compilation. New test would have caught all three bugs.
+ - **Result**: demo64k runs without WebGPU errors, test_3d_render no longer crashes, 22/23 tests pass (FftTest unrelated), comprehensive regression prevention
+
- [x] **Task C: Build System Optimization** (February 6, 2026)
- [x] **Header Split**: Refactored `asset_manager.h` into `asset_manager_dcl.h` (forward declarations), `asset_manager.h` (core API), and `asset_manager_utils.h` (typed helpers for TextureAsset/MeshAsset).
- [x] **Asset Dependency Tracking**: Added file-level dependencies for all assets (.wgsl shaders, .spec audio, .obj meshes). CMake now tracks 42 demo assets + 17 test assets individually.
@@ -276,8 +286,49 @@ This file tracks prioritized tasks with detailed attack plans.
## Future Goals & Ideas (Untriaged)
+### Audio Tools
+- [ ] **Task #64: specplay Enhancements**: Extend audio analysis tool with new features
+ - **Priority 1**: Spectral visualization (ASCII art), waveform display, frequency analysis, dynamic range
+ - **Priority 2**: Diff mode (compare .wav vs .spec), batch mode (CSV report, find clipping)
+ - **Priority 3**: WAV export (.spec → .wav), normalization
+ - **Priority 4**: Spectral envelope, harmonic analysis, onset detection
+ - **Priority 5**: Interactive mode (seek, loop, volume control)
+ - See `tools/specplay_README.md` for detailed feature list
+
+- [ ] **Task #65: Data-Driven Tempo Control**: Move tempo variation from code to data files
+ - **Current**: `g_tempo_scale` is hardcoded in `main.cc` with manual animation curves
+ - **Goal**: Define tempo curves in `.seq` or `.track` files for data-driven tempo control
+ - **Approach A**: Add TEMPO directive to `.seq` format
+ - Example: `TEMPO 0.0 1.0`, `TEMPO 10.0 2.0`, `TEMPO 20.0 1.0` (time, scale pairs)
+ - seq_compiler generates tempo curve array in timeline.cc
+ - **Approach B**: Add tempo column to music.track
+ - Each pattern trigger can specify tempo_scale override
+ - tracker_compiler generates tempo events in music_data.cc
+ - **Benefits**: Non-programmers can edit tempo, easier iteration, version control friendly
+ - **Priority**: Low (current hardcoded approach works, but less flexible)
+
+### Developer Tools
+- [ ] **Task #66: External Asset Loading for Debugging**: mmap() asset files instead of embedded data
+ - **Current**: All assets embedded in `assets_data.cc` (regenerate on every asset change)
+ - **Goal**: Load assets from external files in debug builds for faster iteration
+ - **Scope**: macOS only, non-STRIP_ALL builds only
+ - **Implementation**:
+ - Add `DEMO_ENABLE_EXTERNAL_ASSETS` CMake option
+ - Modify `GetAsset()` to check for external file first (e.g., `assets/final/<name>`)
+ - Use `mmap()` to map file into memory (replaces `uint8_t asset[]` array)
+ - Fallback to embedded data if file not found
+ - **Benefits**: Edit shaders/assets without regenerating assets_data.cc (~10s rebuild)
+ - **Trade-offs**: Adds runtime file I/O, only useful during development
+ - **Priority**: Low (current workflow acceptable, but nice-to-have for rapid iteration)
+
+### Visual Effects
- [ ] **Task #52: Procedural SDF Font**: Minimal bezier/spline set for [A-Z, 0-9] and SDF rendering.
-- [ ] **Task #53: Particles Shader Polish**: Improve visual quality of particles.
+- [x] **Task #53: Particles Shader Polish**: Improve visual quality of particles. (Completed February 6, 2026)
+ - Implemented transparent circular particles with smooth distance-based falloff
+ - Added UV coordinates and lifetime-based alpha fading (particle.pos.w: 1.0 → 0.0)
+ - Enabled alpha blending for particle shaders (auto-detected via shader name)
+ - Increased particle usage: Added 5 ParticleSprayEffect instances throughout demo (6b, 12b, 17b, 24b, 56b)
+ - Result: Particles now render as fading transparent circles instead of opaque squares
- [ ] **Task #55: SDF Random Planes Intersection**: Implement `sdPolyhedron` (crystal/gem shapes) via plane intersection.
- [ ] **Task #54: Tracy Integration**: Integrate Tracy debugger for performance profiling.
- [ ] **Task #58: Advanced Shader Factorization**: Further factorize WGSL code into smaller, reusable snippets.