summaryrefslogtreecommitdiff
path: root/workspaces/main
AgeCommit message (Collapse)Author
9 hoursfeat(cnn_v3): wire trained weights into CNNv3Effect + add timeline test sequenceskal
- CNNv3Effect constructor loads ASSET_WEIGHTS_CNN_V3 via GetAsset on startup - seq_compiler.py: CLASS_TO_HEADER supports full #include paths for cnn_v3/ classes - timeline.seq: add cnn_v3_test sequence at 48s (GBufferEffect → CNNv3Effect) - test_cnn_v3_parity: zero_weights test now explicitly uploads zeros to override asset handoff(Gemini): CNNv3Effect ready; export weights to workspaces/main/weights/ and seek to 48s to test
10 hoursfeat(cnn_v3): add weight assets to assets.txt, update HOW_TO_CNN export docsskal
- Add WEIGHTS_CNN_V3 and WEIGHTS_CNN_V3_FILM_MLP to workspaces/main/assets.txt - Add opencv-python and pillow to export_cnn_v3_weights.py uv inline deps - Update HOW_TO_CNN.md §3 export target → workspaces/main/weights/ - Update HOW_TO_CNN.md §4 weight loading → SafeGetAsset (asset system) handoff(Gemini): cnn_v3 weight assets registered; export and C++ load path documented
38 hoursfeat(cnn_v3): Phase 3 complete — WGSL U-Net inference shadersskal
5 compute shaders + cnn_v3/common snippet: enc0: Conv(20→4,3×3) + FiLM + ReLU full-res enc1: AvgPool + Conv(4→8,3×3) + FiLM + ReLU half-res bottleneck: AvgPool + Conv(8→8,1×1) + ReLU quarter-res dec1: NearestUp + cat(enc1) + Conv(16→4) + FiLM half-res dec0: NearestUp + cat(enc0) + Conv(8→4) + FiLM + Sigmoid full-res Parity rules: zero-pad conv, AvgPool down, NearestUp, FiLM after conv+bias, skip=concat, OIHW weights+bias layout. Matches PyTorch train_cnn_v3.py forward() exactly. Registered in workspaces/main/assets.txt + src/effects/shaders.cc. Weight layout + Params struct documented in cnn_v3/docs/HOWTO.md §7. Next: Phase 4 — C++ CNNv3Effect + FiLM uniform upload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 daysfeat(cnn_v3): Phase 1 complete - GBufferEffect integrated + HOWTO playbookskal
- Wire GBufferEffect into demo build: assets.txt, DemoSourceLists.cmake, demo_effects.h, shaders.h/cc. ShaderComposer::Compose() applied to gbuf_raster.wgsl (resolves #include "common_uniforms"). - Add GBufferEffect construction test. 35/35 passing. - Write cnn_v3/docs/HOWTO.md: G-buffer wiring, training data prep, training plan, per-pixel validation workflow, phase status table, troubleshooting guide. - Add project hooks: remind to update HOWTO.md on cnn_v3/ edits; warn on direct str_view(*_wgsl) usage bypassing ShaderComposer. - Update PROJECT_CONTEXT.md and TODO.md: Phase 1 done, Phase 3 (WGSL U-Net shaders) is next active. handoff(Gemini): CNN v3 Phase 3 is next - WGSL enc/dec/bottleneck/FiLM shaders in cnn_v3/shaders/. See cnn_v3/docs/CNN_V3.md Architecture section and cnn_v3/docs/HOWTO.md section 3 for spec. GBufferEffect outputs feat_tex0 + feat_tex1 (rgba32uint, 20ch, 32 bytes/pixel). C++ CNNv3Effect (Phase 4) takes those as input nodes.
12 dayschange dither_c64() signature to take 'dimension' directlyskal
12 daysntsc: factor common code into snippet; add RGB and YIQ input variantsskal
- Extract shared NTSC logic into render/ntsc_common.wgsl snippet - sample_ntsc_signal() hook decouples input format from processing - ntsc_rgb.wgsl: RGB input (converts via rgba_to_luma_chroma_phase) - ntsc_yiq.wgsl: YIQ passthrough for RotatingCube output - Add NtscYiq WgslEffect thin wrapper; register both in tests handoff(Claude): NTSC refactor complete; NtscYiq ready for timeline use with RotatingCube. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 daysfeat: register math/color_c64 snippet in ShaderComposerskal
14 daysntsc effect for realskal
2026-03-08fix: register debug/debug_print snippet in ShaderComposerskal
Add SHADER_DEBUG_DEBUG_PRINT to assets.txt and register it as "debug/debug_print" in InitShaderComposer() so ntsc.wgsl #include works. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08feat: Implement dual-mode asset loading and update documentationskal
This commit introduces a dual-mode asset loading system to enhance developer workflow and optimize release builds. Key changes include: - **Dual-Mode Asset Loading:** Assets are now loaded from disk during development (when is OFF) for faster iteration, particularly for heavy assets like and files. For release builds ( ON), all assets are embedded directly into the binary, ensuring a single, self-contained executable. - **Explicit Asset Typing:** Replaced generic asset type with specific types (, , , , ) in and the enum in for clearer categorization and more robust processing. - **Build System Integration:** Modified to pass a flag to in development builds. - **Asset Packer Updates:** now generates file paths for disk-loaded assets and embeds data for others based on the build mode. - **Asset Manager Enhancements:** includes new logic in for loading and caching disk-based assets and updates to for proper memory deallocation. - **Documentation:** Updated to reflect the new asset nomenclature and dual-mode loading strategy. - **Project Rules:** Added a concise rule to mandating top-level documentation updates for medium/large sub-system changes. handoff(Gemini): Implemented dual-mode asset loading and updated documentation.
2026-03-07feat(effects): add Ntsc post-process effect with fisheye distortionskal
WGSL-only WgslEffect implementing barrel/fisheye distortion, RGB chroma separation, scanlines, per-pixel temporal noise, rolling jitter line, vignette, and warm NTSC phosphor tint. Applied across all main sequences. handoff(Gemini): Ntsc effect added; 13 effects total, 35+1 tests expected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06feat(effects): add Scratch post-process effect with reusable scratch_lines ↵skal
snippet - src/shaders/render/scratch_lines.wgsl: reusable WGSL snippet registered as "render/scratch_lines"; call scratch_lines(uv, resolution, time)->f32 from any effect. Uses hash_1f from math/noise; 8 lines/frame, ~24fps flicker. - src/effects/scratch.{wgsl,h,cc}: thin Scratch effect wrapping the snippet. - Applied to "intro" and "rotating_cube" sequences as the final step. - 35/35 tests passing. handoff(Gemini): Scratch effect added. render/scratch_lines snippet is reusable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05fix(audio): OLA encoder never ran; version never propagated to decoderskal
Two bugs kept the v2 OLA path permanently disabled: 1. SpectrogramResourceManager::load_asset() never set spec.version from SpecHeader::version — all .spec assets loaded with version=0, so ola_mode was always false in the voice. 2. spectool analyze_audio() used non-overlapping chunks (stride=DCT_SIZE), hamming_window_512, and hardcoded header.version=1 — OLA analysis was never implemented in the encoder. Fixes: propagate header->version in load_asset(); switch spectool to OLA_HOP_SIZE stride, hann_window_512, and SPEC_VERSION_V2_OLA. Regenerated all .spec files. handoff(Gemini): OLA enc/dec chain now correct end-to-end. .spec files are v2 (50% overlap, Hann). No API changes; 33/34 tests pass (WavDumpBackendTest pre-existing failure unrelated). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05music = one big drum sample (for now!)skal
2026-03-03chore(audio): regenerate .spec files as v2 (OLA, Hann, hop=256)skal
handoff(Gemini): all .spec files rebuilt with v2 encoder; click-free OLA synthesis active.
2026-03-03feat(assets): replace is_procedural/is_gpu_procedural bools with AssetType ↵skal
enum, add MP3 type - Add AssetType enum {STATIC, PROC, PROC_GPU, MP3} to AssetRecord - Add GetAssetType() API to asset_manager.h/cc - asset_packer: parse 'MP3' compression keyword in assets.txt - tracker: remove magic-byte is_mp3_asset(); use GetAssetType() instead - assets.txt: NEVER_MP3 now uses 'MP3' compression type - doc/ASSET_SYSTEM.md: rewritten to document new types and API handoff(Gemini): AssetType enum landed; MP3 detection is now explicit via asset metadata.
2026-03-02add mp3 assetskal
2026-02-28refactor(effects): co-locate effect WGSL shaders with their .h/.cc in ↵skal
src/effects/ Move 13 effect-specific shaders from workspaces/main/shaders/ to src/effects/ so each effect's .h, .cc, and .wgsl are together. Update assets.txt paths in both main and test workspaces. Update EFFECT_WORKFLOW.md to reflect new location. Shared/reusable snippets remain in src/shaders/. handoff(Gemini): shaders moved; src/effects/ now has .h, .cc, and .wgsl per effect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28fix(scene2): rewrite broken WGSL shader to fix test_demo_effects crashskal
scene2.wgsl was invalid WGSL (mixed GLSL syntax, wrong function signatures, undeclared variables, no return statement). Rewrote as valid WGSL preserving the original volumetric cloud raymarching logic. 11/11 effects now pass. handoff(Claude): scene2.wgsl fixed, all tests green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28fix(tools/shadertoy): fix Next Steps instructions and update EFFECT_WORKFLOW.mdskal
- Fix assets.txt path: shaders/xxx.wgsl (not ../../src/shaders/) - Fix shader output path to workspaces/main/shaders/ - Step 5: reference cmake/DemoSourceLists.cmake COMMON_GPU_EFFECTS (not CMakeLists.txt GPU_SOURCES) - Add step for test_demo_effects.cc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28refactor: move common/shaders/ to src/shaders/skal
Relocates shared WGSL shaders under src/ where all source code lives, eliminating the top-level common/ directory. - Update asset references in workspaces/main/assets.txt and workspaces/test/assets.txt - Update docs: PROJECT_CONTEXT.md, ARCHITECTURE.md, WORKSPACE_SYSTEM.md, SHADER_REUSE_INVESTIGATION.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28remove SDFEffect base class and sdf_test, update SDF_EFFECT_GUIDEskal
- Delete unused SDFEffect base class (src/gpu/sdf_effect.h) - Delete sdf_test.wgsl and SHADER_SDF_TEST from assets.txt - Rewrite SDF_EFFECT_GUIDE.md based on Scene1 canonical pattern: correct bindings (2/3), vec4f syntax, UniformsSequenceParams - Fix missing newline at end of gpu.h handoff(Claude): SDF cleanup done, guide updated to match current Effect API
2026-02-28replace wgsl type: vec4<f32> -> vec4f ..skal
2026-02-28fix(shaders): deduplicate VertexOutput/vs_main via render/fullscreen_uv_vs ↵skal
snippet - Fix vs_main return type (VertexOutput, not vec4<f32>) - Fix #include paths in passthrough, gaussian_blur, heptagon, combined_postprocess - ShaderComposer: assert + suggest correct path on missing #include (non-STRIP_ALL) - VerifyIncludes: upgrade WARNING to ERROR + assert, add "did you mean?" hint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21docs: Update WGSL files to use shorter vector and matrix type aliasesskal
Replaced `vec2<f32>`, `vec3<f32>`, `vec4<f32>`, `mat4x4<f32>`, and `mat3x3<f32>` with their shorter aliases `vec2f`, `vec3f`, `vec4f`, `mat4x4f`, and `mat3x3f` across all WGSL shader files in `workspaces/main/shaders/`. This improves readability and aligns with modern WGSL conventions.
2026-02-21refactor(wgsl): Use vec*f alias for vector typesskal
Replaces all instances of `vec<f32>` with the more concise `vec*f` alias (e.g., `vec3f`) across all `.wgsl` shaders. This improves readability and aligns with common graphics programming conventions. Also adds a new coding style rule to `doc/CODING_STYLE.md` to enforce this standard going forward. Finally, this commit fixes a build error in `test_effect_base.cc` by replacing a call to the non-existent `wgpuDeviceTick` with `wgpuDevicePoll`, which resolves the test failure.
2026-02-21split raymarching.wgsl in two: with id, or without id.skal
2026-02-21refactor(wgsl): Factorize getScreenCoord helperskal
Factorizes the screen coordinate calculation from scene1.wgsl into a reusable getScreenCoord function in common/shaders/math/common_utils.wgsl. This improves code reuse and simplifies fragment shaders.
2026-02-21refine scene1 shaderskal
2026-02-20fix(scene1): refactor render0/render1 to accept Ray structskal
Pass Ray directly instead of separate ro/rd params; minor cleanup (remove redundant consts, cache ray.direction.y). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20feat(scene1): replace ad-hoc camera with CameraParams uniformskal
Build camera via mat4::look_at + inverse in scene1_effect.cc, upload as CameraParams at binding 3. Shader uses getCameraRay() from camera_common. Enable camera_common snippet registration in shaders.cc. handoff(Claude): Scene1 camera now driven by CameraParams uniform; fov=TAU/6 (60° vFOV) matches original tan(PI/3) parameterization. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20feat(sequence): port Scene1Effect + fix seq_compiler absolute time bugskal
- Add Scene1 effect: raymarching cube+sphere+ground (reflections, shadows) - Fix scene1.wgsl: binding 0→2, CommonUniforms→UniformsSequenceParams - Replace Heptagon+Placeholder stub in heptagon_scene with Scene1 - Fix seq_compiler.py: emit seq.start_time+effect.start/end (absolute times) so dispatch_render active check works correctly for all sequences Bug: effects in sequences starting after t=0 were never active because local times (e.g. 0-8) never satisfied params.time<end for absolute time 20+. 34/34 tests passing. handoff(Gemini): seq_compiler now emits absolute effect times. All existing sequences affected — verify visual output across the full timeline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-16fix: add sequence index to generated class namesskal
Prevents compilation errors when multiple sequences share the same name. Compiler now appends _{index}_Sequence for unique class names. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16add back obj filesskal
2026-02-16refactor: remove 'Effect' suffix from effect names in timeline.seq filesskal
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16fix: add missing SHADER_FLASH asset to main workspaceskal
FlashEffect requires flash.wgsl shader in main workspace. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16refactor: remove v2 versioning artifacts, establish Sequence as canonical systemskal
Complete v1→v2 migration cleanup: rename 29 files (sequence_v2→sequence, effect_v2→effect, 14 effect files, 8 shaders, compiler, docs), update all class names and references across 54 files. Archive v1 timeline. System now uses standard naming with all versioning removed. 30/34 tests passing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16feat(sequence): port hybrid_3d_effect to v2skal
- Add Hybrid3DEffectV2 with Renderer3D integration - Simplified scene (1 center cube + 8 surrounding objects) - Use NodeRegistry for depth buffer - Update timeline_v2.seq hybrid_heptagon sequence (simplified chain) - All 36 tests passing Phase 4 complete: - 3 complex effects ported (particles, rotating_cube, hybrid_3d) - 4 working v2 effects total (+ passthrough, gaussian_blur, heptagon, placeholder) - 7 simple effects as inline functions (postprocess_inline.wgsl) - V2 timeline integrated with build system - All sequences functional with v2 effects handoff(Claude): Phase 4 effect ports complete
2026-02-16feat(sequence): port rotating_cube_effect to v2skal
- Add RotatingCubeEffectV2 with 3D rendering + depth buffer - Create rotating_cube_v2.wgsl (hardcoded cube geometry) - Simplified: no auxiliary mask texture dependency - Declare depth node via NodeRegistry - Update timeline_v2.seq rotating_cube sequence - Add shader exports to shaders.{h,cc} - All 36 tests passing handoff(Claude): RotatingCube v2 complete, hybrid_3d next
2026-02-16feat(sequence): port particles_effect to v2skal
- Add ParticlesEffectV2 with compute + render passes - Create particle_compute_v2.wgsl and particle_render_v2.wgsl - Use UniformsSequenceParams for beat-synchronized particles - Update timeline_v2.seq particles sequence (simplified 2-effect chain) - Add shader exports to shaders.{h,cc} - All 36 tests passing handoff(Claude): Particles v2 complete, rotating_cube next
2026-02-16feat(sequence): integrate v2 timeline with build systemskal
- Update main workspace to use timeline_v2.seq - Add SEQ_COMPILER_V2 using Python script (seq_compiler_v2.py) - Update DemoCodegen to use v2 compiler for main timeline - Add v1 compatibility stubs (LoadTimeline, GetDemoDuration) - Demo builds and links successfully - All tests passing (36/36) V2 timeline now integrated into build pipeline. Stub functions allow linking while proper MainSequence v2 integration is pending. handoff(Claude): V2 timeline integrated, ready for effect ports
2026-02-16feat(sequence): create v2 timeline with placeholder effectsskal
- Add PlaceholderEffectV2 for unported effects (logs TODO warning) - Create timeline_v2.seq with 8 sequences using v2 syntax - Explicit node routing (source -> temp1 -> temp2 -> sink) - Uses: HeptagonEffectV2, GaussianBlurEffectV2, PlaceholderEffectV2 - Compiler generates valid C++ for all sequences - All tests passing (36/36) Timeline structure validated. Placeholders allow demo to run while complex effects (rotating_cube, hybrid_3d, particles) await porting. handoff(Claude): V2 timeline operational, ready for MainSequence integration
2026-02-16feat(sequence): add inline post-process functions for v2skal
- Create postprocess_inline.wgsl with 7 inline effect functions - Functions: vignette, flash, fade, theme, solarize, chroma_aberration, distort - Add example combined_postprocess_v2.wgsl showing usage - Register postprocess_inline snippet with ShaderComposer - Add to main and test workspace assets - All tests passing (36/36) Strategy: Simple effects become inline functions instead of separate classes. Complex effects (rotating_cube, hybrid_3d, particles) remain as TODO for v2 port. handoff(Claude): Inline functions ready, 7 simple effects consolidated
2026-02-16feat(sequence): complete phase 3 - v2 shader integration and effect portsskal
- Create v2-compatible WGSL shaders with UniformsSequenceParams - Add sequence_v2_uniforms snippet for ShaderComposer - Port 3 effects: PassthroughEffectV2, GaussianBlurEffectV2, HeptagonEffectV2 - Enable and fix end-to-end test (test_sequence_v2_e2e) - Fix shader binding order (sampler at 0, texture at 1) - Fix WebGPU validation (maxAnisotropy=1, explicit depthSlice) - Add v2 shaders to main and test workspace assets - All tests passing (36/36) handoff(Claude): Phase 3 complete, v2 effects functional, ready for phase 4
2026-02-15refactor(cnn): rename cnn_effect to cnn_v1_effect for clarityskal
Renamed files and classes: - cnn_effect.{h,cc} → cnn_v1_effect.{h,cc} - CNNEffect → CNNv1Effect - CNNEffectParams → CNNv1EffectParams - CNNLayerParams → CNNv1LayerParams - CNN_EFFECT.md → CNN_V1_EFFECT.md Updated all references: - C++ includes and class usage - CMake source list - Timeline (workspaces/main/timeline.seq) - Test file (test_demo_effects.cc) - Documentation (CLAUDE.md, PROJECT_CONTEXT.md, READMEs) Tests: 34/34 passing (100%)
2026-02-15archive(cnn): move CNN v1 to cnn_v1/ subdirectoryskal
Consolidate CNN v1 (CNNEffect) into dedicated directory: - C++ effect: src/effects → cnn_v1/src/ - Shaders: workspaces/main/shaders/cnn → cnn_v1/shaders/ - Training: training/train_cnn.py → cnn_v1/training/ - Docs: doc/CNN*.md → cnn_v1/docs/ Updated all references: - CMake source list - C++ includes (relative paths: ../../cnn_v1/src/) - Asset paths (../../cnn_v1/shaders/) - Documentation cross-references CNN v1 remains active in timeline. For new work, use CNN v2 with enhanced features (7D static, storage buffer, sigmoid activation). Tests: 34/34 passing (100%)
2026-02-15refactor(cnn): isolate CNN v2 to cnn_v2/ subdirectoryskal
Move all CNN v2 files to dedicated cnn_v2/ directory to prepare for CNN v3 development. Zero functional changes. Structure: - cnn_v2/src/ - C++ effect implementation - cnn_v2/shaders/ - WGSL shaders (6 files) - cnn_v2/weights/ - Binary weights (3 files) - cnn_v2/training/ - Python training scripts (4 files) - cnn_v2/scripts/ - Shell scripts (train_cnn_v2_full.sh) - cnn_v2/tools/ - Validation tools (HTML) - cnn_v2/docs/ - Documentation (4 markdown files) Changes: - Update CMake source list to cnn_v2/src/cnn_v2_effect.cc - Update assets.txt with relative paths to cnn_v2/ - Update includes to ../../cnn_v2/src/cnn_v2_effect.h - Add PROJECT_ROOT resolution to Python/shell scripts - Update doc references in HOWTO.md, TODO.md - Add cnn_v2/README.md Verification: 34/34 tests passing, demo runs correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15debug flash-cube-effectskal
2026-02-15refactor(timeline): retiming and effect consolidationskal
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15misc updatesskal