From a109983c194c45ad85f0e481232bc605c7cfd85b Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 13 Feb 2026 08:34:24 +0100 Subject: Remediation: Implement shared common/shaders/ directory Eliminates 36 duplicate shader files across workspaces. Structure: - common/shaders/{math,render,compute}/ - Shared utilities (20 files) - workspaces/*/shaders/ - Workspace-specific only Changes: - Created common/shaders/ with math, render, compute subdirectories - Moved 20 common shaders from workspaces to common/ - Removed duplicates from test workspace - Updated assets.txt: ../../common/shaders/ references - Enhanced asset_packer.cc: filesystem path normalization for ../ resolution Implementation: Option 1 from SHADER_REUSE_INVESTIGATION.md - Single source of truth for common code - Workspace references via relative paths - Path normalization in asset packer handoff(Claude): Common shader directory implemented --- workspaces/main/shaders/common_uniforms.wgsl | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 workspaces/main/shaders/common_uniforms.wgsl (limited to 'workspaces/main/shaders/common_uniforms.wgsl') diff --git a/workspaces/main/shaders/common_uniforms.wgsl b/workspaces/main/shaders/common_uniforms.wgsl deleted file mode 100644 index 1ab8939..0000000 --- a/workspaces/main/shaders/common_uniforms.wgsl +++ /dev/null @@ -1,25 +0,0 @@ -struct CommonUniforms { - resolution: vec2, // Screen dimensions - aspect_ratio: f32, // Width/height ratio - time: f32, // Physical time in seconds (unaffected by tempo) - beat_time: f32, // Musical time in beats (absolute, tempo-scaled) - beat_phase: f32, // Fractional beat (0.0-1.0 within current beat) - audio_intensity: f32, // Audio peak for beat sync - _pad: f32, // Padding -}; -struct GlobalUniforms { - view_proj: mat4x4, - inv_view_proj: mat4x4, - camera_pos_time: vec4, - params: vec4, - resolution: vec2, -}; -struct ObjectData { - model: mat4x4, - inv_model: mat4x4, - color: vec4, - params: vec4, -}; -struct ObjectsBuffer { - objects: array, -}; \ No newline at end of file -- cgit v1.2.3