From 180b0961a2216279024b4d35229d105d95a61878 Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 6 Feb 2026 08:29:34 +0100 Subject: docs: Update project documentation and regenerate assets Updated PROJECT_CONTEXT.md and TODO.md to include new critical tasks and reflect changes in task prioritization. Modified doc/3D.md to adjust task descriptions. Modified doc/CONTRIBUTING.md to incorporate the new in-memory replacement rule. Regenerated asset files (src/generated/assets.h, src/generated/assets_data.cc, src/generated/test_assets.h, src/generated/test_assets_data.cc) to reflect any changes in asset definitions. Removed temporary changes to GEMINI.md and HANDOFF.md. --- TODO.md | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 69bb111..da556b8 100644 --- a/TODO.md +++ b/TODO.md @@ -18,8 +18,8 @@ This file tracks prioritized tasks with detailed attack plans. - [x] **Integration & Visualization**: Added `velocity`, `mass`, `is_static` to `Object3D`. Integrated physics loop into `test_3d_render.cc` and added BVH wireframe visualization to `VisualDebug`. - [x] **Audio Playback Debugging & Core Audio Optimization**: - - [x] **Core Audio Timing Fix**: Resolved stop-and-go audio glitches caused by timing mismatch. Core Audio optimized for 44.1kHz (10ms periods), but 32kHz system expected ~13.78ms callbacks. Added `allowNominalSampleRateChange = TRUE` to force OS-level 32kHz native and `performanceProfile = conservative` for 4096-frame buffers (128ms). Result: Stable ~128ms callbacks, <1ms jitter, zero underruns. - - [x] **Ring Buffer Capacity**: Increased from 200ms to 400ms (25,600 samples) for tempo scaling headroom. Added bounds checking with abort() on violations. + - [x] **Core Audio Timing Fix**: Resolved stop-and-go audio glitches caused by timing mismatch. Core Audio optimized for 44.1kHz (10ms periods), but our 32kHz system expected uniform ~13.78ms callbacks, causing resampling jitter. Fix: Added `allowNominalSampleRateChange = TRUE` to force OS-level 32kHz native and `performanceProfile = conservative` for 4096-frame buffers (128ms). Result: Stable ~128ms callbacks, <1ms jitter, zero underruns. + - [x] **Ring Buffer Capacity**: Increased from 200ms to 400ms (25,600 samples) to handle tempo scaling headroom. Added comprehensive bounds checking with abort() on violations. - [x] **Tempo-Scaled Buffer Fill**: Fixed critical bug where buffer pre-fill didn't scale dt by tempo (`audio_render_ahead(g_music_time, dt * g_tempo_scale)`). Buffer now maintains 400ms fullness during 2.0x acceleration. - [x] **Extensive Diagnostics**: Added high-resolution timing tracking (clock_gettime), callback interval measurement, buffer level monitoring, underrun detection. All under conditional compilation for future debugging. @@ -86,7 +86,7 @@ This file tracks prioritized tasks with detailed attack plans. - [x] **Task #51.1: Audio Backend Abstraction**: - [x] **Interface Created**: Defined `AudioBackend` interface in `src/audio/audio_backend.h` with hooks for voice triggering and frame rendering. - - [x] **Production Backend**: Moved miniaudio implementation to `MiniaudioBackend` class, maintaining backward compatibility. + - [x] **Production Backend**: Moved miniaudio implementation from `audio.cc` to `MiniaudioBackend` class, maintaining backward compatibility. - [x] **Audio Refactoring**: Updated `audio.cc` to use backend abstraction with automatic fallback to `MiniaudioBackend`. - [x] **Event Hooks**: Added time tracking to `synth.cc` with `on_voice_triggered()` callbacks (guarded by `!STRIP_ALL`). - [x] **Verification Test**: Created `test_audio_backend.cc` to verify backend injection and event recording work correctly. @@ -116,7 +116,7 @@ This file tracks prioritized tasks with detailed attack plans. - [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] **Implemented Rotating Skybox:** Added `inv_view_proj` to `GlobalUniforms` and updated the skybox shader to perform world-space ray unprojection (`inv_view_proj`), 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. @@ -137,13 +137,31 @@ This file tracks prioritized tasks with detailed attack plans. - **Result**: Fully functional timeline editor ready for production use. Phase 1.1 complete (basic editing, snap-to-beat, waveform). Phase 1.2 (Add Effect button) and Phase 2.5 (music.track visualization) documented in ROADMAP.md. - **Files**: `tools/timeline_editor/index.html` (~1200 lines), `README.md`, `ROADMAP.md` (3 phases, 117-161 hour estimate). +## Critical Fixes + +- [ ] **Task A: Fix Test Mesh** + - [ ] Investigate and fix bad bounding box (clipping at the bottom) for `dodecahedron.obj`. + - [ ] Investigate and fix strange normals for `dodecahedron.obj`. + - [ ] Fix incorrect shadows on the floor plane. + +- [ ] **Task B: Move platform-specific conditional code into a single header location** + - [ ] Abstract out `#if defined(DEMO_CROSS_COMPILE_WIN32)` statements from core `.cc` and `.h` sources. + - [ ] Centralize platform-specific code and `#ifdef`s into `platform.h` or equivalent. + - [ ] Address `str_view()` calls that cause compilation breaks. + +- [ ] **Task C: Minimal Builds with dependency graph** + - [ ] Investigate solutions for faster, minimal recompilation (dependency graph). + - [ ] Plan CMake configuration modifications. + - [ ] Implement the solution. + - [ ] Ensure Gemini/Claude are aware of and use the dependency graph. + ## Priority 2: 3D System Enhancements (Task #18) **Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry. -- [ ] **Task #18.0: Basic OBJ Asset Pipeline** (New) - - [ ] Define `ASSET_MESH` type in `asset_manager`. - - [ ] Update `asset_packer` to parse simple `.obj` files (positions, normals, UVs) and serialize them. - - [ ] Update `Renderer3D` to handle `ObjectType::MESH` in the rasterization path. -- [ ] **Task #36: Blender Exporter:** Create a Python script (`tools/blender_export.py`) to export meshes/cameras/lights to a binary asset format. +- [x] **Task #18.0: Basic OBJ Asset Pipeline** (New) + - [x] Define `ASSET_MESH` type in `asset_manager`. + - [x] Update `asset_packer` to parse simple `.obj` files (positions, normals, UVs) and serialize them. + - [x] Update `Renderer3D` to handle `ObjectType::MESH` in the rasterization path. +- [ ] **Task #36: Blender Exporter:** Create a Python script (`tools/blender_export.py`) to export meshes/cameras/lights to a binary asset format. (Deprioritized) - [ ] **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. @@ -178,10 +196,18 @@ This file tracks prioritized tasks with detailed attack plans. ## Future Goals & Ideas (Untriaged) +- [ ] **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. +- [ ] **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. - [ ] **Task #59: Comprehensive RNG Library**: Add WGSL snippets for float/vec2/vec3 noise (Perlin, Gyroid, etc.) and random number generators. - [ ] **Task #60: OOP Refactoring**: Investigate if more C++ code can be made object-oriented without size penalty (vs functional style). - [ ] **Task #61: GPU Procedural Generation**: Implement system to generate procedural data (textures, geometry) on GPU and read back to CPU. +- [ ] **Task #62: Physics Engine Enhancements (PBD & Rotation)**: + - [ ] **Task #62.1: Quaternion Rotation**: Implement quaternion-based rotation for `Object3D` and incorporate angular momentum into physics. + - [ ] **Task #62.2: Position Based Dynamics (PBD)**: Refactor solver to re-evaluate velocity after resolving all collisions and constraints. +- [ ] **Task #63: Refactor large files**: Split `src/3d/renderer.cc` (currently > 500 lines) into sub-functionalities. --- @@ -434,4 +460,4 @@ tools/timeline_editor/ --- -## Future Goals +## Future Goals \ No newline at end of file -- cgit v1.2.3