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/sdf_test.wgsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'workspaces/main/shaders/sdf_test.wgsl') diff --git a/workspaces/main/shaders/sdf_test.wgsl b/workspaces/main/shaders/sdf_test.wgsl index 3b63fef..941481e 100644 --- a/workspaces/main/shaders/sdf_test.wgsl +++ b/workspaces/main/shaders/sdf_test.wgsl @@ -37,15 +37,15 @@ fn shade(pos: vec3f, rd: vec3f) -> vec3f { } @vertex -fn vs_main(@builtin(vertex_index) vid: u32) -> @builtin(position) vec4 { +fn vs_main(@builtin(vertex_index) vid: u32) -> @builtin(position) vec4f { // Fullscreen triangle let x = f32((vid & 1u) << 2u) - 1.0; let y = f32((vid & 2u) << 1u) - 1.0; - return vec4(x, y, 0.0, 1.0); + return vec4f(x, y, 0.0, 1.0); } @fragment -fn fs_main(@builtin(position) pos: vec4) -> @location(0) vec4 { +fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f { // UV coordinates (-1 to 1) let uv = (pos.xy / uniforms.resolution - 0.5) * 2.0; @@ -64,5 +64,5 @@ fn fs_main(@builtin(position) pos: vec4) -> @location(0) vec4 { col = shade(hit_pos, ray.direction); } - return vec4(col, 1.0); + return vec4f(col, 1.0); } -- cgit v1.2.3