diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-10 18:09:41 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-10 18:09:41 +0100 |
| commit | 934579def5bd1c4f4b0f2ef7a9d81e21de796495 (patch) | |
| tree | 89487c5532a23238e4f37f687037891b99d19403 /doc/CONTRIBUTING.md | |
| parent | ae810e1a9c68d05bee254ef570fbb0e783e25931 (diff) | |
docs: Fix EFFECT keyword syntax and add automation-friendly workflow
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 <noreply@anthropic.com>
Diffstat (limited to 'doc/CONTRIBUTING.md')
| -rw-r--r-- | doc/CONTRIBUTING.md | 15 |
1 files changed, 9 insertions, 6 deletions
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<MyEffect>(fixture.ctx())},` +7. Verify: ```bash cmake -S . -B build -DDEMO_BUILD_TESTS=ON cmake --build build -j4 --target test_demo_effects |
