summaryrefslogtreecommitdiff
path: root/workspaces/main/shaders/vignette.wgsl
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-21 10:24:24 +0100
committerskal <pascal.massimino@gmail.com>2026-02-21 10:24:24 +0100
commit7d6c9bc2f10a479d9e054af56a75e535d1015b79 (patch)
treea364cc4d16052162c48e15e9e05e491e9ba1e758 /workspaces/main/shaders/vignette.wgsl
parent53187e2d930cf982a0bc7f99262586c6a8a0640a (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/vignette.wgsl')
-rw-r--r--workspaces/main/shaders/vignette.wgsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/workspaces/main/shaders/vignette.wgsl b/workspaces/main/shaders/vignette.wgsl
index c4d0389..9b98ec9 100644
--- a/workspaces/main/shaders/vignette.wgsl
+++ b/workspaces/main/shaders/vignette.wgsl
@@ -13,12 +13,12 @@ struct VignetteParams {
#include "render/fullscreen_vs"
@fragment
-fn fs_main(@builtin(position) pos: vec4<f32>) -> @location(0) vec4<f32> {
+fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f {
let uv = pos.xy / common_uniforms.resolution;
let color = textureSample(input_tex, input_sampler, uv);
- let d = distance(uv, vec2<f32>(0.5, 0.5));
+ let d = distance(uv, vec2f(0.5, 0.5));
let vignette = smoothstep(params.radius, params.radius - params.softness, d);
- return vec4<f32>(color.rgb * mix(1.0, vignette, common_uniforms.audio_intensity), color.a);
+ return vec4f(color.rgb * mix(1.0, vignette, common_uniforms.audio_intensity), color.a);
} \ No newline at end of file