diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-03 11:00:50 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-03 11:00:50 +0100 |
| commit | 8c3c220ae0eb62488c28318b0394007170df0e1d (patch) | |
| tree | 5de199cef5863df1dded18f8b69ba1a1e5b47f0a | |
| parent | d0cd39ca4d4fc7cd79b85342d4cd312ba378dbc0 (diff) | |
docs: Finalize documentation and store project statev0.1
Consolidated 'Recently Completed' sections in PROJECT_CONTEXT.md and TODO.md. Verified all recent tasks (Build System, Asset Pipeline, Shader Testing) are correctly recorded. Making a final commit to preserve current progress before moving to Platform Hygiene.
| -rw-r--r-- | PROJECT_CONTEXT.md | 29 | ||||
| -rw-r--r-- | TODO.md | 17 |
2 files changed, 21 insertions, 25 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index 7fbc3a5..dea5a36 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -32,6 +32,18 @@ Style: - **Asset Pipeline Improvement**: Created a robust `gen_spectrograms.sh` script to automate the conversion of `.wav` and `.aif` files to `.spec` format, replacing the old, fragile script. Added 13 new drum and bass samples to the project. - **Build System Consolidation (Task #25)**: Modularized the build by creating subsystem libraries (audio, gpu, 3d, util, procedural) and implemented helper macros to reduce boilerplate in `CMakeLists.txt`. This improves build maintenance and prepares for future CRT replacement. - **Asset System Robustness**: Resolved "static initialization order fiasco" by wrapping the asset table in a "Construct On First Use" getter (`GetAssetRecordTable()`), ensuring assets are available during dynamic global initialization (e.g., shader strings). +- **Shader Asset Integration (Task #24)**: Extracted all hardcoded WGSL strings into `.wgsl` assets, registered them in `demo_assets.txt`, and updated `Renderer3D`, `VisualDebug`, and `Effects` to use `GetAsset` and `ShaderComposer`. +- **WebGPU Stabilization**: Resolved `WGPUSurface` creation failures on macOS by adding platform-specific `GLFW_EXPOSE_NATIVE_COCOA` definitions and fixed validation errors in the render pass configuration. +- **Final Build Stripping (Task #8)**: Implemented the `STRIP_ALL` macro to remove non-essential code (CLI parsing, debug labels, iostream) and refined size optimization flags (`-dead_strip`) for macOS. +- **Minimal Audio Tracker (Task 21.3)**: Finalized a pattern-based audio tracker supporting both procedural notes and asset-based spectrograms with a unified "one-voice-per-pattern" pasting strategy. +- **WGSL Library (Task 21.1)**: Implemented `ShaderComposer` for modular WGSL snippet management. +- **Tight Ray Bounds (Task 21.2)**: Implemented local-space ray-box intersection to optimize SDF raymarching. +- **High-DPI Fix**: Resolved viewport "squishing" via dynamic resolution uniforms and explicit viewports. +- **Unified 3D Shadows**: Implemented robust SDF shadows across all objects using `inv_model` transforms. + +--- +## Next Up +- **Task #20: Platform & Code Hygiene** - [ ] Gather all cross-compile and platform-specific conditional code into `platform.h`. - [ ] Refactor `platform_init()` and `platform_poll()` for cleaner abstraction. - [ ] Consolidate WebGPU header inclusions. @@ -41,8 +53,8 @@ Style: - [ ] **Blender Exporter**: Create script to export scenes to internal binary format. - [ ] **Asset Pipeline**: Update `asset_packer` and runtime loader for 3D scenes. -### Future Goals -- **Task #26: Shader Asset Testing & Validation**: Develop comprehensive tests for `ShaderComposer` and WGSL asset loading/composition. +--- +## Future Goals - **Task #5: Implement Spectrogram Editor** - [ ] Develop a web-based tool (`tools/editor`) for creating and editing `.spec` files visually. - **Task #21: Shader Optimization** @@ -54,17 +66,6 @@ Style: - [ ] Quantize spectrograms to logarithmic frequency and uint16_t. - [ ] CRT replacement investigation. -### Recently Completed -- **Asset System Robustness**: Resolved "static initialization order fiasco" by wrapping the asset table in a "Construct On First Use" getter (`GetAssetRecordTable()`), ensuring assets are available during dynamic global initialization (e.g., shader strings). -- **Shader Asset Integration (Task #24)**: Extracted all hardcoded WGSL strings into `.wgsl` assets, registered them in `demo_assets.txt`, and updated `Renderer3D`, `VisualDebug`, and `Effects` to use `GetAsset` and `ShaderComposer`. -- **WebGPU Stabilization**: Resolved `WGPUSurface` creation failures on macOS by adding platform-specific `GLFW_EXPOSE_NATIVE_COCOA` definitions and fixed validation errors in the render pass configuration. -- **Final Build Stripping (Task #8)**: Implemented the `STRIP_ALL` macro to remove non-essential code (CLI parsing, debug labels, iostream) and refined size optimization flags (`-dead_strip`) for macOS. -- **Minimal Audio Tracker (Task 21.3)**: Finalized a pattern-based audio tracker supporting both procedural notes and asset-based spectrograms with a unified "one-voice-per-pattern" pasting strategy. -- **WGSL Library (Task 21.1)**: Implemented `ShaderComposer` for modular WGSL snippet management. -- **Tight Ray Bounds (Task 21.2)**: Implemented local-space ray-box intersection to optimize SDF raymarching. -- **High-DPI Fix**: Resolved viewport "squishing" via dynamic resolution uniforms and explicit viewports. -- **Unified 3D Shadows**: Implemented robust SDF shadows across all objects using `inv_model` transforms. - --- *For a detailed list of all completed tasks, see the git history.* @@ -90,4 +91,4 @@ Style: - **Synthesis**: Real-time additive synthesis from spectrograms via IDCT. - **Dynamic Updates**: Double-buffered spectrograms for live thread-safe updates. - **Procedural Library**: Melodies and spectral filters (noise, comb) generated at runtime. -- **Pattern and loop**: spectrograms grouped as pattern and loops, and modifiers can be applied to loops (randomize, accents, etc.) +- **Pattern and loop**: spectrograms grouped as pattern and loops, and modifiers can be applied to loops (randomize, accents, etc.)
\ No newline at end of file @@ -10,29 +10,24 @@ This file tracks prioritized tasks with detailed attack plans. - [x] **Asset Pipeline Improvement**: Automated audio asset conversion with a new `gen_spectrograms.sh` script and added 13 new samples to the asset list. - [x] **Build System Consolidation (Task #25)**: Modularized the build into subsystem libraries and implemented helper macros to simplify CMake maintenance. - [x] **Asset System Robustness**: Fixed static initialization order issues by wrapping the asset table in a singleton-style getter (`GetAssetRecordTable()`). +- [x] **Shader Asset Integration (Task #24)**: Extracted hardcoded shaders to `.wgsl` assets, updated `asset_packer` for string safety, and refactored C++ code to use `GetAsset`. +- [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. + +## 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 3: 3D System Enhancements (Task #18) +## 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. ## Future Goals -- [ ] **Task #26: Shader Asset Testing & Validation**: - - [ ] **Attack Plan - `ShaderComposer` Unit Tests**: Add tests to `test_shader_composer.cc` to verify correct snippet registration, retrieval, and composition for various WGSL shader assets. - - [ ] **Attack Plan - Asset Content Validation**: Implement checks (e.g., in `test_assets.cc`) to ensure loaded WGSL shader assets are non-empty and contain expected entry points (`vs_main`, `fs_main`, `main` for compute shaders). - - [ ] **Attack Plan - Runtime Shader Validation**: Integrate basic validation steps into the rendering pipeline (e.g., in `gpu.cc`) to log warnings or errors if compiled shader modules are invalid, providing earlier feedback than WebGPU validation errors. - [ ] **Task #21: Shader Optimization**: Normal factorization and Tri-planar mapping. - [ ] **Task #5: Spectrogram Editor**: Web-based visual tool for extreme audio compression. - [ ] **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. - -## Recently Completed -- [x] **Asset System Robustness**: Fixed static initialization order issues by wrapping the asset table in a singleton-style getter (`GetAssetRecordTable()`). -- [x] **Shader Asset Integration (Task #24)**: Extracted hardcoded shaders to `.wgsl` assets, updated `asset_packer` for string safety, and refactored C++ code to use `GetAsset`. -- [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. +- [ ] **Task #23: Shader Performance Analysis**: Analyze shader performance using Xcode Metal debugger on macOS.
\ No newline at end of file |
