1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# To-Do List
This file tracks prioritized tasks with detailed attack plans.
## Recently Completed (February 4, 2026)
- [x] **Task #48: Improve Audio Coverage**:
- [x] **New Tests**: Added `test_dct` (100% coverage for transforms) and `test_audio_gen` (94% coverage for procedural audio).
- [x] **Enhanced Tests**: Updated `test_synth` to cover rendering loop, double-buffering, and resource exhaustion.
- [x] **Coverage Boost**: Increased `src/audio/` coverage from ~42% to 93%.
- [x] **Task #47: Improve Asset Manager Coverage**:
- [x] **New Tests**: Added tests for unknown procedural functions, generation failures, and edge cases in `src/tests/test_assets.cc`.
- [x] **Tooling Update**: Downgraded `asset_packer` validation error to warning to allow testing invalid assets.
- [x] **Coverage Boost**: Increased `src/util/asset_manager.cc` coverage from 71% to 88%.
- [x] **Task #46: Enhance Coverage Script**: Updated `scripts/gen_coverage_report.sh` to accept an optional directory argument for targeted coverage reports (e.g., `src/procedural`).
- [x] **Task #45: Improve Procedural Generation Coverage**:
- [x] **Unit Tests:** Implemented comprehensive tests for `gen_perlin`, `make_periodic`, and default parameter handling in `src/tests/test_procedural.cc`.
- [x] **Coverage Boost:** Increased `src/procedural/generator.cc` coverage from 38% to 96%.
- [x] **Task #44: Developer Tooling (Coverage)**:
- [x] **Implement Code Coverage:** Added `DEMO_ENABLE_COVERAGE` CMake option and created `scripts/gen_coverage_report.sh` to generate HTML coverage reports using `lcov` on macOS.
- [x] **Documentation:** Updated `doc/HOWTO.md` with usage instructions.
- [x] **Skybox & Two-pass Rendering Stability**:
- [x] **Fixed Two-pass Rendering:** Implemented mandatory clear operations for color and depth when the skybox is absent, preventing black screens and depth validation errors.
- [x] **Implemented Rotating Skybox:** Added `inv_view_proj` to `GlobalUniforms` and updated the skybox shader to perform world-space ray unprojection, enabling correct rotation with the camera.
- [x] **Enhanced Procedural Noise:** Implemented a multi-octave Value Noise generator for higher-quality skybox textures.
- [x] **Scene Integrity:** Restored proper object indexing and removed redundant geometry, ensuring the floor grid and objects render correctly.
## Priority 1: 3D System Enhancements (Task #18)
**Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry.
- [ ] **Task #36: Blender Exporter:** Create a Python script (`tools/blender_export.py`) to export meshes/cameras/lights to a binary asset format.
- [ ] **Task #37: Asset Ingestion:** Update `asset_packer` to handle the new 3D binary format.
- [ ] **Task #38: Runtime Loader:** Implement a minimal C++ parser to load the scene data into the ECS/Renderer.
## Priority 2: WGSL Modularization (Task #50)
**Goal**: Refactor `ShaderComposer` and WGSL assets to support granular, reusable snippets and `#include` directives.
- [ ] **Task #50.1: Recursive Composition Support**:
- [ ] Update `ShaderComposer::Compose` to parse `#include "snippet_name"` directives in shader code.
- [ ] Implement recursive resolution (with cycle detection) to assemble the final shader.
- [ ] Update `test_shader_composer.cc` to verify recursive includes.
- [ ] **Task #50.2: Granular SDF Library**:
- [ ] Extract `sdSphere`, `sdBox`, `sdTorus`, `sdPlane` from `sdf_primitives.wgsl` into `math/sdf_shapes.wgsl`.
- [ ] Extract `get_normal_basic` into `math/sdf_utils.wgsl`.
- [ ] Extract `calc_shadow` into `render/shadows.wgsl`.
- [ ] **Task #50.3: Scene & Material Refactor**:
- [ ] Extract `map_scene` and `get_dist` logic into `render/scene_query.wgsl`.
- [ ] Extract lighting and material logic from `fs_main` into `render/lighting_pbr.wgsl` (or similar).
- [ ] **Task #50.4: Pipeline Update**:
- [ ] Update `Renderer3D` to use the new granular assets via `#include` in the main shader, reducing C++-side dependency lists.
## Priority 3: Physics & Collision (Task #49)
**Goal**: Implement a lightweight physics engine using SDFs and BVH acceleration. (See `doc/3D.md` for design).
- [ ] **Task #49.1: CPU-Side SDF Library**:
- [ ] Create `src/3d/sdf_cpu.h` implementing `sdSphere`, `sdBox`, `sdTorus`, `sdPlane` using `mini_math.h`.
- [ ] Implement `calc_normal` (numerical gradient) for these SDFs.
- [ ] Add unit tests in `src/tests/test_physics.cc` to verify CPU SDFs match ground truth.
- [ ] **Task #49.2: BVH Construction**:
- [ ] Define `BVHNode` struct in `src/3d/bvh.h` (shared/compatible with GPU layout).
- [ ] Implement `BVHBuilder::Build(const std::vector<Object3D>&)` in `src/3d/bvh.cc`.
- [ ] Implement `BVH::Query(AABB)` for broad-phase collision detection.
- [ ] Visualize BVH in `src/tests/test_3d_render.cc` (using `VisualDebug`).
- [ ] **Task #49.3: Physics Loop**:
- [ ] Create `PhysicsSystem` class in `src/3d/physics.h`.
- [ ] Implement `Update(dt)`: Integration -> Broad Phase -> Narrow Phase (SDF Probe) -> Resolution.
- [ ] Add `velocity`, `mass`, `restitution` fields to `Object3D`.
- [ ] Integrate into `test_3d_render.cc` main loop.
## Priority 4: Developer Tooling & CI
**Goal**: Improve developer workflows, code quality, and release processes.
*(No active tasks)*
## Phase 2: Size Optimization (Final Goal)
- [ ] **Task #34: Full STL Removal**: Replace all remaining `std::vector`, `std::map`, and `std::string` usage with custom minimal containers or C-style arrays to allow for CRT replacement. (Minimal Priority - deferred to end).
- [ ] **Task #22: Windows Native Platform**: Replace GLFW with direct Win32 API calls for the final 64k push.
- [ ] **Task #28: Spectrogram Quantization**: Research optimal frequency bin distribution and implement quantization.
- [ ] **Task #35: CRT Replacement**: investigation and implementation of CRT-free entry point.
## Future Goals
|