summaryrefslogtreecommitdiff
path: root/TODO.md
blob: 41ea008957bcb0c9314e520973494826a0a095bc (plain)
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
# To-Do List

This file tracks prioritized tasks with detailed attack plans.

## Priority 1: Final Build Stripping (Task #8)
**Goal:** Reduce binary size by removing all non-essential code under the `STRIP_ALL` macro.
- [ ] **Attack Plan - Rules:** Document stripping rules in `doc/STRIPPING.md`.
- [ ] **Attack Plan - Error Strings:** Wrap all non-critical `printf`, `std::cerr`, and error strings in `STRIP_ALL`.
- [ ] **Attack Plan - CLI Parsing:** Disable all non-essential CLI arguments (seek, resolution, debug) in `STRIP_ALL`.
- [ ] **Attack Plan - Struct Hygiene:** Remove debug-only fields (like `label` or `name`) from core structs.

## Priority 2: Platform & Code Hygiene (Task #20)
**Goal:** Clean up the codebase for easier cross-platform maintenance and CRT replacement.
- [ ] **Attack Plan - Header Consolidation:** Move all `#ifdef` logic for WebGPU headers and platform-specific shims into `src/platform.h`.
- [ ] **Attack Plan - Refactor platform_init:** Change `void platform_init(PlatformState* state, ...)` to `PlatformState platform_init(...)`.
- [ ] **Attack Plan - Unified Poll:** Incorporate `platform_get_time()` and `platform_get_aspect_ratio()` updates into `platform_poll()`.
- [ ] **Attack Plan - Standard Container Removal:** Replace `std::map`, `std::string`, and `std::vector` in performance-critical or size-sensitive paths with simpler C-style alternatives.

## Priority 3: Shader Optimization (Task #21)
**Goal:** Improve GPU performance and reduce shader source bloat.
- [ ] **Attack Plan - Normal Factorization:** Create a standard WGSL helper for normal calculation to avoid duplicate code in every effect.
- [ ] **Attack Plan - implement Tri-planar or bi-planar mapping: see https://iquilezles.org/articles/biplanar/ for instance

## Future Goals
- [ ] **Task #5: Spectrogram Editor**: Web-based visual tool for extreme audio compression.
- [ ] **Task #18: 3D System Enhancements**: Blender exporter and GPU-based BVH for complex scenes.
- [ ] **Task #22: Windows Native Platform**: Replace GLFW with direct Win32 API calls for the final 64k push.
- [ ] **Task #23: Shader Performance Analysis**: Analyze shader performance using Xcode Metal debugger on macOS.

## Phase 2: Advanced Size Optimization
- [ ] **Task #8**: Implement Final Build Stripping

## Recently Completed
- [x] **Tracker Asset Sample Integration**: Modified `assets/music.track` for `SAMPLE ASSET_NAME` syntax, updated `tools/tracker_compiler.cc` for parsing and code generation (including `init_asset_samples()`), and partially adjusted `src/audio/tracker.cc` for asset sample lookups.
- [x] **Minimal Audio Tracker**: Implemented a pattern and score-based audio tracker system. Details in `doc/TRACKER.md`.
- [x] **WGSL Library (Task 21.1)**: Implemented ShaderComposer for modular WGSL snippet management.
- [x] **Tight Ray Bounds (Task 21.2)**: Derived t_min and t_max from proxy hull hits via local-space ray-box intersection.
- [x] **Math & Unit Tests**: Added rigorous matrix inversion checks and ShaderComposer verification tests.
- [x] **High-DPI Fix**: Resolved viewport "squishing" via dynamic resolution uniforms and explicit viewports.
- [x] **Unified 3D Shadows**: Implemented robust SDF shadows across all objects using `inv_model` transforms.
- [x] **Tight Proxy Hulls**: Optimized Torus proxy geometry and debug wireframes.
- [x] **Procedural Textures**: Restored floor grid and SDF bump mapping.
- [x] **Code Hygiene**: Completed a project-wide code formatting pass with `clang-format`.

## In Progress
- [ ] **Tracker Asset Sample Integration - Finalization**:
    - **Compiler**: Finalize `tools/tracker_compiler.cc` generation of `TrackerEvent` data (asset names vs. indices) and `init_asset_samples()` function.
    - **Runtime**: Finalize `src/audio/tracker.cc` to handle `TrackerEvent` types correctly in `tracker_update`.
    - **Main Application**: Add call to generated `init_asset_samples()` in `src/main.cc`.
    - **Build & Verify**: Rebuild project and test asset sample integration.