diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-21 09:44:17 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-21 09:50:09 +0100 |
| commit | de9bc553ed0e8bda42057ac441936c20a8185f60 (patch) | |
| tree | 1d7417510512b670bf3ce14c18020b45e5baec24 /cnn_v2/shaders/cnn_v2_compute.wgsl | |
| parent | e0f326e23f6b96f31ce9e8bbd5b5f2233e6a90ba (diff) | |
refactor(wgsl): Use vec*f alias for vector types
Replaces all instances of `vec<f32>` with the more concise `vec*f` alias (e.g., `vec3f`) across all `.wgsl` shaders. This improves readability and aligns with common graphics programming conventions.
Also adds a new coding style rule to `doc/CODING_STYLE.md` to enforce this standard going forward.
Finally, this commit fixes a build error in `test_effect_base.cc` by replacing a call to the non-existent `wgpuDeviceTick` with `wgpuDevicePoll`, which resolves the test failure.
Diffstat (limited to 'cnn_v2/shaders/cnn_v2_compute.wgsl')
| -rw-r--r-- | cnn_v2/shaders/cnn_v2_compute.wgsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cnn_v2/shaders/cnn_v2_compute.wgsl b/cnn_v2/shaders/cnn_v2_compute.wgsl index cdbfd74..c788f69 100644 --- a/cnn_v2/shaders/cnn_v2_compute.wgsl +++ b/cnn_v2/shaders/cnn_v2_compute.wgsl @@ -132,7 +132,7 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) { // Blend with original on final layer if (is_output) { let original = textureLoad(original_input, coord, 0).rgb; - let result_rgb = vec3<f32>(output.x, output.y, output.z); + let result_rgb = vec3f(output.x, output.y, output.z); let blended = mix(original, result_rgb, params.blend_amount); output.x = blended.r; output.y = blended.g; |
