From e6c2e5418d67e9b4d12d2da74a81fc57e1147865 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Feb 2026 22:44:37 +0100 Subject: feat(shaders): Standardize all shaders to use CommonUniforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define CommonUniforms struct with standard fields: - resolution: vec2 - aspect_ratio: f32 - time: f32 - beat: f32 - audio_intensity: f32 Updated 14 shaders to use CommonUniforms: - Replaced width/height with resolution - Unified intensity/audio_peak → audio_intensity - Moved effect-specific params to EffectParams struct - visual_debug.wgsl now uses GlobalUniforms.view_proj All shaders now have consistent uniform interface. Co-Authored-By: Claude Sonnet 4.5 --- assets/final/shaders/common_uniforms.wgsl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'assets/final/shaders/common_uniforms.wgsl') diff --git a/assets/final/shaders/common_uniforms.wgsl b/assets/final/shaders/common_uniforms.wgsl index 4b5cf33..1e0e242 100644 --- a/assets/final/shaders/common_uniforms.wgsl +++ b/assets/final/shaders/common_uniforms.wgsl @@ -1,3 +1,10 @@ +struct CommonUniforms { + resolution: vec2, + aspect_ratio: f32, + time: f32, + beat: f32, + audio_intensity: f32, +}; struct GlobalUniforms { view_proj: mat4x4, inv_view_proj: mat4x4, -- cgit v1.2.3