| Age | Commit message (Collapse) | Author |
|
Major improvements to reduce manual code changes after conversion:
**Scene vs Post-Process Detection:**
- Added --post-process flag (default: scene effect)
- Scene effects: Simple pattern like HeptagonEffect (no texture input)
- Post-process effects: Uses PostProcessEffect base class
**Generated Code Now Compiles As-Is:**
- Scene: Uses gpu_create_render_pass() helper
- Post-process: Uses create_post_process_pipeline() helper
- No manual Effect base class rewrites needed
- Correct shader bindings for each type
**Improved WGSL Conversion:**
- Better mainImage extraction and conversion
- Proper fragCoord -> p.xy mapping
- Handles iResolution/iTime -> uniforms automatically
- Fixed return statements (fragColor = ... -> return ...)
- Preserves helper functions from original shader
**Better Instructions:**
- Shows exact asset.txt format with SHADER_ prefix
- Includes shader declaration/definition steps
- Indicates correct test list (scene_effects vs post_process_effects)
**Example:**
```bash
./tools/shadertoy/convert_shadertoy.py shader.txt MyEffect
# Generates compile-ready scene effect
./tools/shadertoy/convert_shadertoy.py blur.txt Blur --post-process
# Generates compile-ready post-process effect
```
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
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>
|
|
Add automated conversion pipeline for ShaderToy shaders to demo effects:
- convert_shadertoy.py: Automated code generation script
- Manual templates: Header, implementation, and WGSL boilerplate
- Example shader: Test case for conversion workflow
- README: Complete conversion guide with examples
Handles basic GLSL→WGSL conversion (types, uniforms, mainImage extraction).
Manual fixes needed for fragColor returns and complex type inference.
Organized under tools/shadertoy/ for maintainability.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|