diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-08 17:43:44 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-08 17:43:44 +0100 |
| commit | 4b23fdc63d422b31b6ad86d34218e7b66b462514 (patch) | |
| tree | 028e4fec0d49a7a3a997bd446c9f1ce480ce787b /assets/demo.seq | |
| parent | 8296fe5180b979b9d1f32f6375b41f0e0a8a399d (diff) | |
feat(gpu): Add parameter-driven GaussianBlurEffect
Extends shader parametrization system to GaussianBlurEffect with
strength parameter (Task #73 continued).
Changes:
- Added GaussianBlurParams struct (strength, default: 2.0f)
- Added GaussianBlurUniforms with proper WGSL alignment (32 bytes)
- Updated shader to use parameterized strength instead of hardcoded 2.0
- Extended seq_compiler to parse strength parameter
- Updated demo.seq with 2 parameterized instances:
* Line 38: strength=3.0 (stronger blur for particles)
* Line 48: strength=1.5 (subtle blur)
Technical details:
- Backward-compatible default constructor maintained
- Migrated from raw buffer to UniformBuffer<GaussianBlurUniforms>
- Shader replaces 'let base_size = 2.0' with 'uniforms.strength'
- Generated code creates GaussianBlurParams initialization
Testing:
- All 32/32 tests pass
- Demo runs without errors
- Generated code verified correct
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'assets/demo.seq')
| -rw-r--r-- | assets/demo.seq | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/demo.seq b/assets/demo.seq index 8f84c30..cada95e 100644 --- a/assets/demo.seq +++ b/assets/demo.seq @@ -35,7 +35,7 @@ SEQUENCE 4b 0 SEQUENCE 6b 1 EFFECT + ParticleSprayEffect 0 4 # Priority 0 (spray particles) EFFECT + ParticlesEffect 0 4 # Priority 1 - EFFECT = GaussianBlurEffect 0 8 # Priority 1 (same layer) + EFFECT = GaussianBlurEffect 0 8 strength=3.0 # Priority 1 (stronger blur) SEQUENCE 7b 0 EFFECT + HeptagonEffect 0.0 .2 # Priority 0 @@ -46,7 +46,7 @@ SEQUENCE 7b 0 SEQUENCE 8b 3 EFFECT + ThemeModulationEffect 0 4 # Priority 0 EFFECT = HeptagonEffect 0.0 4.0 # Priority 0 (same layer) - EFFECT + GaussianBlurEffect 0 8 # Priority 1 + EFFECT + GaussianBlurEffect 0 8 strength=1.5 # Priority 1 (subtle blur) EFFECT + ChromaAberrationEffect 0 6 offset=0.03 angle=0.785 # Priority 2 (diagonal, stronger) EFFECT + SolarizeEffect 0 10 # Priority 3 |
