From: Chris Duncan Date: Thu, 16 Jan 2025 05:11:06 +0000 (-0800) Subject: This is just one example of reversing bits with a swizzle instead of using a constructor. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=c5d01c9c19a79c68b9b867d7be6cd0564b39222c;p=nano-pow.git This is just one example of reversing bits with a swizzle instead of using a constructor. --- 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));