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/test/shaders/compute/gen_grid.wgsl | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 workspaces/test/shaders/compute/gen_grid.wgsl (limited to 'workspaces/test/shaders/compute/gen_grid.wgsl') diff --git a/workspaces/test/shaders/compute/gen_grid.wgsl b/workspaces/test/shaders/compute/gen_grid.wgsl deleted file mode 100644 index cc5e189..0000000 --- a/workspaces/test/shaders/compute/gen_grid.wgsl +++ /dev/null @@ -1,24 +0,0 @@ -// GPU procedural grid pattern generator. -// Simple grid lines with configurable spacing and thickness. - -struct GridParams { - width: u32, - height: u32, - grid_size: u32, - thickness: u32, -} - -@group(0) @binding(0) var output_tex: texture_storage_2d; -@group(0) @binding(1) var params: GridParams; - -@compute @workgroup_size(8, 8, 1) -fn main(@builtin(global_invocation_id) id: vec3) { - if (id.x >= params.width || id.y >= params.height) { return; } - - let on_line = (id.x % params.grid_size) < params.thickness || - (id.y % params.grid_size) < params.thickness; - - let val = select(0.0, 1.0, on_line); - - textureStore(output_tex, id.xy, vec4(val, val, val, 1.0)); -} -- cgit v1.2.3