diff options
Diffstat (limited to 'GEMINI.md')
| -rw-r--r-- | GEMINI.md | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -89,19 +89,23 @@ IMPORTANT: # ============================================ <state_snapshot> <overall_goal> - Multi-workspace demo system operational. Focus on Priority 1: Spectral Brush Editor (Task #5). + Produce a cross-platform (Windows, macOS, Linux) 64-kilobyte demoscene production. This is achieved through a C++ codebase utilizing WebGPU for graphics (with a hybrid SDF/rasterization pipeline) and a real-time procedural audio engine for sound, with a heavy focus on size-optimization at all stages. </overall_goal> <active_constraints> - - All tests passing (36/36 - 100%) - - Size-sensitive: 64k target + - All tests passing (36/36 - 100%). + - Strict 64k final binary size target. + - Adherence to project coding style and contribution guidelines is mandatory. </active_constraints> <key_knowledge> - - Workspace system complete (Task #77): Easy switching with -DDEMO_WORKSPACE=<name> - - CNN post-processing validated in demo (CNNEffect working) - - Uniform buffer guidelines established (doc/UNIFORM_BUFFER_GUIDELINES.md) - - 3D: Binary scene loader operational, shader SDF integration pending + - **Workspace System:** The project is organized into self-contained workspaces (e.g., `workspaces/main`, `workspaces/test`) managed by a `workspace.cfg` file, separating demo-specific content from a `common/` directory that holds shared shaders and resources. Selection is done at build time with `-DDEMO_WORKSPACE=<name>`. + - **Build & Asset Pipeline:** A modular CMake system orchestrates the build. It uses host-native tools (`asset_packer`, `seq_compiler`, `tracker_compiler`) to parse manifest files (`assets.txt`, `timeline.seq`, `music.track`) and compile assets directly into the binary as C++ data, including procedural asset generation. + - **Audio Engine:** A real-time, sample-accurate audio engine with a tracker system for sequencing patterns from `.track` files. It features procedural synthesis from spectrograms (FFT-based IDCT), variable tempo that is decoupled from visual timing, and an abstracted backend for testing and offline rendering (`WavDumpBackend`). + - **Graphics & Rendering:** The renderer uses WebGPU (wgpu-native) and WGSL shaders. It employs a hybrid technique, rasterizing proxy geometry (cubes) and then performing SDF raymarching within the fragment shader. The 3D system supports BVH acceleration, and there's a pipeline for importing OBJ models. + - **Sequence & Timing:** Visuals are defined in `.seq` files using a beat-based timeline that is compiled into physical seconds. Shaders receive a `CommonPostProcessUniforms` buffer containing both physical time (`time`) for constant-speed animations and musical time (`beat_time`, `beat_phase`) for syncing with the audio playback clock. + - **CNN Post-Processing:** The project features a sophisticated CNN post-processing pipeline (CNNv2) for visual stylization. This includes a full Python/PyTorch training toolchain, a binary weight format, and a WebGPU-based validation tool. The network uses 7D parametric static features (RGBD, UV, sin, bias) for rich, position-aware effects. + - **Development Workflow:** There is a strong emphasis on tooling and process, including a visual timeline editor, audio analysis tools, a web-based CNN debugger, strict coding standards enforced by `clang-format`, and a comprehensive pre-commit script (`./scripts/check_all.sh`). </key_knowledge> <artifact_trail> @@ -111,15 +115,16 @@ IMPORTANT: </artifact_trail> <recent_actions> - - Completed Task #77: Workspace System - - Completed Task #75: WGSL Uniform Buffer Validation - - Completed Task #74: DemoEffectsTest SEGFAULT fix + - **File Hierarchy Cleanup:** Major reorganization of the project structure, establishing the `workspaces/` and `common/` directories and eliminating ~100 redundant files (especially shaders). + - **CNNv2 Training Pipeline:** Fixed critical checkpointing bugs and streamlined the output of the training scripts for faster iteration. + - **Effect Render API Refactor:** Simplified the `Effect::render` API and fixed uniform initialization bugs across 19 effects. + - **CNN Shader Testing Tool:** Implemented `tools/cnn_test` for offline GPU-accelerated validation of trained CNN models. </recent_actions> <task_state> 1. [IN PROGRESS] Task #5: Spectral Brush Editor (Priority 1) - 2. [COMPLETED] Task #77: Workspace System - 3. [PENDING] Task #18: 3D System Enhancements (Priority 3) - 4. [RECURRENT] Task #50: WGSL Modularization (Priority 4) + 2. [PENDING] Task #18: 3D System Enhancements (Priority 4) + 3. [RECURRENT] Task #50: WGSL Modularization (Priority 4) + 4. [PENDING] Tracker Humanization & Sample Offset (Priority 3) </task_state> </state_snapshot>
\ No newline at end of file |
