From 4b23fdc63d422b31b6ad86d34218e7b66b462514 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Feb 2026 17:43:44 +0100 Subject: 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 - 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 --- assets/demo.seq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'assets/demo.seq') 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 -- cgit v1.2.3