summaryrefslogtreecommitdiff
path: root/workspaces/main/shaders/math/sdf_shapes.wgsl
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-13 08:34:24 +0100
committerskal <pascal.massimino@gmail.com>2026-02-13 08:34:24 +0100
commita109983c194c45ad85f0e481232bc605c7cfd85b (patch)
tree2b2fadb054fb8ea52d3e31fefdc4678d5a3ed7dc /workspaces/main/shaders/math/sdf_shapes.wgsl
parent3ce45fcf073047d71ed0b2c88f4d6c5362f6b620 (diff)
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
Diffstat (limited to 'workspaces/main/shaders/math/sdf_shapes.wgsl')
-rw-r--r--workspaces/main/shaders/math/sdf_shapes.wgsl14
1 files changed, 0 insertions, 14 deletions
diff --git a/workspaces/main/shaders/math/sdf_shapes.wgsl b/workspaces/main/shaders/math/sdf_shapes.wgsl
deleted file mode 100644
index 31bbe2d..0000000
--- a/workspaces/main/shaders/math/sdf_shapes.wgsl
+++ /dev/null
@@ -1,14 +0,0 @@
-fn sdSphere(p: vec3<f32>, r: f32) -> f32 {
- return length(p) - r;
-}
-fn sdBox(p: vec3<f32>, b: vec3<f32>) -> f32 {
- let q = abs(p) - b;
- return length(max(q, vec3<f32>(0.0))) + min(max(q.x, max(q.y, q.z)), 0.0);
-}
-fn sdTorus(p: vec3<f32>, t: vec2<f32>) -> f32 {
- let q = vec2<f32>(length(p.xz) - t.x, p.y);
- return length(q) - t.y;
-}
-fn sdPlane(p: vec3<f32>, n: vec3<f32>, h: f32) -> f32 {
- return dot(p, n) + h;
-}