From 934579def5bd1c4f4b0f2ef7a9d81e21de796495 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 10 Feb 2026 18:09:41 +0100 Subject: docs: Fix EFFECT keyword syntax and add automation-friendly workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix EFFECT keyword format across all documentation and scripts - priority modifier (+/=/–) is required but was missing from examples. **Documentation fixes:** - doc/HOWTO.md: Added missing + to EFFECT example - doc/RECIPE.md: Added priority modifiers to examples - tools/shadertoy/README.md: Fixed test path, clarified workflow - tools/shadertoy/convert_shadertoy.py: Updated output instructions **New automation guide:** - doc/EFFECT_WORKFLOW.md: Complete step-by-step checklist for AI agents - Exact file paths and line numbers - Common issues and fixes - Asset ID naming conventions - CMakeLists.txt dual-section requirement - Test list instructions (post_process_effects vs scene_effects) **Integration:** - CLAUDE.md: Added EFFECT_WORKFLOW.md to Tier 2 (always loaded) - doc/AI_RULES.md: Added "Adding Visual Effects" quick reference - README.md: Added EFFECT_WORKFLOW.md to documentation list **CMakeLists.txt:** - Disabled incomplete cube_sphere_effect.cc (ShaderToy conversion WIP) **Timeline:** - Commented out incomplete CubeSphereEffect - Removed obsolete constructor argument Fixes #issue-with-effect-syntax Co-Authored-By: Claude Sonnet 4.5 --- doc/CONTRIBUTING.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'doc/CONTRIBUTING.md') diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 9cd785b..98df873 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -65,12 +65,15 @@ See `doc/CODING_STYLE.md` for detailed examples. ## Development Protocols ### Adding Visual Effect -1. Implement `Effect` subclass in `src/gpu/demo_effects.cc` -2. Add to workspace `timeline.seq` (e.g., `workspaces/main/timeline.seq`) -3. **Update `test_demo_effects.cc`**: - - Add to test list - - Increment `EXPECTED_*_COUNT` -4. Verify: +1. Create effect class files (use `tools/shadertoy/convert_shadertoy.py` or templates) +2. Add shader to `workspaces/main/assets.txt` +3. Add effect `.cc` file to `CMakeLists.txt` GPU_SOURCES (both sections) +4. Include header in `src/gpu/demo_effects.h` +5. Add to workspace `timeline.seq` (e.g., `workspaces/main/timeline.seq`) +6. **Update `src/tests/gpu/test_demo_effects.cc`**: + - Add to `post_process_effects` list (lines 80-93) or `scene_effects` list (lines 125-137) + - Example: `{"MyEffect", std::make_shared(fixture.ctx())},` +7. Verify: ```bash cmake -S . -B build -DDEMO_BUILD_TESTS=ON cmake --build build -j4 --target test_demo_effects -- cgit v1.2.3