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/visual_debug.wgsl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'workspaces/main/shaders/visual_debug.wgsl') diff --git a/workspaces/main/shaders/visual_debug.wgsl b/workspaces/main/shaders/visual_debug.wgsl index 63e1f13..3a382ca 100644 --- a/workspaces/main/shaders/visual_debug.wgsl +++ b/workspaces/main/shaders/visual_debug.wgsl @@ -1,31 +1,31 @@ struct GlobalUniforms { - view_proj: mat4x4, - inv_view_proj: mat4x4, - camera_pos_time: vec4, - params: vec4, - resolution: vec2, + view_proj: mat4x4f, + inv_view_proj: mat4x4f, + camera_pos_time: vec4f, + params: vec4f, + resolution: vec2f, }; @group(0) @binding(0) var uniforms : GlobalUniforms; struct VertexInput { - @location(0) position : vec3, - @location(1) color : vec3, + @location(0) position : vec3f, + @location(1) color : vec3f, } struct VertexOutput { - @builtin(position) position : vec4, - @location(0) color : vec3, + @builtin(position) position : vec4f, + @location(0) color : vec3f, } @vertex fn vs_main(in : VertexInput) -> VertexOutput { var out : VertexOutput; - out.position = uniforms.view_proj * vec4(in.position, 1.0); + out.position = uniforms.view_proj * vec4f(in.position, 1.0); out.color = in.color; return out; } @fragment -fn fs_main(in : VertexOutput) -> @location(0) vec4 { - return vec4(in.color, 1.0); +fn fs_main(in : VertexOutput) -> @location(0) vec4f { + return vec4f(in.color, 1.0); } -- cgit v1.2.3