@group(0) @binding(0) var smplr: sampler; @group(0) @binding(1) var txt: texture_2d; #include "common_uniforms" #include "render/fullscreen_vs" struct GaussianBlurParams { strength: f32, _pad: f32, }; @group(0) @binding(2) var uniforms: CommonUniforms; @group(0) @binding(3) var params: GaussianBlurParams; @fragment fn fs_main(@builtin(position) p: vec4) -> @location(0) vec4 { let uv = p.xy / uniforms.resolution; var res = vec4(0.0); // Parameterized strength + dramatic beat pulsation let pulse = 0.5 + uniforms.audio_intensity * 2.0; // Pulsate between 0.5x and 2.5x with beat let size = params.strength * pulse; for (var x: f32 = -2.0; x <= 2.0; x += 1.0) { for (var y: f32 = -2.0; y <= 2.0; y += 1.0) { res += textureSample(txt, smplr, uv + vec2(x, y) * size / uniforms.resolution.x); } } return res / 25.0; }