diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-21 10:24:24 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-21 10:24:24 +0100 |
| commit | 7d6c9bc2f10a479d9e054af56a75e535d1015b79 (patch) | |
| tree | a364cc4d16052162c48e15e9e05e491e9ba1e758 /workspaces/main/shaders/visual_debug.wgsl | |
| parent | 53187e2d930cf982a0bc7f99262586c6a8a0640a (diff) | |
docs: Update WGSL files to use shorter vector and matrix type aliases
Replaced `vec2<f32>`, `vec3<f32>`, `vec4<f32>`, `mat4x4<f32>`, and `mat3x3<f32>` 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.
Diffstat (limited to 'workspaces/main/shaders/visual_debug.wgsl')
| -rw-r--r-- | workspaces/main/shaders/visual_debug.wgsl | 24 |
1 files changed, 12 insertions, 12 deletions
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<f32>, - inv_view_proj: mat4x4<f32>, - camera_pos_time: vec4<f32>, - params: vec4<f32>, - resolution: vec2<f32>, + view_proj: mat4x4f, + inv_view_proj: mat4x4f, + camera_pos_time: vec4f, + params: vec4f, + resolution: vec2f, }; @group(0) @binding(0) var<uniform> uniforms : GlobalUniforms; struct VertexInput { - @location(0) position : vec3<f32>, - @location(1) color : vec3<f32>, + @location(0) position : vec3f, + @location(1) color : vec3f, } struct VertexOutput { - @builtin(position) position : vec4<f32>, - @location(0) color : vec3<f32>, + @builtin(position) position : vec4f, + @location(0) color : vec3f, } @vertex fn vs_main(in : VertexInput) -> VertexOutput { var out : VertexOutput; - out.position = uniforms.view_proj * vec4<f32>(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<f32> { - return vec4<f32>(in.color, 1.0); +fn fs_main(in : VertexOutput) -> @location(0) vec4f { + return vec4f(in.color, 1.0); } |
