diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-28 11:50:13 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-28 11:50:13 +0100 |
| commit | b9c2a0394343ff3586880d118b7d549b3e748cad (patch) | |
| tree | bfc437f805c6b7344951107df8c7cd69a7ec421f /workspaces/main/shaders/gaussian_blur.wgsl | |
| parent | 21d8a0b86ceda19812e9869a72e49c56c90ae3da (diff) | |
refactor(effects): co-locate effect WGSL shaders with their .h/.cc in src/effects/
Move 13 effect-specific shaders from workspaces/main/shaders/ to src/effects/
so each effect's .h, .cc, and .wgsl are together. Update assets.txt paths in
both main and test workspaces. Update EFFECT_WORKFLOW.md to reflect new location.
Shared/reusable snippets remain in src/shaders/.
handoff(Gemini): shaders moved; src/effects/ now has .h, .cc, and .wgsl per effect.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'workspaces/main/shaders/gaussian_blur.wgsl')
| -rw-r--r-- | workspaces/main/shaders/gaussian_blur.wgsl | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/workspaces/main/shaders/gaussian_blur.wgsl b/workspaces/main/shaders/gaussian_blur.wgsl deleted file mode 100644 index 68e0720..0000000 --- a/workspaces/main/shaders/gaussian_blur.wgsl +++ /dev/null @@ -1,33 +0,0 @@ -// 5x5 gaussian blur - -@group(0) @binding(0) var smplr: sampler; -@group(0) @binding(1) var txt: texture_2d<f32>; - -#include "common_uniforms" -#include "render/fullscreen_vs" - -struct GaussianBlurParams { - strength: f32, - strength_audio: f32, - stretch: f32, // dir_y / dir_x - _pad: f32, -}; - -@group(0) @binding(2) var<uniform> uniforms: CommonUniforms; -@group(0) @binding(3) var<uniform> params: GaussianBlurParams; - -@fragment fn fs_main(@builtin(position) p: vec4f) -> @location(0) vec4f { - // Parameterized strength + dramatic beat pulsation - let pulse = 1.0 + uniforms.audio_intensity * params.strength_audio; // Pulsate beat - let size = params.strength * pulse; - let dir = vec2f(1., params.stretch) * size / uniforms.resolution.x; - - let uv = p.xy / uniforms.resolution; - var res = vec4f(0.0); - 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 + vec2f(x, y) * dir); - } - } - return res * (1. / 25.0); -} |
