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 --- tools/shadertoy/README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'tools/shadertoy/README.md') diff --git a/tools/shadertoy/README.md b/tools/shadertoy/README.md index e734684..d12865f 100644 --- a/tools/shadertoy/README.md +++ b/tools/shadertoy/README.md @@ -2,6 +2,8 @@ Quick guide to convert ShaderToy shaders to demo effects. +**For complete workflow:** See `doc/EFFECT_WORKFLOW.md` for full integration checklist. + ## Quick Start (Automated) ```bash @@ -95,16 +97,24 @@ In `src/gpu/demo_effects.h`: In `workspaces/main/timeline.seq`: ``` SEQUENCE 0.0 0 - EFFECT MyEffectEffect 0.0 10.0 0 + EFFECT + MyEffectEffect 0.0 10.0 +``` + +### 7. Update CMakeLists.txt + +Add effect source to `CMakeLists.txt` GPU_SOURCES (both headless and normal mode sections): +```cmake +src/gpu/effects/myeffect_effect.cc ``` -### 7. Update Tests +### 8. Update Tests -In `tests/test_demo_effects.cc`: -- Add `"MyEffectEffect"` to test list -- Increment `EXPECTED_*_COUNT` +In `src/tests/gpu/test_demo_effects.cc`: +- Add to `post_process_effects` list (lines 80-93) if it's a post-process effect +- OR add to `scene_effects` list (lines 125-137) if it's a scene effect +- Example: `{"MyEffectEffect", std::make_shared(fixture.ctx())},` -### 8. Build & Test +### 9. Build & Test ```bash cmake --build build -j4 -- cgit v1.2.3