From c5d01c9c19a79c68b9b867d7be6cd0564b39222c Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 15 Jan 2025 21:11:06 -0800 Subject: [PATCH] This is just one example of reversing bits with a swizzle instead of using a constructor. --- src/shaders/compute.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index a476022..a9f5278 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -119,7 +119,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 32) xor = v12 ^ v0; - v12 = vec2(xor.y, xor.x); + v12 = xor.yx; // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); -- 2.34.1