]> zoso.dev Git - nano-pow.git/commitdiff
This is just one example of reversing bits with a swizzle instead of using a constructor.
authorChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 05:11:06 +0000 (21:11 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 05:11:06 +0000 (21:11 -0800)
src/shaders/compute.wgsl

index a47602254b1b471b089a50c952f976bbc2af4acf..a9f52784a9d62b01e4e765ae5736a68b392e1e5b 100644 (file)
@@ -119,7 +119,7 @@ fn main(id: vec3<u32>) {
 
        // 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));