From 7204ac562575b03e2709068531d47f87ff7229de Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Feb 2026 07:44:40 +0100 Subject: docs: Update project context and re-prioritize task list This commit finalizes the session by updating the project documentation to reflect recent progress and future priorities. - **Recently Completed**: Summarized the finalization of the audio tracker, implementation of build stripping (STRIP_ALL), and resolution of WebGPU stability issues on macOS. - **Re-prioritization**: Promoted 'Platform & Code Hygiene' (Task #20) to Priority 1 and established '3D System Enhancements' (Task #18) as Priority 2, focusing on Blender integration. - **Session Summary**: Appended a detailed summary of the session's key achievements to SESSION_NOTES.md. --- TODO.md | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 41ea008..d874bb1 100644 --- a/TODO.md +++ b/TODO.md @@ -2,49 +2,36 @@ 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) +## Priority 1: 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 2: 3D System Enhancements (Task #18) +**Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry. +- [ ] **Attack Plan - Blender Exporter:** Create a Python script (`tools/blender_export.py`) to export meshes/cameras/lights to a binary asset format. +- [ ] **Attack Plan - Asset Ingestion:** Update `asset_packer` to handle the new 3D binary format. +- [ ] **Attack Plan - Runtime Loader:** Implement a minimal C++ parser to load the scene data into the ECS/Renderer. + ## 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 +- [ ] **Attack Plan - Tri-planar Mapping:** Implement bi/tri-planar mapping for procedural textures to improve visual quality on complex SDFs. ## 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 #18-B: GPU BVH**: Optimize scene queries with a GPU-based BVH for the new 3D system. - [ ] **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 +- [ ] **Task #22**: Windows Native Platform (Win32 API) ## 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] **WebGPU Stability & macOS Fixes**: Resolved surface creation failures by adding `GLFW_EXPOSE_NATIVE_COCOA` and fixed validation errors in surface configuration and render pass attachments. +- [x] **Final Build Stripping (Task #8)**: Implemented `STRIP_ALL` macro to remove CLI parsing and debug info. Optimized macOS linker flags (`-dead_strip`). +- [x] **Tracker Asset Sample Integration**: Modified `assets/music.track` for `SAMPLE ASSET_NAME` syntax, updated `tools/tracker_compiler.cc` for parsing and code generation, and finalized `src/audio/tracker.cc` for unified asset sample pasting. - [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. -- cgit v1.2.3