From 7d6c9bc2f10a479d9e054af56a75e535d1015b79 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 21 Feb 2026 10:24:24 +0100 Subject: docs: Update WGSL files to use shorter vector and matrix type aliases Replaced `vec2`, `vec3`, `vec4`, `mat4x4`, and `mat3x3` with their shorter aliases `vec2f`, `vec3f`, `vec4f`, `mat4x4f`, and `mat3x3f` across all WGSL shader files in `workspaces/main/shaders/`. This improves readability and aligns with modern WGSL conventions. --- workspaces/main/shaders/distort.wgsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'workspaces/main/shaders/distort.wgsl') diff --git a/workspaces/main/shaders/distort.wgsl b/workspaces/main/shaders/distort.wgsl index 607ac60..e19bd16 100644 --- a/workspaces/main/shaders/distort.wgsl +++ b/workspaces/main/shaders/distort.wgsl @@ -13,8 +13,8 @@ struct DistortParams { #include "render/fullscreen_vs" -@fragment fn fs_main(@builtin(position) p: vec4) -> @location(0) vec4 { +@fragment fn fs_main(@builtin(position) p: vec4f) -> @location(0) vec4f { let uv = p.xy / uniforms.resolution; let dist = params.strength * uniforms.audio_intensity * sin(uv.y * 20.0 + uniforms.time * params.speed * 5.0); - return textureSample(txt, smplr, uv + vec2(dist, 0.0)); + return textureSample(txt, smplr, uv + vec2f(dist, 0.0)); } -- cgit v1.2.3